45 Commits

Author SHA1 Message Date
lemon橪
e73d76eb57 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp 2022-02-14 14:31:36 +08:00
lemon橪
b9a89d7c40 新增分销模块分销业绩详细信息补充 2022-02-14 14:31:29 +08:00
paulGao
1a1bf814a0 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2022-02-14 14:21:50 +08:00
paulGao
f52e929d04 适配api 2022-02-14 14:21:48 +08:00
paulGao
38d8d2e1ca 适配修改后的api 2022-02-12 15:20:48 +08:00
paulGao
ab4015d0e0 适配修改的api 2022-02-10 18:57:17 +08:00
lemon橪
15027e51ee 优化安卓app在登录验证页面图像可能显示异常问题 2022-02-07 14:41:18 +08:00
paulGao
557d7ef1d9 fix bugs 2022-01-27 14:58:42 +08:00
paulGao
4dea906e23 修复店铺和平台优惠券同时选择时,显示问题 2022-01-21 19:02:06 +08:00
paulGao
68e25cb0b3 优化下单后退显示 2022-01-04 19:58:01 +08:00
paulGao
4d033e59f1 增加刷新token接口失效的情况处理 2022-01-04 14:22:00 +08:00
paulGao
a80c579d8a 售后获取订单过滤0元订单 2022-01-04 09:20:20 +08:00
paulGao
5cc48ed462 修复登录时uuid变化问题 2021-12-31 12:04:39 +08:00
lemon橪
2abc8ff9d8 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp 2021-12-29 09:23:06 +08:00
lemon橪
198bd6c322 修复楼层装修请求文章的接口路径 2021-12-29 09:23:05 +08:00
paulGao
7fb96f1eac 修复购物车全选显示不正确问题 2021-12-28 19:50:06 +08:00
paulGao
2020f55826 修复订单详情跳转商品页面错误 2021-12-27 18:45:39 +08:00
lemon橪
c58f8d7831 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp 2021-12-25 10:55:27 +08:00
lemon橪
32a6bbacd0 购物车新增领劵判断,优化我的优惠券中可能出现的Bug 2021-12-25 10:55:25 +08:00
夜良king
b08c77b6c0 我的足迹里-全选的改动 2021-12-24 16:41:43 +08:00
lemon橪
a8836744f6 我的收藏布局修改 2021-12-24 16:22:03 +08:00
lemon橪
3a2202a2e8 修改部分已发现的bug 2021-12-24 09:12:21 +08:00
lemon橪
896749d812 修复购物车在更新最新后端代码的时候导致的bug 2021-12-23 18:36:00 +08:00
paulGao
09ec1e8c06 修复默认弹促销 2021-12-23 16:06:59 +08:00
paulGao
07627c41e3 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2021-12-21 19:12:20 +08:00
paulGao
e4e278c2fa 适配促销活动,修复促销问题 2021-12-21 19:12:04 +08:00
lemon橪
1b1b239ba0 合并冲突提交 2021-12-20 17:35:38 +08:00
lemon橪
c1d4d39265 udesk 技术储备 2021-12-20 17:34:45 +08:00
lemon橪
dfd3885486 储备udesk方案,暂时注释 2021-12-20 17:34:27 +08:00
paulGao
892f49c83a 适配重构促销 2021-12-15 18:17:33 +08:00
paulGao
85d0671443 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2021-12-13 19:33:21 +08:00
paulGao
f22e7b9fcb 适配重构促销 2021-12-13 19:31:48 +08:00
lemon橪
d282ef1b24 化楼层装修中商品分类判断 2021-12-13 17:17:02 +08:00
lemon橪
9c2529ae3d Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp 2021-12-13 17:16:14 +08:00
lemon橪
108b7f5b0b 优化楼层装修中商品分类判断 2021-12-13 17:16:12 +08:00
paulGao
b4c8be3e63 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2021-12-13 02:26:08 +08:00
paulGao
4064c56b21 适配重构促销 2021-12-11 13:48:18 +08:00
lemon橪
1416762afe 优化楼层装修中商品分类代码可能会出现的bug 2021-12-09 18:32:01 +08:00
lemon橪
17f23fe920 砍价分享图片有误bug修改 2021-12-03 15:52:40 +08:00
lemon橪
c412c92b3e 新增取消售后 优化售后部分逻辑 2021-11-30 14:59:49 +08:00
lemon橪
deed875c1b 新增商品列表 2021-11-29 09:58:39 +08:00
lemon橪
f600b628ce 我的足迹样式优化 2021-11-22 15:25:42 +08:00
lemon橪
0c887a25e3 修改login中第三方循环判断 2021-11-22 11:18:00 +08:00
lemon橪
89dbd32351 修改商品详情中图片有空格问题 2021-11-19 15:49:42 +08:00
lemon橪
98c5863973 新增搜素样式判断优化,以及投诉图片上传内容条显示 2021-11-18 18:11:28 +08:00
51 changed files with 1812 additions and 987 deletions

View File

@@ -12,7 +12,7 @@ import api from "@/config/api.js";
*/
export function getAddressList(pageNumber, pageSize) {
return http.request({
url: "/memberAddress",
url: "/member/address",
method: Method.GET,
needToken: true,
params: { pageNumber, pageSize },
@@ -37,7 +37,7 @@ export function getLogistics() {
*/
export function getAddressCode(cityCode, townName) {
return http.request({
url: api.common + "/region/region",
url: api.common + "/common/region/region",
method: Method.GET,
needToken: true,
params: { cityCode, townName },
@@ -51,7 +51,7 @@ export function getAddressCode(cityCode, townName) {
*/
export function addAddress(data) {
return http.request({
url: "/memberAddress",
url: "/member/address",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@@ -67,7 +67,7 @@ export function addAddress(data) {
*/
export function editAddress(params) {
return http.request({
url: `/memberAddress`,
url: `/member/address`,
method: Method.PUT,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@@ -81,7 +81,7 @@ export function editAddress(params) {
*/
export function deleteAddress(id) {
return http.request({
url: `/memberAddress/delById/${id}`,
url: `/member/address/delById/${id}`,
method: Method.DELETE,
needToken: true,
});
@@ -95,7 +95,7 @@ export function deleteAddress(id) {
*/
export function getAddressDetail(id) {
return http.request({
url: `/memberAddress/get/${id}`,
url: `/member/address/get/${id}`,
method: Method.GET,
loading: false,
needToken: true,
@@ -107,7 +107,7 @@ export function getAddressDetail(id) {
*/
export function getAddressDefault() {
return http.request({
url: `/memberAddress/get/default`,
url: `/member/address/get/default`,
method: Method.GET,
loading: false,
needToken: true,

View File

@@ -34,16 +34,29 @@ export function applyCancelOrder(params) {
});
}
/**
/**
* 获取商家售后收件地址
*/
export function getstoreAfterSaleAddress(sn) {
export function getStoreAfterSaleAddress(sn) {
return http.request({
url: `/afterSale/getStoreAfterSaleAddress/${sn}`,
url: `/order/afterSale/getStoreAfterSaleAddress/${sn}`,
method: Method.GET,
needToken: true,
});
}
/**
* 取消售后
*/
export function cancelAfterSale(afterSaleSn) {
return http.request({
url: `/order/afterSale/cancel/${afterSaleSn}`,
method: Method.POST,
needToken: true,
});
}
/**
* 获取售后服务记录相关数据
@@ -51,7 +64,7 @@ export function getstoreAfterSaleAddress(sn) {
*/
export function getAfterSaleList(params) {
return http.request({
url: `/afterSale/page`,
url: `/order/afterSale/page`,
method: Method.GET,
needToken: true,
params,
@@ -64,7 +77,7 @@ export function getAfterSaleList(params) {
*/
export function getServiceDetail(sn) {
return http.request({
url: `/afterSale/get/${sn}`,
url: `/order/afterSale/get/${sn}`,
method: Method.GET,
needToken: true,
});
@@ -76,7 +89,7 @@ export function getServiceDetail(sn) {
*/
export function addComplain(params) {
return http.request({
url: `/complain`,
url: `/order/complain`,
method: Method.POST,
needToken: true,
header: {
@@ -91,7 +104,7 @@ export function addComplain(params) {
*/
export function clearComplain(id, params) {
return http.request({
url: `/complain/status/${id}`,
url: `/order/complain/status/${id}`,
method: Method.PUT,
needToken: true,
params,
@@ -103,7 +116,7 @@ export function clearComplain(id, params) {
*/
export function getAfterSaleLog(sn) {
return http.request({
url: `/afterSale/get/getAfterSaleLog/${sn}`,
url: `/order/afterSale/get/getAfterSaleLog/${sn}`,
method: Method.GET,
needToken: true,
});
@@ -114,7 +127,7 @@ export function getAfterSaleLog(sn) {
*/
export function getComplain(params) {
return http.request({
url: `/complain`,
url: `/order/complain`,
method: Method.GET,
needToken: true,
params,
@@ -126,7 +139,7 @@ export function getComplain(params) {
*/
export function getAfterSaleReason(serviceType) {
return http.request({
url: `/afterSale/get/afterSaleReason/${serviceType}`,
url: `/order/afterSale/get/afterSaleReason/${serviceType}`,
method: Method.GET,
needToken: true,
});
@@ -137,7 +150,7 @@ export function getAfterSaleReason(serviceType) {
*/
export function getClearReason() {
return http.request({
url: `/afterSale/get/afterSaleReason/CANCEL`,
url: `/order/afterSale/get/afterSaleReason/CANCEL`,
method: Method.GET,
needToken: true,
});
@@ -148,7 +161,7 @@ export function getClearReason() {
*/
export function getComplainReason() {
return http.request({
url: `/afterSale/get/afterSaleReason/COMPLAIN`,
url: `/order/afterSale/get/afterSaleReason/COMPLAIN`,
method: Method.GET,
needToken: true,
});
@@ -158,7 +171,7 @@ export function getComplainReason() {
*/
export function getComplainDetail(id) {
return http.request({
url: `/complain/${id}`,
url: `/order/complain/${id}`,
method: Method.GET,
needToken: true,
});
@@ -169,7 +182,7 @@ export function getComplainDetail(id) {
*/
export function getAfterSaleInfo(sn) {
return http.request({
url: `/afterSale/applyAfterSaleInfo/${sn}`,
url: `/order/afterSale/applyAfterSaleInfo/${sn}`,
method: Method.GET,
needToken: true,
});
@@ -181,7 +194,7 @@ export function getAfterSaleInfo(sn) {
*/
export function applyReturn(orderItemSn, params) {
return http.request({
url: `/afterSale/save/${orderItemSn}`,
url: `/order/afterSale/save/${orderItemSn}`,
method: Method.POST,
header: {
"Content-Type": "application/x-www-form-urlencoded",
@@ -197,7 +210,7 @@ export function applyReturn(orderItemSn, params) {
*/
export function fillShipInfo(afterSaleSn, params) {
return http.request({
url: `/afterSale/delivery/${afterSaleSn}`,
url: `/order/afterSale/delivery/${afterSaleSn}`,
method: Method.POST,
header: {
"Content-Type": "application/x-www-form-urlencoded",

View File

@@ -23,7 +23,7 @@ export function getArticleCategory(category_type) {
*/
export function getArticleDetail(type) {
return http.request({
url: `/article/type/${type}`,
url: `/other/article/get/${type}`,
method: Method.GET,
});
}

View File

@@ -1,10 +1,8 @@
/**
* 公共API
*/
import {http, Method} from '@/utils/request.js';
import api from '@/config/api.js';
import { http, Method } from "@/utils/request.js";
import api from "@/config/api.js";
/**
* 获取地区数据
@@ -12,7 +10,16 @@ import api from '@/config/api.js';
*/
export function getRegionsById(id = 0) {
return http.request({
url: `${api.common}/region/item/${id}`,
url: `${api.common}/common/region/item/${id}`,
method: Method.GET,
message: false,
});
}
// 获取IM接口前缀
export function getIMDetail() {
return http.request({
url: `${api.common}/IM`,
method: Method.GET,
message: false,
});
@@ -22,5 +29,4 @@ export function getRegionsById(id = 0) {
* 文件上传地址
* @type {string}
*/
export const upload =api.common+'/upload/file';
export const upload = api.common + "/common/upload/file";

View File

@@ -9,7 +9,7 @@ import { http, Method } from "@/utils/request.js";
*/
export function getGoodsMessage(goodsId) {
return http.request({
url: `/goods/get/${goodsId}`,
url: `/goods/goods/get/${goodsId}`,
method: Method.GET,
});
}
@@ -19,7 +19,7 @@ import { http, Method } from "@/utils/request.js";
*/
export function getGoodsRelated(params) {
return http.request({
url: `/goods/es/related`,
url: `/goods/goods/es/related`,
method: Method.GET,
params,
});
@@ -32,7 +32,7 @@ export function getGoodsRelated(params) {
*/
export function getGoods(skuId, goodsId) {
return http.request({
url: `/goods/sku/${goodsId}/${skuId}`,
url: `/goods/goods/sku/${goodsId}/${skuId}`,
method: Method.GET,
});
}
@@ -43,7 +43,7 @@ export function getGoodsRelated(params) {
*/
export function getGoodsDistribution(distributionId) {
return http.request({
url: `/distribution/bindingDistribution/${distributionId}`,
url: `/distribution/distribution/bindingDistribution/${distributionId}`,
method: Method.GET,
});
}
@@ -56,7 +56,7 @@ export function getGoodsRelated(params) {
*/
export function getGoodsList(params) {
return http.request({
url: "/goods/es",
url: "/goods/goods/es",
method: Method.GET,
params,
});
@@ -112,7 +112,7 @@ export function getPlateformTagGoods(tag_id) {
*/
export function getCategoryList(id) {
return http.request({
url: `/category/get/${id}`,
url: `/goods/category/get/${id}`,
method: Method.GET,
loading: false,
});
@@ -126,7 +126,7 @@ export function getCategoryList(id) {
*/
export function distribution() {
return http.request({
url: `/distribution`,
url: `/distribution/distribution`,
method: Method.GET,
});
}
@@ -136,7 +136,7 @@ export function distribution() {
*/
export function applyDistribution(params) {
return http.request({
url: `/distribution`,
url: `/distribution/distribution`,
method: Method.POST,
params,
});
@@ -170,7 +170,7 @@ export function cashLog(params) {
*/
export function distributionOrderList(params) {
return http.request({
url: `/distribution/distributionOrder`,
url: `/distribution/distribution/distributionOrder`,
method: Method.GET,
params
});
@@ -181,7 +181,7 @@ export function distributionOrderList(params) {
*/
export function distributionGoods(params) {
return http.request({
url: `/distributionGoods`,
url: `/distribution/goods`,
method: Method.GET,
params,
});
@@ -191,7 +191,7 @@ export function distributionGoods(params) {
*/
export function checkedDistributionGoods(params) {
return http.request({
url: `/distributionGoods/checked/${params.id}`,
url: `/distribution/goods/checked/${params.id}`,
method: Method.GET,
params
});
@@ -202,7 +202,7 @@ export function checkedDistributionGoods(params) {
*/
export function getMpCode(params){
return http.request({
url:`/mini-program/mp/unlimited`,
url:`/passport/connect/miniProgram/mp/unlimited`,
method:Method.GET,
params
})
@@ -213,7 +213,7 @@ export function checkedDistributionGoods(params) {
*/
export function getMpScene(id){
return http.request({
url:`/mini-program/mp/unlimited/scene?id=${id}`,
url:`/passport/connect/miniProgram/mp/unlimited/scene?id=${id}`,
method:Method.GET,
})

View File

@@ -32,7 +32,7 @@ export function getCategory(parent_id = 0) {
*/
export function getHotKeywords(count) {
return http.request({
url: "/goods/hot-words",
url: "/goods/goods/hot-words",
method: Method.GET,
loading: false,
params: { count },
@@ -46,7 +46,7 @@ export function getHotKeywords(count) {
*/
export function getFloorData() {
return http.request({
url: `/pageData/getIndex?clientType=H5`,
url: `/other/pageData/getIndex?clientType=H5`,
method: "get",
});
}
@@ -56,7 +56,7 @@ export function getFloorData() {
*/
export function getCategoryIndexData(parentId = 0) {
return http.request({
url: `/category/get/${parentId}`,
url: `/goods/category/get/${parentId}`,
method: "get",
});
}

View File

@@ -8,7 +8,7 @@ import api from "@/config/api.js";
*/
export function resetByMobile(params) {
return http.request({
url: `/members/resetByMobile`,
url: `/passport/member/resetByMobile`,
method: "POST",
params,
});
@@ -20,7 +20,7 @@ export function resetByMobile(params) {
*/
export function sendMobile(mobile,type='LOGIN') {
return http.request({
url: `${api.common}/sms/${type}/${mobile}`,
url: `${api.common}/common/sms/${type}/${mobile}`,
method: "GET",
});
}
@@ -32,7 +32,7 @@ export function sendMobile(mobile,type='LOGIN') {
*/
export function smsLogin(params, clientType) {
return http.request({
url: `/members/smsLogin`,
url: `/passport/member/smsLogin`,
method: "POST",
data: params,
header: {
@@ -50,7 +50,7 @@ export function smsLogin(params, clientType) {
export function modifyPass(params) {
return http.request({
url: `/members/modifyPass`,
url: `/passport/member/modifyPass`,
method: "PUT",
params,
});
@@ -61,7 +61,7 @@ export function modifyPass(params) {
*/
export function refreshTokenFn(refresh_token) {
return http.request({
url: `/members/refresh/${refresh_token}`,
url: `/passport/member/refresh/${refresh_token}`,
method: "GET",
});
}
@@ -69,7 +69,7 @@ export function refreshTokenFn(refresh_token) {
// 获取密码状态
export function logout () {
return http.request({
url: '/members/logout',
url: '/passport/member/logout',
method: "POST",
needToken: true,
})

View File

@@ -6,7 +6,7 @@ import { http, Method } from "@/utils/request.js";
*/
export function feedBack(params) {
return http.request({
url: "/feedback",
url: "/other/feedback",
method: Method.POST,
needToken: true,
params,
@@ -16,7 +16,7 @@ export function feedBack(params) {
// 提现
export function withdrawalApply(params) {
return http.request({
url: "/members/wallet/withdrawal",
url: "/wallet/wallet/withdrawal",
method: Method.POST,
needToken: true,
params,
@@ -30,7 +30,7 @@ export function withdrawalApply(params) {
*/
export function payCallback(params) {
return http.request({
url: `/cashier/result`,
url: `/payment/cashier/result`,
method: Method.GET,
params,
});
@@ -117,7 +117,7 @@ export function getPointsData(params) {
*/
export function getComments(params) {
return http.request({
url: "/memberEvaluation",
url: "/member/evaluation",
method: Method.GET,
needToken: true,
params,
@@ -131,7 +131,7 @@ export function getComments(params) {
*/
export function getFootprintNum(params) {
return http.request({
url: "/footprint/getFootprintNum",
url: "/member/footprint/getFootprintNum",
method: Method.GET,
needToken: true,
params,
@@ -144,7 +144,7 @@ export function getFootprintNum(params) {
*/
export function commentsMemberOrder(params) {
return http.request({
url: "/memberEvaluation",
url: "/member/evaluation",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@@ -275,7 +275,7 @@ export function collectionStore(store_id) {
*/
export function getUserInfo() {
return http.request({
url: "/members",
url: "/passport/member",
method: Method.GET,
needToken: true,
});
@@ -287,7 +287,7 @@ export function getUserInfo() {
*/
export function getUserWallet() {
return http.request({
url: "/members/wallet",
url: "/wallet/wallet",
method: Method.GET,
needToken: true,
});
@@ -300,7 +300,7 @@ export function getUserWallet() {
*/
export function saveUserInfo(params) {
return http.request({
url: "/members/editOwn",
url: "/passport/member/editOwn",
method: Method.PUT,
header: { "content-type": "application/x-www-form-urlencoded" },
needToken: true,
@@ -328,7 +328,7 @@ export function addReceipt(params) {
*/
export function getGoodsComments(goodsId, params) {
return http.request({
url: `/memberEvaluation/${goodsId}/goodsEvaluation`,
url: `/member/evaluation/${goodsId}/goodsEvaluation`,
method: Method.GET,
loading: false,
params,
@@ -341,7 +341,7 @@ export function getGoodsComments(goodsId, params) {
*/
export function getGoodsCommentsCount(goodsId) {
return http.request({
url: `/memberEvaluation/${goodsId}/evaluationNumber`,
url: `/member/evaluation/${goodsId}/evaluationNumber`,
method: Method.GET,
loading: false,
});
@@ -365,7 +365,7 @@ export function getNoReadMessageNum() {
*/
export function myTrackList(params) {
return http.request({
url: `/footprint`,
url: `/member/footprint`,
method: Method.GET,
needToken: true,
params,
@@ -378,7 +378,7 @@ export function myTrackList(params) {
*/
export function deleteHistoryListId(ids) {
return http.request({
url: `/footprint/delByIds/${ids}`,
url: `/member/footprint/delByIds/${ids}`,
method: Method.DELETE,
needToken: true,
});

View File

@@ -51,7 +51,7 @@ export function selectedShipMethod(params) {
*/
export function getOrderList(params) {
return http.request({
url: "/orders",
url: "/order/order",
method: Method.GET,
needToken: true,
params,
@@ -64,7 +64,7 @@ export function getOrderList(params) {
*/
export function getOrderDetail(orderSn) {
return http.request({
url: `/orders/${orderSn}`,
url: `/order/order/${orderSn}`,
method: Method.GET,
needToken: true,
});
@@ -77,7 +77,7 @@ export function getOrderDetail(orderSn) {
*/
export function cancelOrder(orderSn, reason) {
return http.request({
url: `/orders/${orderSn}/cancel`,
url: `/order/order/${orderSn}/cancel`,
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@@ -91,7 +91,7 @@ export function cancelOrder(orderSn, reason) {
*/
export function confirmReceipt(orderSn) {
return http.request({
url: `/orders/${orderSn}/receiving`,
url: `/order/order/${orderSn}/receiving`,
method: Method.POST,
needToken: true,
});

View File

@@ -4,11 +4,14 @@
import {http, Method} from '@/utils/request.js';
/**
* 获取店铺列表
* @param params
*/
export function getstoreList(params) {
export function getStoreList(params) {
return http.request({
url: '/store',
method: Method.GET,
@@ -22,7 +25,7 @@ export function getstoreList(params) {
*/
export function getStoreBaseInfo(storeId) {
return http.request({
url: `/store/get/detail/${storeId}`,
url: `/store/store/get/detail/${storeId}`,
method: Method.GET,
loading: false,
});
@@ -34,7 +37,7 @@ export function getstoreList(params) {
*/
export function getStoreCategory(id) {
return http.request({
url: `/store/label/get/${id}`,
url: `/store/store/label/get/${id}`,
method: Method.GET,
});
}
@@ -46,7 +49,7 @@ export function getstoreList(params) {
*/
export function getLicencePhoto(id) {
return http.request({
url: `/store/get/licencePhoto/${id}`,
url: `/store/store/get/licencePhoto/${id}`,
method: Method.GET,
});
}

View File

@@ -177,7 +177,7 @@ export function createTrade(params) {
*/
export function getCashierData(params) {
return http.request({
url: "cashier/tradeDetail",
url: "payment/cashier/tradeDetail",
method: Method.GET,
needToken: true,
params,
@@ -194,7 +194,7 @@ export function getCashierData(params) {
*/
export function initiatePay(paymentMethod, paymentClient, params) {
return http.request({
url: `cashier/pay/${paymentMethod}/${paymentClient}`,
url: `payment/cashier/pay/${paymentMethod}/${paymentClient}`,
method: Method.GET,
needToken: true,
params,
@@ -209,7 +209,7 @@ export function initiatePay(paymentMethod, paymentClient, params) {
*/
export function getExpress(orderSn) {
return http.request({
url: `/orders/getTraces/${orderSn}`,
url: `/order/order/getTraces/${orderSn}`,
method: Method.POST,
needToken: true,

View File

@@ -1,26 +1,40 @@
<template>
<div class="wrapper">
<u-popup class="popup" v-model="buyMask" :height="setup.height" closeable :mode="setup.mode"
:border-radius="setup.radius" @close="closeMask()">
<u-popup
class="popup"
v-model="buyMask"
:height="setup.height"
closeable
:mode="setup.mode"
:border-radius="setup.radius"
@close="closeMask()"
>
<!-- 商品 -->
<view class="goods-box bottom">
<view class="goods-header">
<view class="goods-img">
<u-image width="200rpx" border-radius="20" class="uimage" height="200rpx"
:src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail"></u-image>
<u-image
width="200rpx"
border-radius="20"
class="uimage"
height="200rpx"
:src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail"
></u-image>
</view>
<view class="goods-skus">
<!-- 有活动商品价格 -->
<view class="goods-price " v-if="goodsDetail.promotionPrice">
<view class="goods-price" v-if="goodsDetail.promotionPrice && ((isGroup && buyType === 'PINTUAN') || !isGroup)">
<span v-if="goodsDetail.promotionPrice && !pointDetail">
<span
class="goods-price-promotionShow goods-price-bigshow">{{ formatPrice(goodsDetail.promotionPrice)[0] }}</span>
<span class="goods-price-promotionShow goods-price-bigshow">{{
formatPrice(goodsDetail.promotionPrice)[0]
}}</span>
.{{ formatPrice(goodsDetail.promotionPrice)[1] }}
</span>
<span v-if="pointDetail.points">
<span class="goods-price-promotionShow goods-price-bigshow">{{ pointDetail.points }}</span>
<span class="goods-price-promotionShow goods-price-bigshow">{{
pointDetail.points
}}</span>
积分
</span>
<div class="promotion-box">
@@ -29,7 +43,6 @@
formatPrice(goodsDetail.price)[0]
}}</span>
.{{ formatPrice(goodsDetail.price)[1] }}
</div>
</view>
<!-- 正常商品的价格 -->
@@ -40,7 +53,6 @@
formatPrice(goodsDetail.price)[0]
}}</span>
.{{ formatPrice(goodsDetail.price)[1] }}
</span>
</view>
<view class="goods-check-skus">
@@ -55,36 +67,61 @@
<!-- 商品信息 -->
<scroll-view class="goods-skus-box" :scroll-y="true">
<!-- 规格 -->
<view class="goods-skus-view" :key="specIndex" v-for="(spec, specIndex) in formatList">
<view
class="goods-skus-view"
:key="specIndex"
v-for="(spec, specIndex) in formatList"
>
<view class="skus-view-list">
<view class="view-class-title">{{ spec.name }}</view>
<!-- 正常逻辑 循环出sku -->
<view v-if="!parentOrder" :class="{ active: spec_val.value == currentSelceted[specIndex] }" class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values" :key="spec_index"
@click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }} </view>
<view
v-if="!parentOrder"
:class="{ active: spec_val.value == currentSelceted[specIndex] }"
class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values"
:key="spec_index"
@click="handleClickSpec(spec, specIndex, spec_val)"
>{{ spec_val.value }}
</view>
<!-- 拼团购买仅筛选出当前拼团类型商品 -->
<view v-if="parentOrder && spec_val.skuId == goodsDetail.id" :class="{ active: spec_val.value == currentSelceted[specIndex] }" class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values" :key="spec_index"
@click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }} </view>
<view
v-if="parentOrder && spec_val.skuId == goodsDetail.id"
:class="{ active: spec_val.value == currentSelceted[specIndex] }"
class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values"
:key="spec_index"
@click="handleClickSpec(spec, specIndex, spec_val)"
>{{ spec_val.value }}
</view>
</view>
</view>
<!-- 数量 -->
<view class="goods-skus-number">
<view class="view-class-title">数量</view>
<u-number-box :bg-color="numberBox.bgColor" :max="200" :color="numberBox.color"
:input-width="numberBox.width" :input-height="numberBox.height" :size="numberBox.size" :min="1"
v-model="num">
<u-number-box
:bg-color="numberBox.bgColor"
:max="200"
:color="numberBox.color"
:input-width="numberBox.width"
:input-height="numberBox.height"
:size="numberBox.size"
:min="1"
v-model="num"
>
</u-number-box>
</view>
</scroll-view>
<!-- 按钮 -->
<view class="btns">
<view class="box-btn card" v-if="buyType != 'PINTUAN' && goodsDetail.goodsType!='VIRTUAL_GOODS'"
@click="addToCartOrBuy('cart')">加入购物车</view>
<view
class="box-btn card"
v-if="buyType != 'PINTUAN' && goodsDetail.goodsType != 'VIRTUAL_GOODS'"
@click="addToCartOrBuy('cart')"
>加入购物车</view
>
<view class="box-btn buy" @click="addToCartOrBuy('buy')">立即购买</view>
</view>
</view>
@@ -124,6 +161,10 @@ export default {
type: Boolean,
default: false,
},
isGroup: {
type: Boolean,
default: false,
},
goodsDetail: {
default: "",
type: null,
@@ -140,15 +181,17 @@ export default {
default: "",
type: null,
},
pointDetail:{
pointDetail: {
default: "",
type: null,
}
},
},
watch: {
buyType: {
handler(val) {
if (val) {
this.buyType = val;
}
},
immediate: true,
},
@@ -161,8 +204,6 @@ export default {
},
methods: {
// 格式化金钱 1999 --> [1999,00]
formatPrice(val) {
if (typeof val == "undefined") {
@@ -232,7 +273,6 @@ export default {
});
},
/**
* 添加到购物车或购买
*/
@@ -276,9 +316,7 @@ export default {
uni.navigateTo({
url: `/pages/order/fillorder?way=${data.cartType}&addr=${
this.addr.id || ""
}&parentOrder=${encodeURIComponent(
JSON.stringify(this.parentOrder)
)}`,
}&parentOrder=${encodeURIComponent(JSON.stringify(this.parentOrder))}`,
});
}
});
@@ -286,8 +324,11 @@ export default {
},
formatSku(list) {
// 格式化数据
console.log(list);
let arr = [{}];
if(!Array.isArray(list)){
return false
}
list.forEach((item, index) => {
item.specValues.forEach((spec, specIndex) => {
let name = spec.specName;
@@ -315,7 +356,6 @@ export default {
return key.name;
});
if (!keys.includes(name)) {
console.log(name, values);
arr.push({
name: name,
values: [values],

View File

@@ -1,39 +1,87 @@
<template>
<view>
<view v-if="!hid" class="flex-row-center" :style="{ top: scHight }" style="width: 750rpx; position: fixed; z-index: 100; left: 0">
<view class="flex-column-center" style="background-color: #fcfcfc; padding: 30rpx; border-radius: 10rpx">
<movable-area class="flex" style="width: 100%" animation="false" :style="{ height: originalHeight }">
<movable-view scale-value="1" animation="false" damping="5000" :x="moveX" :style="{
<view
v-if="!hid"
class="flex-row-center"
:style="{ top: scHight }"
style="width: 750rpx; position: fixed; z-index: 100; left: 0"
>
<view
class="flex-column-center"
style="background-color: #fcfcfc; padding: 30rpx; border-radius: 10rpx"
>
<movable-area
class="flex"
style="width: 100%"
animation="false"
:style="{ height: originalHeight }"
>
<movable-view
scale-value="1"
animation="false"
damping="5000"
:x="moveX"
:style="{
height: sliderHeight,
width: sliderWidth,
'z-index': 101,
}" direction="horizontal">
<image :src="imgbk" class="image" mode="aspectFit" :style="{
}"
direction="horizontal"
>
<image
:src="imgbk"
class="image"
mode="aspectFit"
:style="{
height: sliderHeight,
width: sliderWidth,
'margin-top': imgbKH,
}"></image>
}"
></image>
</movable-view>
<image :src="img" mode="aspectFit" :style="{ height: originalHeight, width: originalWidth }" style="border-radius: 10rpx"></image>
<image
:src="img"
mode="aspectFit"
:style="{ height: originalHeight, width: originalWidth }"
style="border-radius: 10rpx"
></image>
</movable-area>
<movable-area class="flex-row-start" style="
<movable-area
class="flex-row-start"
style="
width: 100%;
background-color: #efefef;
height: 80rpx;
border-radius: 40rpx;
margin-top: 30rpx;
">
<movable-view scale-value="1" animation="false" damping="50" :x="movePv" class="flex-row-center" style="
"
>
<movable-view
scale-value="1"
animation="false"
damping="50"
:x="movePv"
class="flex-row-center"
style="
border-radius: 50%;
height: 100rpx;
width: 100rpx;
background-color: #ffffff;
border: 2rpx solid #e3e3e3;
margin-top: -13rpx;
" direction="horizontal" @change="moveChange" @touchend="end">
<view :class="endLoad ? 'cuIcon-right' : 'cuIcon-loading turn-load'" class="loadIcon" style="">
</view>
"
direction="horizontal"
@change="moveChange"
@touchend="end"
>
<u-icon
:color="mainColor"
size="40"
v-if="endLoad"
name="arrow-right"
></u-icon>
<u-icon :color="mainColor" size="40" v-else name="reload"></u-icon>
</movable-view>
<text style="padding-left: 140rpx" :style="{ color: col }">{{
@@ -41,15 +89,20 @@
}}</text>
</movable-area>
<view class="flex-row-around padding-top" style="width: 100%">
<view @click="hide" class="cuIcon-close" style="font-size: 50rpx; color: #e25915">
</view>
<u-icon
@click="hide"
:color="mainColor"
size="40"
name="close"
></u-icon>
<text class="cu-tag bg-cyan round" @click="getCode">刷新拼图</text>
<text class="my-neirong-sm cuIcon-safe" style="color: #c1c1c1">Lili-FRAMEWORK</text>
<text class="my-neirong-sm cuIcon-safe" style="color: #c1c1c1"
>Lili-FRAMEWORK</text
>
</view>
</view>
</view>
</view>
</template>
@@ -90,6 +143,7 @@ export default {
},
data() {
return {
mainColor: this.$mainColor,
flage: false,
key: "", //key
vsrtx: "点击进行验证", //按钮提示语
@@ -144,7 +198,7 @@ export default {
storage.setUuid(uuid.v1());
}
uni.request({
url: api.common + "/slider/" + this.business,
url: api.common + "/common/slider/" + this.business,
header: {
uuid: storage.getUuid(),
},
@@ -179,7 +233,7 @@ export default {
method: "POST",
url:
api.common +
"/slider/" +
"/common/slider/" +
this.business +
"?xPos=" +
parseInt(this.moveCode * this.tl),
@@ -252,10 +306,6 @@ export default {
.border-index {
border: 1rpx solid $main-color;
}
.loadIcon {
color: $main-color;
font-size: 40rpx;
}
.status_bar {
height: var(--status-bar-height);

View File

@@ -4,8 +4,11 @@
*/
// 开发环境
const dev = {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
// common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn",
common: "http://192.168.111:8890",
buyer: "http://192.168.111:8888",
};
// 生产环境

View File

@@ -2,8 +2,8 @@
"name" : "lili商城",
"appid" : "__UNI__C100675",
"description" : "",
"versionName" : "4.0.47",
"versionCode" : 4000047,
"versionName" : "4.0.49",
"versionCode" : 4000049,
"transformPx" : false,
"app-plus" : {
"compatible" : {

View File

@@ -19,7 +19,8 @@
"path": "pages/tabbar/cart/cartList",
"style": {
"navigationBarTitleText": "购物车",
"navigationBarBackgroundColor": "#fff"
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh":true //实现下拉刷新样式
}
}, {
@@ -86,21 +87,14 @@
"style": {
"navigationBarTitleText": "我的足迹",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": {
"buttons": [{
"text": "编辑",
"fontSize": "14"
}]
}
}
"navigationStyle": "custom"
}
}, {
"path": "myCollect",
"style": {
"navigationBarTitleText": "收藏",
"enablePullDownRefresh": true, //下拉刷新
"navigationStyle": "custom",
"app-plus": {
"scrollIndicator": "none"
}
@@ -346,6 +340,12 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},{
"path": "shopList",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},{
"path": "licencePhoto",
"style": {
@@ -468,7 +468,6 @@
"style": {
"navigationBarTitleText": "拼团活动",
"navigationStyle": "custom", // 隐藏系统导航栏
"app-plus": {
// 将回弹属性关掉
"bounce": "none"

View File

@@ -28,7 +28,7 @@
<span v-if="item.scopeType == 'PORTION_CATEGORY'">仅限品类</span>
<view v-else>{{ item.storeName == 'platform' ? '全平台' :item.storeName+'店铺' }}使用</view>
</view>
<view>有效期至{{ item.endTime.split(" ")[0] }}</view>
<view v-if="item.endTime">有效期至:{{ item.endTime.split(" ")[0] }}</view>
</view>
<view class="receive" @click="receive(item)">
<text>点击</text><br />

View File

@@ -1,12 +1,22 @@
<template>
<div class="wrapper">
<u-tabs :list="list" :is-scroll="false" :active-color="lightColor" :current="current" @change="(i)=>{current = i}">
<u-tabs
:list="list"
:is-scroll="false"
:active-color="lightColor"
:current="current"
@change="
(i) => {
current = i;
}
"
>
</u-tabs>
<div class="empty" v-if="couponsList.length <= 0">
<u-empty text="暂无优惠券" mode="coupon"></u-empty>
</div>
<view class="coupon-item" v-for="(item, index) in couponsList" :key="index" >
<view class="coupon-item" v-for="(item, index) in couponsList" :key="index">
<view class="left">
<view class="wave-line">
<view class="wave" v-for="(item, index) in 12" :key="index"></view>
@@ -26,15 +36,27 @@
<view v-if="item.scopeType">
<span v-if="item.scopeType == 'ALL' && item.id == 'platform'">全平台</span>
<span v-if="item.scopeType == 'PORTION_CATEGORY'">仅限品类</span>
<view v-else>{{ item.storeName == 'platform' ? '全平台' :item.storeName+'店铺' }}使用</view>
<view v-else
>{{
item.storeName == "platform" ? "全平台" : item.storeName + "店铺"
}}使用</view
>
</view>
<view class="reason" v-if="item.reason">{{item.reason}}</view>
<view class="end-time">有效期至:{{item.endTime}}</view>
<view class="reason" v-if="item.reason">{{ item.reason }}</view>
<view class="end-time">有效期至:{{ item.endTime }}</view>
</view>
<view class="receive" v-if="current ==0" @click="clickWay(item)">
<view
class="receive"
v-if="current == 0 && !routerVal.selectedCoupon.includes(item.id)"
@click="clickWay(item)"
>
<text>立即</text><br />
<text>使用</text>
</view>
<view class="used" v-else @click="clickWay(item)">
<text>取消</text><br />
<text>使用</text>
</view>
<view class="bg-quan"></view>
</view>
</view>
@@ -69,9 +91,8 @@ export default {
routerVal: "", //上级传参
};
},
onLoad(options){
this.routerVal = options
onLoad(options) {
this.routerVal = options;
},
watch: {
current(val) {
@@ -84,6 +105,7 @@ export default {
mounted() {
this.init();
console.log(this.routerVal);
},
methods: {
@@ -99,7 +121,7 @@ export default {
clickWay(coupon) {
useCoupon({
memberCouponId: coupon.id,
used: true,
used: !this.routerVal.selectedCoupon.includes(coupon.id),
way: this.routerVal.way,
}).then((res) => {
if (res.data.success) {
@@ -237,6 +259,20 @@ export default {
z-index: 2;
}
.used {
color: #ffffff;
background-color: black;
border-radius: 50%;
width: 86rpx;
height: 86rpx;
text-align: center;
margin-right: 30rpx;
vertical-align: middle;
padding-top: 8rpx;
position: relative;
z-index: 2;
}
.bg-quan {
width: 244rpx;
height: 244rpx;

View File

@@ -116,6 +116,7 @@ export default {
},
onShow() {
this.navList[this.tabCurrentIndex].params.pageNumber = 1
this.navList[this.tabCurrentIndex].dataList = [];
this.getData();
},
@@ -187,13 +188,13 @@ export default {
* 立即使用优惠券
*/
useItNow(item) {
if (item.storeId) {
if (item.storeId && item.storeId!='platform') {
uni.navigateTo({
url: `/pages/product/shopPage?id=${item.storeId}`,
});
} else {
uni.switchTab({
url: "/pages/tabbar/home/index",
url: "/pages/navigation/search/searchPage",
});
}
},

View File

@@ -1,7 +1,12 @@
<template>
<view class="log-list">
<!-- 提现记录 -->
<view class="log-way" v-if="cashLogData.length != 0" v-for="(item, index) in cashLogData" :key="index">
<view
class="log-way"
v-if="cashLogData.length != 0"
v-for="(item, index) in cashLogData"
:key="index"
>
<view class="log-item">
<view class="log-item-view">
<view class="title">{{
@@ -20,21 +25,32 @@
</view>
</view>
<!-- 分销业绩 -->
<view class="log-way" v-if="achievementData.length != 0" v-for="(item, index) in achievementData" :key="index">
<view
class="log-way"
v-if="achievementData.length != 0"
v-for="(item, index) in achievementData"
:key="index"
>
<view class="log-item">
<view class="log-item-view">
<view class="title">{{item.goodsName}}</view>
<view class="price">+{{ item.rebate | unitPrice }}</view>
<view class="title">{{ item.goodsName }}</view>
<view class="price">提成金额+{{ item.rebate | unitPrice }}</view>
</view>
<view class="log-item-view">
<view>{{ item.createTime }}</view>
<view>{{item.storeName}}</view>
<view>创建时间{{ item.createTime }}</view>
<view>店铺{{ item.storeName }}</view>
</view>
<view class="log-item-footer">
<view>会员名称{{ item.memberName }}</view>
<view>订单金额{{ item.flowPrice | unitPrice }}</view>
</view>
<view class="log-item-footers">
<view>订单号{{ item.orderSn }}</view>
</view>
</view>
</view>
<view class="empty" v-if="empty">
<u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" />
</view>
</view>
</template>
@@ -86,7 +102,7 @@ export default {
});
distributionOrderList(this.achParams).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) {
this.achievementData = res.data.result.records;
this.achievementData.push(...res.data.result.records);
} else {
this.status = "nomore";
this.empty = true;
@@ -101,7 +117,7 @@ export default {
});
cashLog(this.params).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) {
this.cashLogData = res.data.result.records;
this.cashLogData.push(...res.data.result.records);
} else {
this.status = "nomore";
this.empty = true;
@@ -139,6 +155,19 @@ export default {
.log-item-view {
padding: 8rpx 32rpx;
display: flex;
font-size: 13px;
justify-content: space-between;
}
.log-item-footer {
padding: 8rpx 32rpx;
display: flex;
font-size: 13px;
justify-content: space-between;
}
.log-item-footers {
padding: 8rpx 32rpx;
display: flex;
font-size: 13px;
justify-content: space-between;
}
</style>

View File

@@ -1,56 +1,53 @@
<template>
<view class="content">
<view class="navbar">
<!-- 循环出顶部nav栏 -->
<view v-for="(item, index) in navList" :key="index" class="nav-item" @click="tabClick(index)">
<text :class="{current: tabCurrentIndex === index}">{{item.text}}</text>
</view>
</view>
<u-navbar>
<u-tabs :active-color="lightColor" class="slot-wrap" :list="navList" count="count" :is-scroll="true" :current="tabCurrentIndex" @change="tabClick"></u-tabs>
</u-navbar>
<view class="swiper-box">
<!-- 显示商品栏 -->
<view v-if="tabCurrentIndex == 0" class="tab-content">
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadMore">
<scroll-view class="list-scroll-content" scroll-y>
<!-- 空白页 -->
<u-empty style="margin-top:40rpx;" text="暂无收藏商品数据" mode="favor" v-if="goodsEmpty"></u-empty>
<u-empty style="margin-top: 40rpx" text="暂无收藏商品数据" mode="favor" v-if="goodsEmpty"></u-empty>
<!-- 商品展示数据 -->
<u-swipe-action @open="openLeftChange(item,index,'goods')" :show="item.selected" btn-width="180"
:options="LeftOptions" v-else v-for="(item,index) in goodList" @click="clickGoodsSwiperAction(item,index)"
:index="index" :key="index">
<u-swipe-action @open="openLeftChange(item, index, 'goods')" :show="item.selected" btn-width="180"
:options="LeftOptions" v-else v-for="(item, index) in goodList"
@click="clickGoodsSwiperAction(item, index)" :index="index" :key="index">
<view class="goods" @click="goGoodsDetail(item)">
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>
<view class="goods-intro">
<view>{{item.goodsName}}</view>
<view class="goods-sn">{{item.goods_sn}}</view>
<view>{{item.price | unitPrice}}</view>
<view>{{ item.goodsName }}</view>
<view class="goods-sn">{{ item.goods_sn }}</view>
<view>{{ item.price | unitPrice }}</view>
</view>
</view>
</u-swipe-action>
<uni-load-more :status="goodsLoad"></uni-load-more>
</scroll-view>
</view>
<!-- 显示收藏的店铺栏 -->
<view v-else class="tab-content">
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadMore">
<scroll-view class="list-scroll-content" scroll-y>
<!-- 空白页 -->
<u-empty style="margin-top:40rpx;" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
<u-empty style="margin-top: 40rpx" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
<!-- 店铺展示数据 -->
<u-swipe-action @open="openLeftChange(item,'store')" :show="item.selected" btn-width="180"
:options="LeftOptions" v-else v-for="(item,index) in storeList" :key="index"
@click="clickstoreSwiperAction(item)">
<view class="store" @click="gostoreMainPage(item.id)">
<u-swipe-action @open="openLeftChange(item, 'store')" :show="item.selected" btn-width="180"
:options="LeftOptions" v-else v-for="(item, index) in storeList" :key="index"
@click="clickStoreSwiperAction(item)">
<view class="store" @click="goStoreMainPage(item.id)">
<view class="intro">
<view class="store-logo">
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName" mode="aspectFit">
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>
</view>
<view class="store-name">
<view>{{item.storeName}}</view>
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated" text="自营" mode="plain"
shape="circle" />
<view>{{ item.storeName }}</view>
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
text="自营" mode="plain" shape="circle" />
</view>
<view class="store-collect">
<view>进店逛逛</view>
@@ -58,7 +55,6 @@
</view>
</view>
</u-swipe-action>
<uni-load-more :status="storeLoad"></uni-load-more>
</scroll-view>
</view>
</view>
@@ -66,45 +62,43 @@
</template>
<script>
import {
import {
getGoodsCollection,
deleteGoodsCollection,
deleteStoreCollection,
} from "@/api/members.js";
export default {
} from "@/api/members.js";
export default {
data() {
return {
lightColor:this.$lightColor,
// 商品左滑侧边栏
LeftOptions: [
{
LeftOptions: [{
text: "取消",
style: {
backgroundColor: this.$lightColor,
},
},
],
}, ],
tabCurrentIndex: 0, //tab的下标默认为0也就是说会默认请求商品
navList: [
//tab显示数据
{
text: "商品(0)",
loadingType: "more",
name: "商品(0)",
params: {
pageNumber: 1,
pageSize: 10,
},
},
{
text: "店铺(0)",
loadingType: "more",
name: "店铺(0)",
params: {
pageNumber: 1,
pageSize: 10,
},
},
],
goodsLoad: "more", //商品加载
storeLoad: "more", //店铺加载
goodsEmpty: false, //商品数据是否为空
storeEmpty: false, //店铺数据是否为空
goodList: [], //商品集合
@@ -113,7 +107,16 @@ export default {
},
onLoad() {
this.getGoodList();
this.getstoreList();
this.getStoreList();
},
onReachBottom() {
if (this.tabCurrentIndex == 0) {
this.navList[0].params.pageNumber++;
this.getGoodList();
} else {
this.navList[1].params.pageNumber++;
this.getStoreList();
}
},
methods: {
@@ -121,7 +124,10 @@ export default {
* 打开商品左侧取消收藏
*/
openLeftChange(val, type) {
const { goodList, storeList } = this;
const {
goodList,
storeList
} = this;
let way;
type == "goods" ? (way = goodList) : (way = storeList);
way.forEach((item) => {
@@ -147,11 +153,11 @@ export default {
/**
* 点击店铺左侧取消收藏
*/
clickstoreSwiperAction(val) {
clickStoreSwiperAction(val) {
deleteStoreCollection(val.storeId).then((res) => {
if (res.statusCode == 200) {
this.storeList = [];
this.getstoreList();
this.getStoreList();
}
});
},
@@ -176,7 +182,7 @@ export default {
/**
* 查看店铺详情
*/
gostoreMainPage(id) {
goStoreMainPage(id) {
//店铺主页
uni.navigateTo({
url: "/pages/product/shopPage?id=" + id,
@@ -196,7 +202,8 @@ export default {
if (res.data.success) {
let data = res.data.result;
data.selected = false;
this.navList[0].text = `商品(${data.total})`;
this.navList[0].name = `商品(${data.total})`;
if (data.total == 0) {
this.goodsEmpty = true;
} else if (data.total < 10) {
@@ -213,7 +220,7 @@ export default {
/**
* 获取店铺集合
*/
getstoreList() {
getStoreList() {
uni.showLoading({
title: "加载中",
});
@@ -223,32 +230,16 @@ export default {
if (res.data.success) {
let data = res.data.result;
data.selected = false;
this.navList[1].text = `店铺(${data.total})`;
this.navList[1].name = `店铺(${data.total})`;
if (data.total == 0) {
this.storeEmpty = true;
} else if (data.total < 10) {
this.storeLoad = "noMore";
this.storeList.push(...data.records);
} else {
this.storeList.push(...data.records);
if (data.total.length < 10) this.storeLoad = "noMore";
}
}
});
},
/**
* 底部加载更多
*/
loadMore() {
if (this.tabCurrentIndex == 0) {
this.navList[0].params.pageNumber++;
this.getGoodList();
} else {
this.navList[1].params.pageNumber++;
this.getstoreList();
}
},
},
/**
@@ -262,35 +253,44 @@ export default {
} else {
this.navList[1].params.pageNumber = 1;
this.storeList = [];
this.getstoreList();
this.getStoreList();
}
},
};
};
</script>
<style lang="scss">
page,
.content {
page,
.content {
background: $page-color-base;
height: 100%;
}
.content {
width: 100%;
overflow: hidden;
}
.swiper-box {
overflow-y: auto;
}
}
.list-scroll-content {
.slot-wrap{
flex: 1;
display: flex;
justify-content: center;
padding-right: 72rpx;
}
.content {
width: 100%;
}
.swiper-box {
overflow-y: auto;
}
.list-scroll-content {
height: 100%;
width: 100%;
}
}
/deep/ .u-swipe-content {
/deep/ .u-swipe-content {
overflow: hidden;
}
.goods {
}
.goods {
background-color: #fff;
border-bottom: 1px solid $border-color-light;
height: 190rpx;
@@ -298,11 +298,13 @@ page,
align-items: center;
padding: 30rpx 20rpx;
margin-top: 20rpx;
image {
width: 131rpx;
height: 131rpx;
border-radius: 10rpx;
}
.goods-intro {
flex: 1;
font-size: $font-base;
@@ -316,14 +318,17 @@ page,
overflow: hidden;
color: #666;
}
view:nth-child(2) {
color: #cccccc;
font-size: 24rpx;
}
view:nth-child(3) {
color: $light-color;
}
}
button {
color: $main-color;
height: 50rpx;
@@ -333,16 +338,19 @@ page,
line-height: 50rpx;
background-color: #ffffff;
margin-top: 80rpx;
&::after {
border-color: $main-color;
}
}
}
.store {
}
.store {
background-color: #fff;
border: 1px solid $border-color-light;
border-radius: 16rpx;
margin: 20rpx 10rpx;
.intro {
display: flex;
justify-content: space-between;
@@ -355,36 +363,43 @@ page,
height: 102rpx;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.store-name {
flex: 1;
margin-left: 30rpx;
line-height: 2em;
:first-child {
font-size: $font-base;
}
:last-child {
font-size: $font-sm;
color: #999;
}
}
.store-collect {
border-left: 1px solid $border-color-light;
padding-left: 20rpx;
text-align: center;
:last-child {
color: #999;
font-size: $font-sm;
}
}
}
}
.navbar {
}
.navbar {
display: flex;
height: 40px;
padding: 0 5px;
@@ -392,6 +407,7 @@ page,
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
position: relative;
z-index: 10;
.nav-item {
flex: 1;
display: flex;
@@ -403,10 +419,12 @@ page,
text {
position: relative;
}
text.current {
color: $light-color;
font-weight: bold;
font-size: 28rpx;
&::after {
content: "";
position: absolute;
@@ -418,5 +436,5 @@ page,
}
}
}
}
}
</style>

View File

@@ -1,5 +1,10 @@
<template>
<view class="myTracks">
<u-navbar title="我的足迹">
<div @click="changeRightBtn" slot="right" style="margin-right:32rpx">
{{edit}}
</div>
</u-navbar>
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else>
<view v-for="(item, index) in trackList" :key="index">
@@ -30,7 +35,6 @@
<uni-load-more :status="loadStatus"></uni-load-more>
</div>
<view v-if="editFlag">
<view class="myTracks-action-placeholder"></view>
<view class="myTracks-action">
<view class="myTracks-action-check">
<u-checkbox-group>
@@ -41,7 +45,7 @@
</view>
<view>
<u-button type="warning" plain="true" @click="delAllTracks" class="myTracks-action-btn">
<u-button type="warning" @click="delAllTracks" class="myTracks-action-btn">
删除
</u-button>
</view>
@@ -56,6 +60,7 @@ import { myTrackList, deleteHistoryListId } from "@/api/members.js";
export default {
data() {
return {
edit: "编辑",
editFlag: false, //是否编辑
allChecked: false, //是否全选
loadStatus: "more", //底部下拉加载状态
@@ -165,11 +170,31 @@ export default {
/**
* 点击后判断是不是全选
*/
changeChecked(val) {
var opt = null;
const isCheckedAll = this.trackList.every((key) => {
return key.___isDel == val.___isDel;
key.___isDel == val.___isDel;
opt = key.___isDel;
return opt;
});
if(opt){
this.allChecked = isCheckedAll;
}else{
this.allChecked = false;
}
},
/**
* 右侧标签栏切换
*/
changeRightBtn(e) {
if (!this.editFlag) {
this.edit = "完成";
} else {
this.edit = "编辑";
}
this.editFlag = !this.editFlag;
},
/**
@@ -208,18 +233,6 @@ export default {
});
},
},
/**
* 右侧标签栏切换
*/
onNavigationBarButtonTap(e) {
if (!this.editFlag) {
this.setStyle("完成");
} else {
this.setStyle("编辑");
}
this.editFlag = !this.editFlag;
},
};
</script>
@@ -292,6 +305,18 @@ export default {
color: $light-color;
padding: 10rpx 0 0 0;
}
.myTracks-action{
display: flex;
justify-content: space-between;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
height: 75rpx;
align-items: center;
padding: 0 32rpx;
}
.myTracks-action-btn {
width: 130rpx;
@@ -304,9 +329,7 @@ export default {
height: 20rpx;
}
.myTracks-action-placeholder {
height: 110rpx;
}
.myTracks-action-check {
align-items: center;

View File

@@ -355,6 +355,9 @@ export default {
this.params.categoryId = this.routerVal.category;
this.sortParams.categoryId = this.routerVal.category;
this.isShowSeachGoods = true;
this.$nextTick(()=>{
this.$refs.mSearch.isShowSeachGoods = true;
})
}
if (this.routerVal.keyword) {
this.params.keyword = this.routerVal.keyword;

View File

@@ -68,17 +68,19 @@
<view class="cannot_apply" v-if="order.serviceType == 'CANCEL'">
取消订单-{{ order.serviceStatus | serviceStatusList }}</view>
</div>
<!-- 申请记录 -->
</view>
<view class="after-line">
<!-- 售后申请 -->
<view v-if="
current === 0 && order.groupAfterSaleStatus.includes('NOT_APPLIED')
" @click="applyService(sku.sn, order, sku)" class="rebuy-btn">
<div v-if="current === 0 && sku.afterSaleStatus && (sku.afterSaleStatus.includes('NOT_APPLIED') || sku.afterSaleStatus.includes('PART_AFTER_SALE')) " @click="applyService(sku.sn, order, sku)" class="sale">
<view class=" default-btn border" >
申请售后
</view>
</div>
<view class="after-line">
<!-- 申请中 -->
<view class="rebuy-btn" v-if="
<view class="default-btn border" v-if="
current === 2 &&
order.serviceStatus &&
order.serviceStatus == 'PASS' &&
@@ -86,7 +88,10 @@
" @click="onExpress(order, sku)">
提交物流
</view>
<view @click="afterDetails(order, sku)" v-if="current === 1 || current === 2" class="rebuy-btn">
<view @click="close(order,sku)" v-if="current === 1" class="default-btn close">
取消售后
</view>
<view @click="afterDetails(order, sku)" v-if="current === 1 || current === 2" class="default-btn border">
售后详情
</view>
</view>
@@ -105,14 +110,16 @@
</view>
<u-loadmore bg-color="#f8f8f8" :status="status" />
</scroll-view>
<u-modal show-cancel-button @confirm="closeService" v-model="cancelShow" content="确认取消售后"></u-modal>
<u-modal v-model="tipsShow" content="当订单未确认收货|已过售后服务有效期|已申请售后服务时,不能申请售后"></u-modal>
</view>
</template>
<script>
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
import { getAfterSaleList } from "@/api/after-sale.js";
import { getAfterSaleList, cancelAfterSale } from "@/api/after-sale.js";
import { getOrderList } from "@/api/order.js";
import storage from "@/utils/storage";
export default {
components: {
@@ -134,11 +141,14 @@ export default {
],
current: 0, //当前表头索引
tipsShow: false, //提示开关
cancelShow: false, //取消显示开关
selectedOrder: "", //选中的order
orderList: [], //订单集合
params: {
pageNumber: 1,
pageSize: 10,
sort: "createTime",
flowPrice: 1,
order: "desc",
},
@@ -202,12 +212,12 @@ export default {
});
getOrderList(this.params).then((res) => {
uni.hideLoading();
const orderlist = res.data.result.records;
if (orderlist.length > 0) {
this.orderList = this.orderList.concat(orderlist);
const orderList = res.data.result.records;
if (orderList.length > 0) {
this.orderList = this.orderList.concat(orderList);
this.params.pageNumber += 1;
}
if (orderlist.length < 10) {
if (orderList.length < 10) {
this.status = "nomore";
} else {
this.status = "loading";
@@ -215,6 +225,31 @@ export default {
});
},
close(order, sku) {
console.log(order, sku);
this.selectedOrder = order;
this.cancelShow = true;
},
async closeService() {
uni.showLoading({
title: "加载中",
});
console.log(this.selectedOrder);
let res = await cancelAfterSale(this.selectedOrder.sn);
if (res.data.success) {
uni.showToast({
title: "取消成功!",
duration: 2000,
icon: "none",
});
}
this.orderList = [];
this.getOrderList(this.current);
uni.hideLoading();
},
/**
* 售后详情
*/
@@ -261,11 +296,9 @@ export default {
...order,
...sku,
};
storage.setAfterSaleData(data);
uni.navigateTo({
url: `/pages/order/afterSales/afterSalesSelect?sn=${sn}&sku=${encodeURIComponent(
JSON.stringify(data)
)}`,
url: `/pages/order/afterSales/afterSalesSelect?sn=${sn}`,
});
},
@@ -275,10 +308,9 @@ export default {
onExpress(order, sku) {
sku.storeName = order.storeName;
storage.setAfterSaleData(data);
uni.navigateTo({
url: `./afterSalesDetailExpress?serviceSn=${
order.sn
}&sku=${encodeURIComponent(JSON.stringify(sku))}`,
url: `./afterSalesDetailExpress?serviceSn=${order.sn}`,
});
},
@@ -324,6 +356,7 @@ page,
background: $page-color-base;
height: 100%;
}
.body-view {
overflow-y: auto;
height: calc(100vh - 44px - 80rpx - 104rpx);
@@ -420,28 +453,27 @@ page,
.icon {
margin-right: 10rpx;
}
.cancel-btn {
color: #999999;
border-color: #999999;
margin-left: 15rpx;
height: 60rpx;
.sale {
width: 100%;
display: flex;
justify-content: flex-end;
}
.pay-btn {
background-color: #1abc9c;
color: #ffffff;
margin-left: 15rpx;
height: 60rpx;
}
.rebuy-btn {
.default-btn {
background-color: #ffffff;
margin-left: 15rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: 24rpx;
border: 2rpx solid $light-color;
color: $light-color;
padding: 0 24rpx;
border-radius: 200px;
}
.close {
color: $light-color;
}
.border {
border: 2rpx solid $light-color;
color: $light-color;
}
</style>

View File

@@ -195,9 +195,7 @@ export default {
title: navTitle, //此处写页面的title
});
this.sn = options.sn;
let dsku = decodeURIComponent(options.sku);
let newSku = JSON.parse(dsku);
this.sku = newSku;
this.sku = storage.getAfterSaleData();;
this.form.orderItemSn = options.sn;
this.form.skuId = this.sku.skuId;
@@ -312,6 +310,7 @@ export default {
return false;
}
console.log(this.form.accountType)
if (this.form.accountType == "BANK_TRANSFER") {
// 银行开户行校验
if (this.$u.test.isEmpty(this.form.bankDepositName)) {

View File

@@ -57,6 +57,7 @@
<script>
import { getLogistics } from "@/api/address.js";
import { fillShipInfo } from "@/api/after-sale.js";
import storage from "@/utils/storage";
export default {
data() {
@@ -76,7 +77,8 @@ export default {
};
},
onLoad(options) {
this.sku = JSON.parse(decodeURIComponent(options.sku));
this.sku = storage.getAfterSaleData();
let navTitle = "服务单详情";
uni.setNavigationBarTitle({
title: navTitle, //此处写页面的title

View File

@@ -56,6 +56,7 @@
<script>
import { getAfterSaleInfo } from "@/api/after-sale";
import storage from "@/utils/storage";
export default {
data() {
return {
@@ -66,10 +67,7 @@ export default {
},
onLoad(options) {
this.sn = options.sn;
let dData = decodeURIComponent(options.sku);
let newData = JSON.parse(dData);
this.sku = newData;
this.sku = storage.getAfterSaleData();
// 查看当前商品是否支持退款退货
this.init()
},
@@ -88,9 +86,7 @@ export default {
*/
onSelect(value) {
uni.redirectTo({
url: `./afterSalesDetail?sn=${this.sn}&sku=${encodeURIComponent(
JSON.stringify(this.sku)
)}&value=${value}`,
url: `./afterSalesDetail?sn=${this.sn}&value=${value}`,
});
},

View File

@@ -90,9 +90,10 @@
serviceDetail.afterSaleImage &&
serviceDetail.afterSaleImage.split(',').length != 0
">
<image :src="img" @click="preview(serviceDetail.afterSaleImage.split(','), index)"
v-for="(img, index) in serviceDetail.afterSaleImage.split(',')" :key="index"
style="width: 50px; height: 50px; margin: 0px 5px"></image>
<view v-for="(img, index) in serviceDetail.afterSaleImage.split(',')" :key="index">
<u-image width="100" height="100" :src="img" @click="preview(serviceDetail.afterSaleImage.split(','), index)"
></u-image>
</view>
</view>
<!-- 如果服务类型为退款则不显示 -->
<view class="detail-item"
@@ -197,7 +198,7 @@
<script>
import {
getServiceDetail,
getstoreAfterSaleAddress,
getStoreAfterSaleAddress,
getAfterSaleLog,
getAfterSaleReason,
} from "@/api/after-sale.js";
@@ -315,7 +316,7 @@ export default {
* 获取地址信息
*/
getAddress() {
getstoreAfterSaleAddress(this.sn).then((res) => {
getStoreAfterSaleAddress(this.sn).then((res) => {
if (res.data.success) {
this.storeAfterSaleAddress = res.data.result;
}

View File

@@ -45,7 +45,7 @@
<view class="cell-item">
<view class="cell-title"> 投诉凭证 </view>
<view class="cell-view">
<u-upload ref="uUpload" :header=" { accessToken: storage.getAccessToken() }" upload-text="" :show-progress="false" :action="action" width="100" @on-uploaded="onUploaded" :max-count="5">
<u-upload ref="uUpload" :header=" { accessToken: storage.getAccessToken() }" upload-text="" :action="action" width="100" @on-uploaded="onUploaded" :max-count="5">
</u-upload>
</view>
</view>

View File

@@ -11,8 +11,12 @@
<div class="flex flex-a-c">
<span class="default" v-if="address.isDefault">默认</span>
<div class="address-list" v-if="address.consigneeAddressPath.length != 0">
<span class="address-item" v-for="(item,index) in address.consigneeAddressPath" :key="index">
{{item}}
<span
class="address-item"
v-for="(item, index) in address.consigneeAddressPath"
:key="index"
>
{{ item }}
</span>
</div>
</div>
@@ -38,23 +42,46 @@
<view class="group-box" v-if="isAssemble">
<view class="group-title">
<span v-if="pintuanFlage">你正在开团购买</span>
<span v-else>为你加入仅差<span>{{routerVal.parentOrder.toBeGroupedNum }}</span>人的团购买</span>
<span v-else
>为你加入仅差<span>{{ routerVal.parentOrder.toBeGroupedNum }}</span
>人的团购买</span
>
</view>
<view class="group">
<view>
<u-image borderRadius="50%" shape="square" class="head-img" width="81rpx" height="81rpx"
:src="masterWay.face || '/static/missing-face.png'"></u-image>
<u-image
borderRadius="50%"
shape="square"
class="head-img"
width="81rpx"
height="81rpx"
:src="masterWay.face || '/static/missing-face.png'"
></u-image>
<view class="btn-one">团长</view>
</view>
<view class="line"> </view>
<view>
<!-- 如果有最后一名显示最后一名没有最后一名显示等待参团 -->
<u-image class="head-img" v-if="endWay.face" :src="endWay.face" borderRadius="50%" shape="square"
width="81rpx" height="81rpx">
<u-image
class="head-img"
v-if="endWay.face"
:src="endWay.face"
borderRadius="50%"
shape="square"
width="81rpx"
height="81rpx"
>
<view slot="loading"></view>
</u-image>
<u-image class="head-img" borderRadius="50%" shape="square" v-else width="81rpx" height="81rpx"
:src="endWay.face || '/static/missing-face.png'"></u-image>
<u-image
class="head-img"
borderRadius="50%"
shape="square"
v-else
width="81rpx"
height="81rpx"
:src="endWay.face || '/static/missing-face.png'"
></u-image>
<view class="wait">{{ endWay.nickname || "等待参团" }}</view>
</view>
@@ -68,43 +95,88 @@
<span>{{ item.storeName }}</span>
</div>
</div>
<div class="promotionNotice">{{ item.promotionNotice || '' }}</div>
<div class="promotionNotice">{{ item.promotionNotice || "" }}</div>
<div class="flex goods-item" v-for="(val, i) in item.skuList" :key="i">
<div class="goods-image"
@click="navigateTo('/pages/product/goods?id=' + val.goodsSku.id+'&goodsId='+val.goodsSku.goodsId)" :span="3">
<u-image borderRadius="10rpx" width="200rpx" height="200rpx" :src="val.goodsSku.thumbnail" alt />
<div
class="goods-image"
@click="
navigateTo(
'/pages/product/goods?id=' +
val.goodsSku.id +
'&goodsId=' +
val.goodsSku.goodsId
)
"
:span="3"
>
<u-image
borderRadius="10rpx"
width="200rpx"
height="200rpx"
:src="val.goodsSku.thumbnail"
alt
/>
</div>
<div @click="navigateTo('/pages/product/goods?id=' + val.goodsSku.id+'&goodsId='+val.goodsSku.goodsId)"
class="goods-detail">
<div
@click="
navigateTo(
'/pages/product/goods?id=' +
val.goodsSku.id +
'&goodsId=' +
val.goodsSku.goodsId
)
"
class="goods-detail"
>
<div class="flex">
<p class="goods-name">{{ val.goodsSku.goodsName }}</p>
<span class="nums">x{{ val.num }}</span>
</div>
<p class="goods-prices">
<span></span>
<span class="goods-price">{{formatPrice(val.goodsSku.price)[0]}}</span>
<span>.{{formatPrice(val.goodsSku.price)[1] }}</span>
<span class="goods-price">{{ formatPrice(val.goodsSku.price)[0] }}</span>
<span>.{{ formatPrice(val.goodsSku.price)[1] }}</span>
</p>
</div>
</div>
<u-row>
<u-col :offset="0" :span="4">发票信息</u-col>
<u-col :span="8" class="tipsColor" textAlign="right" @click.native="invoice()">
<span v-if="receiptList">{{receiptList.receiptTitle}} - {{receiptList.receiptContent}}</span>
<span v-if="receiptList"
>{{ receiptList.receiptTitle }} - {{ receiptList.receiptContent }}</span
>
<span v-else>不开发票</span>
</u-col>
</u-row>
<u-row>
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :offset="0" :span="9" @click="shippingFlag = true">配送
<u-col
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
:offset="0"
:span="9"
@click="shippingFlag = true"
>配送
</u-col>
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="3" textAlign="right" @click="shippingFlag = true">
{{shippingMethod.find(e=>{ return e.value == shippingText; }).label }}
<u-col
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
:span="3"
textAlign="right"
@click="shippingFlag = true"
>
{{
shippingMethod.find((e) => {
return e.value == shippingText;
}).label
}}
</u-col>
</u-row>
<u-row>
<u-col :offset="0" :span="4" class="tl" style="text-align: left">备注信息</u-col>
<u-col :span="8" textAlign="right">
<u-input style="text-align:right;" class="uinput" v-model="remarkVal[index].remark" />
<u-input
style="text-align: right"
class="uinput"
v-model="remarkVal[index].remark"
/>
</u-col>
</u-row>
</div>
@@ -125,20 +197,31 @@
<div>
<u-row>
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7">运费</u-col>
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right">
<u-col
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
:span="5"
class="tr tipsColor"
textAlign="right"
>
<span v-if="orderMessage.priceDetailDTO.freightPrice == 0">包邮</span>
<span v-else>{{
orderMessage.priceDetailDTO.freightPrice | unitPrice
}}</span>
<span v-else
>{{ orderMessage.priceDetailDTO.freightPrice | unitPrice }}</span
>
</u-col>
</u-row>
</div>
<u-row>
<u-col :offset="0" :span="9" @click="GET_Discount()">优惠券</u-col>
<u-col :span="3" v-if="orderMessage.priceDetailDTO && orderMessage.priceDetailDTO.couponPrice" textAlign="right"
@click="GET_Discount()">
<span class="main-color">-{{orderMessage.priceDetailDTO.couponPrice | unitPrice}}</span>
<u-col
:span="3"
v-if="orderMessage.priceDetailDTO && orderMessage.priceDetailDTO.couponPrice"
textAlign="right"
@click="GET_Discount()"
>
<span class="main-color"
>-{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span
>
</u-col>
<!-- orderMessage.priceDetailDTO.couponPrice | unitPrice -->
<u-col :span="3" v-else textAlign="right" @click="GET_Discount()">
@@ -149,8 +232,15 @@
<div>
<u-row>
<u-col :span="9">优惠金额</u-col>
<u-col :span="3" textAlign="right" v-if=" orderMessage.priceDetailDTO.couponPrice">
<span class="main-color"> -{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span></u-col>
<u-col
:span="3"
textAlign="right"
v-if="orderMessage.priceDetailDTO.couponPrice"
>
<span class="main-color">
-{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span
></u-col
>
<u-col :span="3" textAlign="right" v-else>0.00</u-col>
</u-row>
</div>
@@ -158,18 +248,23 @@
<u-row>
<u-col :span="6">活动优惠</u-col>
<u-col :span="6" class="tr tipsColor" textAlign="right">
<span
v-if="orderMessage.priceDetailDTO.discountPrice">-{{orderMessage.priceDetailDTO.discountPrice | unitPrice}}</span>
<span v-if="orderMessage.priceDetailDTO.discountPrice"
>-{{ orderMessage.priceDetailDTO.discountPrice | unitPrice }}</span
>
<span v-else>0.00</span>
</u-col>
</u-row>
</div>
</div>
<!-- 配送地区没有提示 -->
<div class="notSupportFreight" v-if="notSupportFreight.length !=0">
<u-notice-bar style="width:100%" :volume-icon="false" mode="horizontal" :list="notSupportFreightGoodsList">
<div class="notSupportFreight" v-if="notSupportFreight.length != 0">
<u-notice-bar
style="width: 100%"
:volume-icon="false"
mode="horizontal"
:list="notSupportFreightGoodsList"
>
</u-notice-bar>
</div>
@@ -179,11 +274,17 @@
<div class="tabbar-left">
<div v-if="!orderMessage.priceDetailDTO.payPoint" class="number">
<span>¥</span>
<span class="price">{{ formatPrice(orderMessage.priceDetailDTO.flowPrice)[0] }}</span>
<span>.{{formatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }} </span>
<span class="price">{{
formatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
}}</span>
<span>.{{ formatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }} </span>
</div>
<span v-else class="number"><span
style="margin-right:10rpx;">{{orderMessage.priceDetailDTO.payPoint | unitPrice }}</span>积分</span>
<span v-else class="number"
><span style="margin-right: 10rpx">{{
orderMessage.priceDetailDTO.payPoint | unitPrice
}}</span
>积分</span
>
</div>
<div class="navRiv" @click="createTradeFun()">
<!-- #ifndef MP-WEIXIN -->
@@ -192,7 +293,6 @@
<!-- #ifdef MP-WEIXIN -->
<div class="tabbar-right">微信支付</div>
<!-- #endif -->
</div>
</div>
</div>
@@ -348,9 +448,7 @@ export default {
this.navigateTo(
`/pages/mine/address/address?from=cart&way=${
this.routerVal.way
}&parentOrder=${encodeURIComponent(
JSON.stringify(this.routerVal.parentOrder)
)}`
}&parentOrder=${encodeURIComponent(JSON.stringify(this.routerVal.parentOrder))}`
);
},
@@ -378,6 +476,18 @@ export default {
// 循环店铺id,商品id获取优惠券
let store = [];
let skus = [];
let selectedCoupon = [];
if (this.orderMessage.platformCoupon)
selectedCoupon.push(this.orderMessage.platformCoupon.memberCoupon.id);
if (
this.orderMessage.storeCoupons &&
Object.keys(this.orderMessage.storeCoupons)[0]
) {
let storeMemberCouponsId = Object.keys(this.orderMessage.storeCoupons)[0];
let storeCouponId = this.orderMessage.storeCoupons[storeMemberCouponsId]
.memberCoupon.id;
selectedCoupon.push(storeCouponId);
}
this.orderMessage.cartList.forEach((item) => {
item.skuList.forEach((sku) => {
store.push(sku.storeId);
@@ -391,7 +501,7 @@ export default {
data: this.orderMessage.priceDetailDTO.goodsPrice,
});
this.navigateTo(
`/pages/cart/coupon/index?way=${this.routerVal.way}&storeId=${store}&skuId=${skus}`
`/pages/cart/coupon/index?way=${this.routerVal.way}&storeId=${store}&skuId=${skus}&selectedCoupon=${selectedCoupon}`
);
},
@@ -498,8 +608,9 @@ export default {
// 如果没有商品选择地址的话 则选择 默认地址
API_Address.getAddressDefault().then((res) => {
if (res.data.result) {
res.data.result.consigneeAddressPath =
res.data.result.consigneeAddressPath.split(",");
res.data.result.consigneeAddressPath = res.data.result.consigneeAddressPath.split(
","
);
this.address = res.data.result;
}
});
@@ -507,9 +618,14 @@ export default {
// 获取结算参数
getOrderList() {
this.notSupportFreight = []
this.notSupportFreight = [];
// 获取结算参数
API_Trade.getCheckoutParams(this.routerVal.way).then((res) => {
if (res.data.result.skuList.length <= 0) {
uni.redirectTo({
url: "/pages/order/myOrder?status=0",
});
}
res.data.result.cartList.forEach((item, index) => {
this.remarkVal[index] = {
remark: item.remark,
@@ -529,8 +645,9 @@ export default {
this.getUserAddress();
} else {
this.address = res.data.result.memberAddress;
res.data.result.memberAddress.consigneeAddressPath =
res.data.result.memberAddress.consigneeAddressPath.split(",");
res.data.result.memberAddress.consigneeAddressPath = res.data.result.memberAddress.consigneeAddressPath.split(
","
);
}
if (

View File

@@ -324,7 +324,7 @@ export default {
},
gotoGoodsDetail(sku) {
uni.navigateTo({
url: `/pages/product/goods?id=${sku.id}&goodsId=${sku.goodsId}`,
url: `/pages/product/goods?id=${sku.skuId}&goodsId=${sku.goodsId}`,
});
},
onCopy(sn) {

View File

@@ -35,7 +35,7 @@
<!-- 循环出当前可使用的第三方登录模式 -->
<div class="flex login-list">
<div :style="{background:item.color}" class="login-item" v-for="(item,index) in loginList" :key="index">
<div v-if="item.code" :style="{background:item.color}" class="login-item" v-for="(item,index) in loginList" :key="index">
<u-icon v-if="item.title!='APPLE'" color="#fff" size="42" :name="item.icon" @click="navigateLogin(item)">
</u-icon>
<u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)" width="80"
@@ -438,7 +438,6 @@ export default {
storage.setHasLogin(false);
storage.setAccessToken("");
storage.setRefreshToken("");
storage.setUuid(this.uuid.v1());
storage.setUserInfo({});
/**
* 执行登录
@@ -636,7 +635,8 @@ page {
position: absolute;
bottom: 20px;
align-items: center;
justify-content: space-around;
justify-content: center;
}
.login-item {
@@ -647,5 +647,8 @@ page {
display: flex;
justify-content: center;
align-items: center;
margin: 0 20rpx;
}
</style>

View File

@@ -1,31 +1,60 @@
<template>
<div class="main-page">
<!-- #ifdef APP-PLUS -->
<view class="status_bar"></view>
<!-- #endif -->
<!-- 仅h5有效 打开App -->
<!-- 分享 -->
<shares v-if="shareFlage && goodsDetail.id" :skuId="this.routerVal.id" :goodsId="this.routerVal.goodsId"
:link="'/pages/product/goods?id='+this.routerVal.id+'&goodsId='+this.routerVal.goodsId"
:thumbnail="goodsDetail.thumbnail" :goodsName="goodsDetail.goodsName" type="goods" @close="shareFlage = false" />
<popups v-model="popupsSwitch" @tapPopup="handleNavbarList" :popData="navbarListData" :x="navbarListX"
:y="navbarListY" placement="top-start" />
<shares
v-if="shareFlage && goodsDetail.id"
:skuId="this.routerVal.id"
:goodsId="this.routerVal.goodsId"
:link="
'/pages/product/goods?id=' +
this.routerVal.id +
'&goodsId=' +
this.routerVal.goodsId
"
:thumbnail="goodsDetail.thumbnail"
:goodsName="goodsDetail.goodsName"
type="goods"
@close="shareFlage = false"
/>
<popups
v-model="popupsSwitch"
@tapPopup="handleNavbarList"
:popData="navbarListData"
:x="navbarListX"
:y="navbarListY"
placement="top-start"
/>
<view class="index">
<!-- topBar -->
<u-navbar :background="navbar" :is-back="false" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
<u-navbar
:background="navbar"
:is-back="false"
:class="headerFlag ? 'header' : 'header bg-none scroll-hide'"
>
<div class="headerRow">
<div class="backs">
<u-icon @click="back()" name="arrow-left" class="icon-back"></u-icon>
<u-icon name="list" @click="popupsSwitch = !popupsSwitch" class="icon-list"></u-icon>
<u-icon
name="list"
@click="popupsSwitch = !popupsSwitch"
class="icon-list"
></u-icon>
</div>
<div class="headerList" :class="headerFlag ? 'tab-bar' : 'tab-bar scroll-hide'">
<div class="headerRow">
<div class="nav-item" v-for="header in headerList" :key="header.id"
:class="{ cur: scrollId === header.id }" @click="headerTab(header.id)">
<div
class="nav-item"
v-for="header in headerList"
:key="header.id"
:class="{ cur: scrollId === header.id }"
@click="headerTab(header.id)"
>
{{ header.text }}
</div>
</div>
@@ -33,44 +62,80 @@
</div>
</u-navbar>
<u-navbar :border-bottom="false" v-show="!headerFlag" class="header-only-back" :background="navbarOnlyBack"
:is-back="false">
<u-navbar
:border-bottom="false"
v-show="!headerFlag"
class="header-only-back"
:background="navbarOnlyBack"
:is-back="false"
>
<div>
<div class="bg-back">
<u-icon size="40" @click="back()" name="arrow-left" class="icon-back"></u-icon>
<u-icon size="40" @click="popupsSwitch = !popupsSwitch" name="list" class="icon-list"></u-icon>
<u-icon
size="40"
@click="back()"
name="arrow-left"
class="icon-back"
></u-icon>
<u-icon
size="40"
@click="popupsSwitch = !popupsSwitch"
name="list"
class="icon-list"
></u-icon>
</div>
</div>
</u-navbar>
</view>
<view class="product-container" :style="{ height: productRefHeight }" ref="productRef" id="productRef">
<scroll-view scroll-anchoring enableBackToTop="true" scroll-with-animation scroll-y class="scroll-page"
:scroll-top="tabScrollTop" @scroll="pageScroll">
<view
class="product-container"
:style="{ height: productRefHeight }"
ref="productRef"
id="productRef"
>
<scroll-view
scroll-anchoring
enableBackToTop="true"
scroll-with-animation
scroll-y
class="scroll-page"
:scroll-top="tabScrollTop"
@scroll="pageScroll"
>
<view>
<!-- 轮播图 -->
<GoodsSwiper id="main1" :res="imgList" />
<!-- 促销活动条 -->
<PromotionAssembleLayout v-if="PromotionList" :detail="goodsDetail" :res="PromotionList" />
<PromotionAssembleLayout
v-if="PromotionList"
:detail="goodsDetail"
:res="PromotionList"
/>
<view class="card-box top-radius-0" id="main2">
<!-- 活动不显示价钱 -->
<view v-if="!isPromotion" class="desc-bold -goods-msg">
<view v-if="!promotionFlag" class="desc-bold -goods-msg">
<view class="-goods-flex">
<view class="desc-bold">
{{ goodsDetail.goodsName || "" }}
</view>
<view class="favorite" @click="clickFavorite(goodsDetail.id)">
<u-icon size="30" :color="favorite ? '#f2270c' : '#262626'" :name="favorite ? 'heart-fill' : 'heart'">
<u-icon
size="30"
:color="favorite ? '#f2270c' : '#262626'"
:name="favorite ? 'heart-fill' : 'heart'"
>
</u-icon>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{ favorite ? "已收藏" : "收藏" }}</view>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{
favorite ? "已收藏" : "收藏"
}}</view>
</view>
</view>
<!-- 商品描述 -->
<view class="-goods-desc">
{{ goodsDetail.sellingPoint || '' }}
{{ goodsDetail.sellingPoint || "" }}
</view>
</view>
<view v-else class="-goods-msg">
@@ -79,31 +144,41 @@
<view class="-goods-flex">
<!-- 如果有积分显示积分 -->
<view class="-goods-price" v-if="goodsDetail.price != undefined">
<span v-if="pointDetail.points"> <span class="price">{{pointDetail.points}}</span>
<span v-if="pointDetail.points">
<span class="price">{{ pointDetail.points }}</span>
<span>积分</span>
</span>
<span v-else> <span>¥</span><span class="price">{{ formatPrice(goodsDetail.price)[0] }}</span>.{{
formatPrice(goodsDetail.price)[1]
}} </span>
<span v-else>
<span>¥</span
><span class="price">{{ formatPrice(goodsDetail.price)[0] }}</span
>.{{ formatPrice(goodsDetail.price)[1] }}
</span>
</view>
<view class="-goods-price" v-else>
¥<span class="price">0 </span>.00
</view>
<view class="-goods-price" v-else> ¥<span class="price">0 </span>.00 </view>
<view class="icons share" @click="shareChange()">
<u-icon size="30" name="share-fill"></u-icon>
<view>分享</view>
</view>
<view class="icons" @click="clickFavorite(goodsDetail.id)">
<u-icon size="30" :color="favorite ? '#f2270c' : '#262626'"
:name="favorite ? 'heart-fill' : 'heart'"></u-icon>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{ favorite ? "已收藏" : "收藏" }}</view>
<u-icon
size="30"
:color="favorite ? '#f2270c' : '#262626'"
:name="favorite ? 'heart-fill' : 'heart'"
></u-icon>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{
favorite ? "已收藏" : "收藏"
}}</view>
</view>
</view>
<view class="-goods-name desc-bold">
{{ goodsDetail.goodsName || "" }}
</view>
<view class="-goods-desc">
{{ goodsDetail.sellingPoint || '' }}
{{ goodsDetail.sellingPoint || "" }}
</view>
</view>
</view>
@@ -123,16 +198,22 @@
</view>
<!-- 拼团用户列表 -->
<PromotionAssembleListLayout v-if="isGroup" @to-assemble-buy-now="toAssembleBuyNow" :res="PromotionList" />
<PromotionAssembleListLayout
v-if="isGroup"
@to-assemble-buy-now="toAssembleBuyNow"
:res="PromotionList"
/>
<!-- 配置地址 如果是虚拟产品的时候不展示 -->
<view class="card-box" v-if="goodsDetail.goodsType !='VIRTUAL_GOODS'">
<view class="card-box" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'">
<view class="card-flex" @click="shutMask(4)">
<view class="card-title"> 已选 </view>
<view class="card-content">
<span v-if="selectedGoods.spec">{{ selectedGoods.spec.specName }}-{{
<span v-if="selectedGoods.spec"
>{{ selectedGoods.spec.specName }}-{{
selectedGoods.spec.specValue
}}</span>
}}</span
>
<span v-else>默认</span>
</view>
<view class="card-bottom">
@@ -140,7 +221,7 @@
</view>
</view>
<view class="card-flex" @click="shutMask(3)">
<view class="card-title"> 送至 </view>
<view class="card-title"> 送至</view>
<view class="card-content">
<span v-if="delivery">{{
delivery.consigneeAddressPath | clearStrComma
@@ -157,11 +238,21 @@
<Evaluation id="main5" :goodsDetail="goodsDetail" />
<!-- 店铺推荐 -->
<storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" />
<storeLayout
id="main7"
:storeDetail="storeDetail"
:goodsDetail="goodsDetail"
:res="recommendList"
/>
<!-- 宝贝详情 -->
<GoodsIntro id="main9" :res="goodsDetail" :goodsParams="goodsParams" :goodsId="goodsDetail.goodsId"
v-if="goodsDetail.id" />
<GoodsIntro
id="main9"
:res="goodsDetail"
:goodsParams="goodsParams"
:goodsId="goodsDetail.goodsId"
v-if="goodsDetail.id"
/>
<!-- 宝贝推荐 -->
<GoodsRecommend id="main11" :res="likeGoodsList" />
@@ -186,8 +277,13 @@
</view>
<!-- 正常结算页面 -->
<view class="detail-btn" v-if="!isGroup">
<view class="to-store-car to-store-btn" v-if="goodsDetail.goodsType!='VIRTUAL_GOODS'" @click="shutMask(4)">
加入购物车</view>
<view
class="to-store-car to-store-btn"
v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'"
@click="shutMask(4)"
>
加入购物车</view
>
<view class="to-buy to-store-btn" @click="shutMask(4, 'buy')">立即购买</view>
<view class="to-store-car to-store-btn" v-if="startTimer">暂未开始</view>
</view>
@@ -206,8 +302,15 @@
<!-- 规格-模态层弹窗 -->
<view class="spec">
<!-- 促销弹窗 -->
<u-popup v-model="promotionFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius"
@close="promotionFlag=false" :mask-close-able="setup.close" closeable>
<u-popup
v-model="promotionShow"
:height="setup.height"
:mode="setup.mode"
:border-radius="setup.radius"
@close="promotionShow = false"
:mask-close-able="setup.close"
closeable
>
<view class="header-title">优惠</view>
<view class="cuxiao">
<scroll-view class="scroll_mask" :scroll-y="true">
@@ -216,7 +319,6 @@
<PromotionDetailsLayout :res="PromotionList" />
</view>
<view class="con-cuxiao coupons">
<view class="cuxiao-title">可领优惠券</view>
<PromotionCoupon @getCoupon="getCoupon" :res="PromotionList" />
</view>
@@ -225,13 +327,30 @@
</u-popup>
<!-- 配送地址弹窗 -->
<popupAddress @closeAddress="closePopupAddress" @deliveryData="deliveryFun" v-if="goodsDetail.id"
:goodsId="goodsDetail.id" :addressFlag="addressFlag" />
<popupAddress
@closeAddress="closePopupAddress"
@deliveryData="deliveryFun"
v-if="goodsDetail.id"
:goodsId="goodsDetail.id"
:addressFlag="addressFlag"
/>
<!-- 商品规格 商品详情以及默认参与活动的id-->
<popupGoods :addr="delivery" ref="popupGoods" @changed="changedGoods" @closeBuy="closePopupBuy"
@queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :id="productId"
v-if="goodsDetail.id " :pointDetail="pointDetail" @handleClickSku="selectSku" :buyMask="buyMask" />
<popupGoods
:addr="delivery"
ref="popupGoods"
@changed="changedGoods"
@closeBuy="closePopupBuy"
@queryCart="cartCount()"
:goodsDetail="goodsDetail"
:goodsSpec="goodsSpec"
:isGroup="isGroup"
:id="productId"
v-if="goodsDetail.id"
:pointDetail="pointDetail"
@handleClickSku="selectSku"
:buyMask="buyMask"
/>
</view>
</view>
</div>
@@ -239,15 +358,11 @@
<script>
/************接口API***************/
import {
getGoods,
getGoodsList,
getMpScene,
getGoodsDistribution,
} from "@/api/goods.js";
import { getGoods, getGoodsList, getMpScene, getGoodsDistribution } from "@/api/goods.js";
import * as API_trade from "@/api/trade.js";
import * as API_Members from "@/api/members.js";
import * as API_store from "@/api/store.js";
import { getIMDetail } from "@/api/common";
import { modelNavigateTo } from "@/pages/tabbar/home/template/tpl.js";
/************请求存储***************/
import storage from "@/utils/storage.js";
@@ -289,7 +404,8 @@ export default {
data() {
return {
setup,
promotionFlag: false,
promotionShow: false, //弹窗开关
promotionFlag: true, //活动开关
// #ifdef H5
navbarListX: 110, //导航栏列表栏x轴
navbarListY: 80, //导航栏列表栏y轴
@@ -328,7 +444,6 @@ export default {
popupsSwitch: false, //导航栏列表栏开关
shareFlage: false,
selectedGoods: "", //选择的商品规格昵称
isPromotion: true, //判断显示拼团活动文字
isGroup: false, // 是否是拼团活动
pointDetail: "", // 是否是积分商品
assemble: "", //拼团的sku
@@ -408,9 +523,16 @@ export default {
startTimer: false, //未开启 是false
routerVal: "",
IMLink: "", // IM地址
};
},
computed: {
IM() {
return this.IMLink + this.storeDetail.merchantEuid;
},
},
watch: {
isGroup(val) {
if (val) {
@@ -419,9 +541,9 @@ export default {
clearInterval(timer);
}, 100);
this.isPromotion = false;
this.promotionFlag = false;
} else {
this.isPromotion = true;
this.promotionFlag = true;
this.$refs.popupGoods.buyType = "";
}
},
@@ -473,16 +595,11 @@ export default {
getMpScene(this.routerVal.scene).then((res) => {
if (res.data.success) {
let data = res.data.result.split(","); // skuId,goodsId,distributionId
console.warn(data);
this.init(data[0], data[1], data[2]);
}
});
} else {
this.init(
this.routerVal.id,
this.routerVal.goodsId,
this.routerVal.distributionId
);
this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
}
},
// #ifdef MP-WEIXIN
@@ -530,7 +647,6 @@ export default {
let response = await getGoods(id, goodsId);
console.log(response);
if (!response.data.success) {
setTimeout(() => {
uni.navigateBack();
@@ -540,7 +656,6 @@ export default {
if (distributionId || this.$store.state.distributionId) {
let disResult = await getGoodsDistribution(distributionId);
if (!disResult.data.success || disResult.statusCode == 403) {
console.log("绑定成功!");
this.$store.state.distributionId = distributionId;
}
}
@@ -572,7 +687,7 @@ export default {
this.cartCount();
// 获取店铺推荐商品
this.getstoreRecommend();
this.getStoreRecommend();
// 获取商品列表
this.getOtherLikeGoods();
@@ -581,11 +696,25 @@ export default {
if (this.$options.filters.isLogin("auth")) {
this.getGoodsCollectionFun(this.goodsDetail.id);
}
// 获取IM 需要的话使用
// this.getIMDetailMethods();
},
async getIMDetailMethods() {
let res = await getIMDetail();
if (res.data.success) {
this.IMLink = res.data.result;
}
},
linkMsgDetail() {
if (this.storeDetail.merchantEuid) {
uni.navigateTo({
url: `/pages/tabbar/home/web-view?src=${this.IM}`,
});
} else {
// 客服
// #ifdef MP-WEIXIN
const params = {
storeName: this.storeDetail.storeName,
goodsName: this.goodsDetail.goodsName,
@@ -612,6 +741,7 @@ export default {
sign,
});
// #endif
}
},
// 格式化金钱 1999 --> [1999,00]
formatPrice(val) {
@@ -727,7 +857,7 @@ export default {
/**
* 获取店铺推荐商品列表
*/
getstoreRecommend() {
getStoreRecommend() {
getGoodsList({
pageNumber: 1,
pageSize: 6,
@@ -749,7 +879,6 @@ export default {
category: this.goodsDetail.categoryId,
keyword: this.goodsDetail.name,
}).then((res) => {
console.warn(this.likeGoodsList )
this.likeGoodsList = res.data.result.content;
});
},
@@ -786,13 +915,13 @@ export default {
* 规格弹窗开关
*/
shutMask(flag, buyFlag, type) {
this.promotionFlag = false;
this.promotionShow = false;
this.buyMask = false;
this.addressFlag = false;
if (flag) {
switch (flag) {
case 1: //优惠券弹窗
this.promotionFlag = true;
this.promotionShow = true;
break;
case 3:

View File

@@ -4,11 +4,21 @@
<view class="goods-detail">
<view class="detail_padding">
<div class="goods-detail-box">
<div class="goods-detail-item goods-active">商品介绍
<div class="goods-detail-item goods-active">商品介绍</div>
</div>
</div>
<u-empty class="empty" text="暂无商品介绍" mode="data" v-if="!res.mobileIntro"></u-empty>
<u-parse class="vhtml" :lazy-load="true" :use-cache="true" :show-with-animation="true" :html="res.mobileIntro"></u-parse>
<u-empty
class="empty"
text="暂无商品介绍"
mode="data"
v-if="!res.mobileIntro"
></u-empty>
<u-parse
class="vhtml"
:lazy-load="true"
:use-cache="true"
:show-with-animation="true"
:html="res.mobileIntro"
></u-parse>
</view>
</view>
</view>
@@ -23,12 +33,22 @@
<div class="param-list" v-if="goodsParams.length == 0">
<u-empty text="暂无商品参数" mode="list"></u-empty>
</div>
<div class="params-group" v-for="(group,groupIndex) in goodsParams" :key="groupIndex">
<view style="font-weight: bold;margin-left: 10px;">{{group.groupName}}</view>
<div
class="params-group"
v-for="(group, groupIndex) in goodsParams"
:key="groupIndex"
>
<view style="font-weight: bold; margin-left: 10px">{{
group.groupName
}}</view>
<div class="param-list">
<div class="param-item" v-for="(param,index) in group.goodsParamsItemDTOList" :key="index">
<div class="param-left">{{param.paramName}}</div>
<div class="param-right">{{param.paramValue}}</div>
<div
class="param-item"
v-for="(param, index) in group.goodsParamsItemDTOList"
:key="index"
>
<div class="param-left">{{ param.paramName }}</div>
<div class="param-right">{{ param.paramValue }}</div>
</div>
</div>
</div>
@@ -43,16 +63,14 @@ import { getGoodsMessage } from "@/api/goods";
export default {
data() {
return {
goodsDetail: ""
goodsDetail: "",
};
},
props: ["res", "goodsId", "goodsParams"],
async mounted() {
console.log(this.res)
let res = await getGoodsMessage(this.goodsId);
if (res.data.success) {
this.goodsDetail = res.data.result;
}
},
};
@@ -103,6 +121,11 @@ export default {
width: 100%;
}
.vhtml {
/deep/ img {
display: block !important;
}
}
/deep/ img {
width: 100%;

View File

@@ -1,5 +1,5 @@
<template>
<u-popup class="popup" v-model="addressFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius" @close="closeAddress()" :mask-close-able="setup.close" closeable>
<u-popup class="popup" v-model="addressFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius" @close="closeAddress()" closeable>
<view class="header-title">选择地址</view>
<view class="view-box" v-if="addressDetail">
<view class="view-item" v-for="(item, index) in addressDetail" :key="index" @click="clickAddress(item)">

View File

@@ -1,23 +1,23 @@
<template>
<view class="group-list">
<view class="group-name">拼购列表</view>
<view v-if="assembleOrder.length !=0">
<view class="group-item" v-for="(order,index) in assembleOrder" :key="index">
<view v-if="assembleOrder.length != 0">
<view class="group-item" v-for="(order, index) in assembleOrder" :key="index">
<view class="group-item-user">
<u-image shape="circle" width="40px" height="40px" :src="order.face"></u-image>
<span class="group-item-name">{{order.nickName | noPassByName}}</span>
<span class="group-item-name">{{ order.nickName | noPassByName }}</span>
</view>
<view>
<span class="group-item-name">还差{{ order.toBeGroupedNum}}人成团</span>
<span class="group-item-name">还差{{ order.toBeGroupedNum }}人成团</span>
</view>
<view>
<u-button size="mini" :custom-style="customStyle" @click="buy(order)">去参团</u-button>
<u-button size="mini" :custom-style="customStyle" @click="buy(order)"
>去参团</u-button
>
</view>
</view>
</view>
<view v-else class="nomore">
<u-empty text="暂无拼团信息" mode="list"></u-empty>
</view>
</view>

View File

@@ -1,61 +1,105 @@
<template>
<view>
<div v-for="(promotion, promotion_index) in res" :key="promotion_index">
<div class="showBox" v-if="promotion.__key == 'SECKILL' || promotion.__key =='GROUPBUY' || promotion.__key == 'PINTUAN'">
<div
class="showBox"
v-if="
promotion.__key == 'SECKILL' ||
promotion.__key == 'GROUPBUY' ||
promotion.__key == 'PINTUAN'
"
>
<view class="group-wrapper">
<div class="u-group-row">
<view :span="8" class="showBox_L">
<view class="u-group-flex">
<!-- 限时抢购 -->
<view class="u-group-flex-left" v-if="promotion.__key == 'SECKILL' ">
<span class="u-group-flex-left-span" v-if="detail.promotionPrice!=undefined">
<span class="flex-price"> {{ formatPrice(detail.promotionPrice)[0]}}.{{ formatPrice(detail.promotionPrice)[1]}}</span>
<view class="u-group-flex-left" v-if="promotion.__key == 'SECKILL'">
<span
class="u-group-flex-left-span"
v-if="detail.promotionPrice != undefined"
>
<span class="flex-price">
{{ formatPrice(detail.promotionPrice)[0] }}.{{
formatPrice(detail.promotionPrice)[1]
}}</span
>
</span>
<view class="u-group-flex" v-if="detail.price!=undefined">
<span class="old-price">{{ formatPrice(detail.price)[0]}}.{{ formatPrice(detail.price)[1]}}</span>
<view class="u-group-flex" v-if="detail.price != undefined">
<span class="old-price"
>¥{{ formatPrice(detail.price)[0] }}.{{
formatPrice(detail.price)[1]
}}</span
>
<view class="promotion">限时抢购</view>
</view>
</view>
<!-- 团购 -->
<view class="u-group-flex-left" v-if="promotion.__key == 'GROUPBUY' ">
<view class="u-group-flex-left" v-if="promotion.__key == 'GROUPBUY'">
<span class="u-group-flex-left-span">
<span class="flex-price"
v-if="promotion.groupbuy_goods_vo.price !=undefined">{{ formatPrice(promotion.groupbuy_goods_vo.price )[0]}}.{{ formatPrice(promotion.groupbuy_goods_vo.price )[1]}}</span>
<span
class="flex-price"
v-if="promotion.groupbuy_goods_vo.price != undefined"
>¥{{ formatPrice(promotion.groupbuy_goods_vo.price)[0] }}.{{
formatPrice(promotion.groupbuy_goods_vo.price)[1]
}}</span
>
<!-- <span v-if="promotion.point">+{{promotion.point}}积分</span> -->
</span>
<view class="u-group-flex">
<span class="old-price"
v-if="promotion.groupbuy_goods_vo.original_price!=undefined">{{ formatPrice(promotion.groupbuy_goods_vo.original_price)[0]}}.{{ formatPrice(promotion.groupbuy_goods_vo.original_price)[1]}}</span>
<span
class="old-price"
v-if="promotion.groupbuy_goods_vo.original_price != undefined"
>¥{{
formatPrice(promotion.groupbuy_goods_vo.original_price)[0]
}}.{{
formatPrice(promotion.groupbuy_goods_vo.original_price)[1]
}}</span
>
<view class="promotion">团购活动</view>
</view>
</view>
<view class="u-group-flex-left" v-if="promotion.__key == 'PINTUAN' ">
<span class="u-group-flex-left-span" v-if="detail.promotionPrice != undefined">
<span class="flex-price"> {{ formatPrice(detail.promotionPrice)[0]}}.</span>{{ formatPrice(detail.promotionPrice)[1]}}
<view class="u-group-flex-left" v-if="promotion.__key == 'PINTUAN'">
<span
class="u-group-flex-left-span"
v-if="detail.promotionPrice != undefined"
>
¥<span class="flex-price">
{{ formatPrice(detail.promotionPrice)[0] }}.</span
>{{ formatPrice(detail.promotionPrice)[1] }}
</span>
<view class="u-group-flex" v-if="detail.price != undefined">
<span class="old-price">{{ formatPrice(detail.price)[0]}}.{{ formatPrice(detail.price)[1]}}</span>
<span class="old-price"
>¥{{ formatPrice(detail.price)[0] }}.{{
formatPrice(detail.price)[1]
}}</span
>
<view class="promotion">拼团活动</view>
</view>
</view>
<!-- 拼团右侧 -->
<view class="u-group-flex-right" v-if="promotion.__key == 'PINTUAN' ">
<span class="group-bag">{{promotion.requiredNum}}人拼团 </span>
<span class="group-bag">限购{{promotion.limitNum}}</span>
<view class="u-group-flex-right" v-if="promotion.__key == 'PINTUAN'">
<span class="group-bag">{{ promotion.requiredNum }}人拼团 </span>
<span class="group-bag">限购{{ promotion.limitNum }}件</span>
</view>
</view>
</view>
<view class="showBox_R" v-if="promotion && promotion.endTime">
<u-tag :text="getIsTimer(promotion)" size="mini" type="error" />
<u-count-down :hide-zero-day="true" font-size="25" color="#fff" bg-color="#f71471" separator-size="25" separator-color="#f71471" :show-hours="true" :show-minutes="true"
:timestamp="getCountDownTime(promotion.endTime)"></u-count-down>
<u-count-down
:hide-zero-day="true"
font-size="25"
color="#fff"
bg-color="#f71471"
separator-size="25"
separator-color="#f71471"
:show-hours="true"
:show-minutes="true"
:timestamp="getCountDownTime(promotion.endTime)"
></u-count-down>
</view>
</div>
</view>
@@ -105,14 +149,13 @@ export default {
return val.toFixed(2).split(".");
},
getCountDownTime(val) {
let date = new Date(val.replace(/-/g, "/"))
let date = new Date(val);
let timeSimple = new Date(date).getTime() / 1000;
return timeSimple - new Date().getTime() / 1000;
},
getIsTimer(val) {
var timestamp = new Date().getTime();
if (timestamp < val.start_time) {
this.startTimer = true;
return "距离活动开始";

View File

@@ -1,33 +1,37 @@
<template>
<view class="wrapper">
<div class="coupon-empty" v-if="!res">暂无优惠券</div>
<view class="coupon-List" v-if="res && item.__key=='COUPON'" v-for="(item, index) in res" :key="index">
<view class="coupon-List" v-for="(item, index) in couponRes" :key="index">
<view class="coupon-item">
<view class="top">
<div class="price">
<span v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}</span>
<span v-if="item.couponType == 'PRICE'">{{ item.price | unitPrice }}</span>
</div>
<view class="text">
<div class="coupon-List-title">
<view v-if="item.scopeType">
<span v-if="item.scopeType == 'ALL' && item.id == 'platform'">全平台</span>
<span v-if="item.scopeType == 'ALL' && item.id == 'platform'"
>全平台</span
>
<span v-if="item.scopeType == 'PORTION_CATEGORY'">仅限品类</span>
<view v-else>{{ item.storeName == 'platform' ? '全平台' :item.storeName+'店铺' }}使用</view>
<view v-else
>{{
item.storeName == "platform" ? "全平台" : item.storeName + "店铺"
}}使用</view
>
</view>
</div>
<div>{{ item.consumeThreshold | unitPrice }}可用</div>
</view>
<view class="lingqu-btn" @click="getCoupon(item)">
<div :class="yhqFlag ? 'cur' : ''">{{ yhqFlag ? '已领取或领完' : '立即领取' }}</div>
<view class="lingqu-btn" @click="getCoupon(item, index)">
<div :class="yhqFlag[index] ? 'cur' : ''">
{{ yhqFlag[index] ? "已领取或领完" : "立即领取" }}
</div>
</view>
</view>
<view class="line"></view>
<view class="time">{{ item.startTime }} - {{item.endTime }}</view>
<view class="time">{{ item.startTime }} - {{ item.endTime }}</view>
</view>
</view>
</view>
@@ -37,7 +41,8 @@
export default {
data() {
return {
yhqFlag: false, //获取优惠券判断是否点击
yhqFlag: [], //获取优惠券判断是否点击
couponRes: {},
};
},
props: {
@@ -52,7 +57,9 @@ export default {
if (this.res && this.res.length != 0) {
Object.keys(this.res).forEach((item) => {
let key = item.split("-")[0];
this.res[item].__key = key;
if (key === "COUPON") {
this.couponRes[item] = this?.res[item];
}
});
}
},
@@ -61,9 +68,8 @@ export default {
},
methods: {
// 提交优惠券
getCoupon(item) {
this.yhqFlag = true;
getCoupon(item, index) {
this.yhqFlag[index] = true;
this.$emit("getCoupon", item);
},
},

View File

@@ -1,34 +1,38 @@
<template>
<view class="wrapper" v-if="res">
<view v-for="(prom, index) in Object.keys(res)" :key="index">
<view>
<view v-if="prom.split('-')[0] == 'FULL_DISCOUNT'">
<div class="res_prom_item" v-if="res[prom].fullMinus">
<u-tag text="满减" type="error"></u-tag>
<!-- TODO 后续将优化为可点击的商品以及优惠券显示明细 -->
<span class="pro-text">{{ res[prom].fullMoney }} 立减现金 <span class="price">{{ res[prom].fullMinus}}</span>
<span v-if="res[prom].isCoupon"> 赠送<span>优惠券</span></span>
<span v-if="res[prom].isPoint"> 赠送{{res[prom].point}}积分</span>
<span v-if="res[prom].isGift"> 赠送商品</span>
<span v-if="res[prom].isFreeFreight">赠送包邮服务</span>
<span class="pro-text"
>{{ res[prom].fullMoney }} 立减现金
<span class="price">{{ res[prom].fullMinus }}</span>
<span v-if="res[prom].couponFlag"> 赠送<span>优惠券</span></span>
<span v-if="res[prom].pointFlag"> 赠送{{ res[prom].point }}积分</span>
<span v-if="res[prom].giftFlag"> 赠送商品</span>
<span v-if="res[prom].freeFreightFlag">赠送包邮服务</span>
</span>
</div>
<div class="res_prom_item" v-if="res[prom].fullRate">
<u-tag text="打折" type="error"></u-tag>
<span class="pro-text">{{ res[prom].fullMoney }}立享<span
class="price">{{ res[prom].fullRate }}</span>优惠</span>
<span class="pro-text"
>{{ res[prom].fullMoney }}立享<span class="price"
>{{ res[prom].fullRate }}</span
>优惠</span
>
</div>
</view>
<view v-if="prom.split('-')[0] == 'PINTUAN'">
<div class="res_prom_item" v-if="res[prom].requiredNum">
<u-tag text="拼团" type="error"></u-tag>
<span class="pro-text">{{ res[prom].requiredNum }}人拼团 限购<span
class="price">{{ res[prom].limitNum}}</span></span>
<span class="pro-text"
>{{ res[prom].requiredNum }}人拼团 限购<span class="price"
>{{ res[prom].limitNum }}</span
></span
>
</div>
</view>

View File

@@ -1,50 +1,65 @@
<template>
<view>
<view v-for="(promotionItem,promotionIndex) in promotion" :key="promotionIndex" class="promotion_row" @click="shutMask(1)">
<view v-if="res!=null" v-for="(item, index) in Object.keys(res)" :key="index">
<div class="promotion_col" v-if="item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'FULL_DISCOUNT'">
<view
v-for="(promotionItem, promotionIndex) in promotion"
:key="promotionIndex"
class="promotion_row"
@click="shutMask(1)"
>
<view v-if="res != null" v-for="(item, index) in Object.keys(res)" :key="index">
<div
class="promotion_col"
v-if="
item.split('-')[0] == promotionItem.value &&
item.split('-')[0] == 'FULL_DISCOUNT'
"
>
<!-- 满减,折扣 -->
<div class="flex">
<view class="deg_tag">{{promotionItem.title}}</view>
<view class="deg_tag">{{ promotionItem.title }}</view>
<div class="text proText">满{{ res[item].fullMoney }}元,立享优惠</div>
</div>
</div>
<div class="promotion_col" v-if="item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'PINTUAN'">
<div
class="promotion_col"
v-if="
item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'PINTUAN'
"
>
<!-- 拼团 -->
<div class="flex">
<view class="deg_tag">{{promotionItem.title}}</view>
<view class="deg_tag">{{ promotionItem.title }}</view>
<div class="text proText">{{ res[item].promotionName }}</div>
</div>
</div>
<div class="promotion_col" v-if="item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'SECKILL'">
<div
class="promotion_col"
v-if="
item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'SECKILL'
"
>
<!-- 限时抢购 -->
<div class="flex">
<view class="deg_tag">{{promotionItem.title}}</view>
<view class="deg_tag">{{ promotionItem.title }}</view>
<div class="text proText">{{ res[item].promotionName }}</div>
</div>
</div>
</view>
<view class="promotion_row" style="display:inline;">
<view class="promotion_row" style="display: inline">
<view>
<div class="promotion_col coupon" v-if="couponList && promotionIndex ==1">
<div class="promotion_col coupon" v-if="couponList && promotionIndex == 1">
<!-- 优惠券 -->
<div>
<view class="deg_tag">优惠券</view>
</div>
</div>
</view>
</view>
</view>
<view v-if=" this.res != null && Object.keys(res).length == 0">
暂无促销信息
</view>
<view v-if="this.res != null && Object.keys(res).length == 0"> 暂无促销信息 </view>
</view>
</template>
@@ -69,7 +84,6 @@ export default {
handler() {
if (this.res && this.res.length != 0 && this.res != null) {
Object.keys(this.res).forEach((item) => {
let key = item.split("-")[0];
this.res[item].__key = key;

163
pages/product/shopList.vue Normal file
View File

@@ -0,0 +1,163 @@
<template>
<div>
<u-navbar>
<u-search placeholder="请输入店铺名称" @search="search" @clear="search" @custom="search" v-model="params.storeName">
</u-search>
</u-navbar>
<div class="wrapper" v-if="storeList.length!=0">
<div class="store-item" @click="handleClickStore(item)" v-for="(item,index) in storeList" :key="index">
<div>
<u-image shape="circle" width="100" height="100" :src="item.storeLogo">
</u-image>
</div>
<div class="store-msg">
<div class="store-name">
{{item.storeName}}
</div>
<div class="goods-num">
商品 {{item.goodsNum}}
</div>
<div class="flex store-distance">
<div>
<span class="store-score">{{item.serviceScore | unitPrice}}</span>
<span class="line">|</span>
<span class="store-collection">收藏 {{item.collectionNum}}</span>
</div>
</div>
</div>
<!--
#TODO 后续将和后端补充从此处
<div class="flex store-goods">
<div class="store-goods-item" v-for="i in 3" :key="i">
<div>
<u-image src="https://picsum.photos/id/341/200/200" border-radius="20" width="215rpx" height="215rpx">
</u-image>
</div>
<div class="price">
<span>
<span class=" goods-price-bigshow">{{ formatPrice(16)[0] }}</span>
.{{ formatPrice(16)[1] }}
</span>
</div>
<div class="wes">test</div>
</div>
</div>
-->
</div>
</div>
<u-empty style="margin-top:20%;" text="暂无店铺信息" v-else></u-empty>
</div>
</template>
<script>
import { getStoreList } from "@/api/store";
export default {
data() {
return {
keyword: "",
params: {
pageNumber: 1,
pageSize: 10,
storeName: "",
},
storeList: [], // 店铺列表
};
},
onReachBottom() {
this.params.pageNumber++;
this.init();
},
mounted() {
this.init();
},
methods: {
handleClickStore(val){
uni.navigateTo({
url: `/pages/product/shopPage?id=${val.id}`
});
},
search() {
this.storeList = [];
this.init();
},
// 格式化金钱 1999 --> [1999,00]
formatPrice(val) {
if (typeof val == "undefined") {
return val;
}
return val.toFixed(2).split(".");
},
async init() {
let res = await getStoreList(this.params);
if (res.data.success) {
let data = res.data.result;
this.storeList.push(...data.records);
}
},
},
};
</script>
<style lang="scss" scoped>
.wrapper {
padding: 0 16rpx;
}
.store-item {
display: flex;
background: #fff;
border-radius: 20rpx;
margin: 20rpx 0;
padding: 24rpx;
}
.store-msg {
margin-left: 20rpx;
}
.store-name {
font-weight: bold;
font-size: 30rpx;
}
.goods-num,
.store-collection {
color: #999;
font-size: 24rpx;
line-height: 1.5;
}
.store-goods {
margin: 20rpx 0;
}
.store-goods-item {
flex: 1;
overflow: hidden;
display: flex;
justify-content: flex-start;
flex-direction: column;
margin: 0 5rpx;
}
.wes {
margin: 10rpx 0;
width: 100%;
}
.store-score {
color: $light-color;
font-size: 24rpx;
font-weight: bold;
}
.line {
margin: 0 6rpx;
color: #999;
}
.store-distance {
justify-content: space-between;
}
.price {
margin-top: 10rpx;
color: $main-color;
}
.goods-price-bigshow {
font-size: 34rpx;
font-weight: bold;
}
</style>

View File

@@ -64,7 +64,7 @@
<u-image width="100%" height="330rpx" mode="aspectFit" :src="item.content.thumbnail">
<u-loading slot="loading"></u-loading>
</u-image>
<div class="name">{{ item.content.goodsName }}</div>
<div class="name wes-2">{{ item.content.goodsName }}</div>
<div class="price">
<div>{{ item.content.price | unitPrice }}</div>
</div>
@@ -126,7 +126,7 @@ export default {
},
watch: {
current(val) {
val == 0 ? this.getGoodsData() : this.getCategoryData();
val == 0 ? ()=>{ this.goodsList = []; this.getGoodsData()} : this.getCategoryData();
},
},
@@ -421,8 +421,7 @@ export default {
color: #333;
padding: 0 20rpx;
margin-top: 20rpx;
line-height: 1.4em;
max-height: 2.8em; //height是line-height的整数倍防止文字显示不全
height: 80rpx;
overflow: hidden;
}
.price {

View File

@@ -179,7 +179,7 @@ export default {
return {
path: this.share(),
title: `请快来帮我砍一刀${this.bargainDetail.goodsName}`,
imageUrl: this.thumbnail || config.logo,
imageUrl: this.bargainDetail.thumbnail || config.logo,
};
},
// #endif

View File

@@ -26,7 +26,7 @@
<div v-if="groupBuy.length !=0">
<view class="view-item" v-for="(groupItem, groupIndex) in groupBuy" :key="groupIndex">
<view class="view-left">
<u-image border-radius="10" shape="square" :src="groupItem.goodsImage" width="186rpx" height="186rpx">
<u-image border-radius="10" shape="square" :src="groupItem.thumbnail" width="186rpx" height="186rpx">
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
@@ -42,7 +42,7 @@
{{groupItem.price | unitPrice }}
</view>
<view class="view-content-original_price">
{{ groupItem.originPrice | unitPrice }}
{{ groupItem.originalPrice | unitPrice }}
</view>
</view>

View File

@@ -19,13 +19,13 @@
<view class="index-items">
<view class="index-item" v-for="(item, key) in nav.goods" :key="key" @click="toGoods(item)">
<view class="index-item-img">
<u-image :src="item.goodsSku.thumbnail" mode="aspectFill">
<u-image :src="item.thumbnail" mode="aspectFill">
<u-loading slot="loading"></u-loading>
</u-image>
<view class="index-item-title">{{ item.goodsSku.goodsName }}</view>
<view class="index-item-title">{{ item.goodsName }}</view>
<view class="index-item-price">
{{ item.points }}积分
<span class="tipsMkt">¥{{ item.goodsSku.price | unitPrice }}</span>
<span class="tipsMkt">¥{{ item.originalPrice | unitPrice }}</span>
</view>
</view>
</view>

View File

@@ -29,8 +29,9 @@
<span class="store-name store-line-desc" @click.stop="navigateToStore(item)">{{
item.storeName
}}</span>
<u-icon @click="navigateToStore(item)" size="24" style="margin-left:10rpx;" name="arrow-right"></u-icon>
</view>
<view class="right-col" @click="navigateToConpon(item)">
<view class="right-col" v-if="item.canReceiveCoupon" @click="navigateToConpon(item)">
<div class="right-line"></div>
<span>领劵</span>
</view>
@@ -39,9 +40,8 @@
ref="swiperAction" class="cart-item" v-for="(skuItem, i) in item.skuList" :index="i" :key="skuItem.goodsSku.id"
@click="changeActionTab(skuItem)" @longpress="changeActionTab(skuItem)">
<!-- 满减活动 -->
<div v-if="skuItem.promotions" v-for="(fullDiscount,fullDiscountIndex) in skuItem.promotions"
:key="fullDiscountIndex">
<div v-if="fullDiscount.promotionType == 'FULL_DISCOUNT'">
<div v-if="Object.keys(skuItem.promotionMap).length != 0">
<div v-if="getPromotion(skuItem).includes('FULL_DISCOUNT')">
<div class="promotion-notice" v-if="item.promotionNotice">
<span class="tips">满减</span>
<span style="flex:10;">{{item.promotionNotice}}</span>
@@ -76,7 +76,7 @@
<p class="sp-type">{{skuItem.goodsSku.simpleSpecs}}</p>
<p class="sp-number">
<view class="sp-price">
<div class="default-color" :class="{'main-color':skuItem.promotions.length ==0 }">
<div class="default-color" :class="{'main-color':Object.keys(skuItem.promotionMap).length ==0 }">
<span>{{ formatPrice(skuItem.goodsSku.price)[0] }}</span>
<span>.{{ formatPrice(skuItem.goodsSku.price)[1] }}</span>
@@ -95,9 +95,9 @@
</view>
<!-- 如果当有促销并且促销是 限时抢购 -->
<!-- promotions -->
<div class="promotions-list" v-if="skuItem.promotions"
v-for="(seckill,seckillIndex) in skuItem.promotions" :key="seckillIndex">
<div class="promotions-item-seckill" v-if="seckill.promotionType == 'SECKILL'">
<div class="promotions-list" v-if="Object.keys(skuItem.promotionMap).length != 0"
>
<div class="promotions-item-seckill" v-if="getPromotion(skuItem).includes('SECKILL')">
距秒杀结束: <u-count-down show-border :hide-zero-day="true" :color="$mainColor" border-color="#ededed"
font-size="24" :timestamp="getCountDownTime(seckill.endTime)">
</u-count-down>
@@ -106,7 +106,7 @@
<!-- 如果有活动 并且是选中的状态,显示预估到手价格 -->
<div class="priceDetail-flowPrice" :class="{'main-color':skuItem.priceDetailDTO}"
v-if="skuItem.priceDetailDTO && skuItem.invalid == 0 && skuItem.promotions.length!=0 && skuItem.checked && skuItem.checked">
v-if="skuItem.priceDetailDTO && skuItem.invalid == 0 && Object.keys(skuItem.promotionMap).length != 0 && skuItem.checked && skuItem.checked">
预估到手价 <span>{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}</span>
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
</div>
@@ -204,7 +204,7 @@ export default {
cartDetail: "", //购物车详情
goodsVal: "", //单个商品详情
isEdit: false, // 是否是编辑
checkout: true, //全选按钮
checkout: false, //全选按钮
WEIXIN_num: "", //购物车兼容微信步进器
};
},
@@ -215,6 +215,10 @@ export default {
uni.showShareMenu({ withShareTicket: true });
// #endif
},
onPullDownRefresh(){
console.log("132")
this.getCardData();
},
/**
* 初始化信息
*/
@@ -334,7 +338,7 @@ export default {
*/
navigateToStore(val) {
uni.navigateTo({
url: "../product/shopPage?id=" + val.storeId,
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -397,6 +401,8 @@ export default {
* 验证是否选中商品
*/
whetherChecked() {
this.$options.filters.forceLogin()
let canBuy = false;
this.cartDetail.cartList.forEach((item) => {
if (item.checked) {
@@ -490,6 +496,13 @@ export default {
});
},
// 数据去重一下
getPromotion(item) {
return Object.keys(item.promotionMap).map((child) => {
return child.split("-")[0]
});
},
/**
* 获取购物车数据
*/
@@ -500,26 +513,36 @@ export default {
});
API_Trade.getCarts()
.then((result) => {
uni.stopPullDownRefresh();
if (result.data.success) {
this.cartDetail = result.data.result;
this.checkout = true;
let checkouted = true;
for (let i = 0; i < this.cartDetail.cartList.length; i++) {
let item = this.cartDetail.cartList[i];
console.log(item);
// 循环出当前商品是否全选
if (item.checked == 0) {
this.checkout = false;
checkouted = false;
}
// 如果有拼团活动顺便删除
item.skuList &&
item.skuList.forEach((sku) => {
sku.promotions &&
sku.promotions.forEach((pro, proIndex) => {
if (pro.promotionType == "PINTUAN") {
sku.promotions.splice(proIndex, 1);
if (sku.checked == 0) {
checkouted = false;
}
if(Object.keys(sku.promotionMap).length != 0)
{
Object.keys(sku.promotionMap).forEach((pro, proIndex) => {
pro = pro.split('-')[0]
if (pro == "PINTUAN" ) {
Object.keys(sku.promotionMap).splice(proIndex, 1);
}
});
}
});
}
this.checkout = checkouted;
uni.stopPullDownRefresh();
}
})
@@ -556,6 +579,7 @@ page {
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
}
.promotion-notice {
margin-top: 10px;
margin-left: 68rpx;
font-size: 24rpx;
color: #333;
@@ -584,6 +608,7 @@ page {
.store-name {
font-weight: bold;
font-size: 28rpx;
}
.invalid {
filter: grayscale(1);

View File

@@ -3,7 +3,6 @@ export function modelNavigateTo(item) {
let val = item.url;
switch (val.___type) {
case "goods":
uni.navigateTo({
url: "/pages/product/goods?id=" + val.id + "&goodsId=" + val.goodsId,
@@ -38,7 +37,6 @@ export function modelNavigateTo(item) {
break;
case "other":
switch (val.title) {
case "首页":
uni.switchTab({
url: `/pages/tabbar/home/index`,
@@ -99,6 +97,11 @@ export function modelNavigateTo(item) {
url: `/pages/promotion/point/pointList`,
});
break;
case "店铺列表":
uni.navigateTo({
url: `/pages/product/shopList`,
});
break;
}
break;

View File

@@ -1,7 +1,7 @@
<template>
<div class="layout">
<u-sticky >
<u-sticky>
<div class="goods-cell-title">
<div class="goods-item-title" :class="{ 'selected-title': selected.index == index }"
@click="handleClickTitle(title, index)" v-for="(title, index) in res.list[0].titleWay" :key="index">
@@ -11,8 +11,9 @@
</div>
</u-sticky>
<div class="goods-list">
<div v-if="selected.val == item.type" @click="handleClick(item)" class="goods-item"
v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
<div v-if="item.___index != undefined ? (selected.index == item.___index) : ( selected.val == item.type)"
@click="handleClick(item)" class="goods-item" v-for="(item, item_index) in res.list[0].listWay"
:key="item_index">
<div class="goods-img">
<u-image :src="item.img" height="350rpx" mode="aspectFit" width="100%">
<u-loading slot="loading"></u-loading>
@@ -53,11 +54,7 @@ export default {
immediate: true,
},
},
mounted () {
this.$u.getRect('.goods-cell-title').then(res=>{
console.log(res)
})
},
mounted() {},
methods: {
handleClick(item) {
uni.navigateTo({

View File

@@ -105,6 +105,33 @@ export function isLogin(val) {
}
}
/**
* 验证是否登录如果没登录则去登录
* @param {*} val
* @returns
*/
export function forceLogin() {
let userInfo = storage.getUserInfo();
if (!userInfo.id) {
// #ifdef MP-WEIXIN
uni.navigateTo({
url: "/pages/passport/wechatMPLogin",
});
// #endif
// #ifndef MP-WEIXIN
uni.navigateTo({
url: "/pages/passport/login",
});
// #endif
}
}
/**
* 获取当前加载的页面对象
* @param val
@@ -168,7 +195,7 @@ export function orderStatusList(val) {
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
COMPLETED:"已完成",
COMPLETED: "已完成",
COMPLETE: "已完成",
TAKE: "待核验",
};

View File

@@ -107,6 +107,11 @@ http.interceptors.response.use(
async (response) => {
/* 请求之后拦截器。可以使用async await 做异步操作 */
// token存在并且token过期
if (isRefreshing && response.statusCode === 403) {
cleanStorage();
isRefreshing = false;
}
let token = storage.getAccessToken();
if (
(token && response.statusCode === 403) ||

View File

@@ -8,6 +8,7 @@ const USER_INFO = isDev ? "user_info_obj_dev" : "user_info_obj";
const FACE_LOGIN = isDev ? "face_login_dev" : "face_login";
const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login";
const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn";
const AFTERSALE_DATA = isDev ? "aftersale_data_dev" : "aftersale_data";
export default {
// 写入热门搜索时间戳
setHotWords(val) {
@@ -91,4 +92,16 @@ export default {
removeRefreshToken() {
uni.removeStorageSync(REFRESH_TOKEN);
},
// 写入刷新token
setAfterSaleData(val) {
uni.setStorageSync(AFTERSALE_DATA, val);
},
// 获取刷新token
getAfterSaleData() {
return uni.getStorageSync(AFTERSALE_DATA);
},
// 删除token
removeAfterSaleData() {
uni.removeStorageSync(AFTERSALE_DATA);
},
};