49 Commits

Author SHA1 Message Date
lemon橪
08fffade74 适配api 2022-02-14 18:33:23 +08:00
lemon橪
c8adb52660 修改接口地址 2022-02-14 18:23:00 +08:00
paulGao
4f74502951 connect 2022-02-14 18:16:48 +08:00
paulGao
4a5a4c19a5 修改第三方登录 2022-02-14 18:09:51 +08:00
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
53 changed files with 1933 additions and 1053 deletions

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,8 @@
/** /**
* 公共API * 公共API
*/ */
import {http, Method} from '@/utils/request.js'; import { http, Method } from "@/utils/request.js";
import api from '@/config/api.js'; import api from "@/config/api.js";
/** /**
* 获取地区数据 * 获取地区数据
@@ -12,7 +10,16 @@ import api from '@/config/api.js';
*/ */
export function getRegionsById(id = 0) { export function getRegionsById(id = 0) {
return http.request({ 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, method: Method.GET,
message: false, message: false,
}); });
@@ -22,5 +29,4 @@ export function getRegionsById(id = 0) {
* 文件上传地址 * 文件上传地址
* @type {string} * @type {string}
*/ */
export const upload =api.common+'/upload/file'; export const upload = api.common + "/common/upload/file";

View File

@@ -15,7 +15,7 @@ const request = http.request;
*/ */
export function webConnect(code) { export function webConnect(code) {
return http.request({ return http.request({
url: `connect/login/web/${code}`, url: `passport/connect/connect/login/web/${code}`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
header: { header: {
@@ -25,7 +25,7 @@ export function webConnect(code) {
} }
export function openIdLogin(params, clientType) { export function openIdLogin(params, clientType) {
return http.request({ return http.request({
url: `connect/app/login`, url: `passport/connect/connect/app/login`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
data: params, data: params,
@@ -40,7 +40,7 @@ export function openIdLogin(params, clientType) {
*/ */
export function loginCallback(state) { export function loginCallback(state) {
return http.request({ return http.request({
url: `connect/result?state=${state}`, url: `passport/connect/connect/result?state=${state}`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}); });
@@ -54,7 +54,7 @@ export function loginCallback(state) {
*/ */
export function mpAutoLogin(params) { export function mpAutoLogin(params) {
return http.request({ return http.request({
url: 'mini-program/auto-login', url: 'passport/connect/miniProgram/auto-login',
method: Method.GET, method: Method.GET,
params params
}); });

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,8 +4,11 @@
*/ */
// 开发环境 // 开发环境
const dev = { const dev = {
common: "https://common-api.pickmall.cn", // common: "https://common-api.pickmall.cn",
buyer: "https://buyer-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商城", "name" : "lili商城",
"appid" : "__UNI__C100675", "appid" : "__UNI__C100675",
"description" : "", "description" : "",
"versionName" : "4.0.47", "versionName" : "4.0.49",
"versionCode" : 4000047, "versionCode" : 4000049,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
"compatible" : { "compatible" : {

View File

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

View File

@@ -28,7 +28,7 @@
<span v-if="item.scopeType == 'PORTION_CATEGORY'">仅限品类</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>
<view>有效期至{{ item.endTime.split(" ")[0] }}</view> <view v-if="item.endTime">有效期至:{{ item.endTime.split(" ")[0] }}</view>
</view> </view>
<view class="receive" @click="receive(item)"> <view class="receive" @click="receive(item)">
<text>点击</text><br /> <text>点击</text><br />

View File

@@ -1,6 +1,16 @@
<template> <template>
<div class="wrapper"> <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> </u-tabs>
<div class="empty" v-if="couponsList.length <= 0"> <div class="empty" v-if="couponsList.length <= 0">
@@ -26,15 +36,27 @@
<view v-if="item.scopeType"> <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> <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>
<view class="reason" v-if="item.reason">{{ item.reason }}</view> <view class="reason" v-if="item.reason">{{ item.reason }}</view>
<view class="end-time">有效期至:{{ item.endTime }}</view> <view class="end-time">有效期至:{{ item.endTime }}</view>
</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><br />
<text>使用</text> <text>使用</text>
</view> </view>
<view class="used" v-else @click="clickWay(item)">
<text>取消</text><br />
<text>使用</text>
</view>
<view class="bg-quan"></view> <view class="bg-quan"></view>
</view> </view>
</view> </view>
@@ -70,8 +92,7 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
this.routerVal = options this.routerVal = options;
}, },
watch: { watch: {
current(val) { current(val) {
@@ -84,6 +105,7 @@ export default {
mounted() { mounted() {
this.init(); this.init();
console.log(this.routerVal);
}, },
methods: { methods: {
@@ -99,7 +121,7 @@ export default {
clickWay(coupon) { clickWay(coupon) {
useCoupon({ useCoupon({
memberCouponId: coupon.id, memberCouponId: coupon.id,
used: true, used: !this.routerVal.selectedCoupon.includes(coupon.id),
way: this.routerVal.way, way: this.routerVal.way,
}).then((res) => { }).then((res) => {
if (res.data.success) { if (res.data.success) {
@@ -237,6 +259,20 @@ export default {
z-index: 2; 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 { .bg-quan {
width: 244rpx; width: 244rpx;
height: 244rpx; height: 244rpx;

View File

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

View File

@@ -1,7 +1,12 @@
<template> <template>
<view class="log-list"> <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 class="log-item-view"> <view class="log-item-view">
<view class="title">{{ <view class="title">{{
@@ -20,21 +25,32 @@
</view> </view>
</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 class="log-item-view"> <view class="log-item-view">
<view class="title">{{ item.goodsName }}</view> <view class="title">{{ item.goodsName }}</view>
<view class="price">+{{ item.rebate | unitPrice }}</view> <view class="price">提成金额+{{ item.rebate | unitPrice }}</view>
</view> </view>
<view class="log-item-view"> <view class="log-item-view">
<view>{{ item.createTime }}</view> <view>创建时间{{ item.createTime }}</view>
<view>{{item.storeName}}</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>
</view> </view>
<view class="empty" v-if="empty"> <view class="empty" v-if="empty">
<u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" /> <u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" />
</view> </view>
</view> </view>
</template> </template>
@@ -86,7 +102,7 @@ export default {
}); });
distributionOrderList(this.achParams).then((res) => { distributionOrderList(this.achParams).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) { if (res.data.success && res.data.result.records.length >= 1) {
this.achievementData = res.data.result.records; this.achievementData.push(...res.data.result.records);
} else { } else {
this.status = "nomore"; this.status = "nomore";
this.empty = true; this.empty = true;
@@ -101,7 +117,7 @@ export default {
}); });
cashLog(this.params).then((res) => { cashLog(this.params).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) { if (res.data.success && res.data.result.records.length >= 1) {
this.cashLogData = res.data.result.records; this.cashLogData.push(...res.data.result.records);
} else { } else {
this.status = "nomore"; this.status = "nomore";
this.empty = true; this.empty = true;
@@ -139,6 +155,19 @@ export default {
.log-item-view { .log-item-view {
padding: 8rpx 32rpx; padding: 8rpx 32rpx;
display: flex; 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; justify-content: space-between;
} }
</style> </style>

View File

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

View File

@@ -1,5 +1,10 @@
<template> <template>
<view class="myTracks"> <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> <u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else> <div v-else>
<view v-for="(item, index) in trackList" :key="index"> <view v-for="(item, index) in trackList" :key="index">
@@ -30,7 +35,6 @@
<uni-load-more :status="loadStatus"></uni-load-more> <uni-load-more :status="loadStatus"></uni-load-more>
</div> </div>
<view v-if="editFlag"> <view v-if="editFlag">
<view class="myTracks-action-placeholder"></view>
<view class="myTracks-action"> <view class="myTracks-action">
<view class="myTracks-action-check"> <view class="myTracks-action-check">
<u-checkbox-group> <u-checkbox-group>
@@ -41,7 +45,7 @@
</view> </view>
<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> </u-button>
</view> </view>
@@ -56,6 +60,7 @@ import { myTrackList, deleteHistoryListId } from "@/api/members.js";
export default { export default {
data() { data() {
return { return {
edit: "编辑",
editFlag: false, //是否编辑 editFlag: false, //是否编辑
allChecked: false, //是否全选 allChecked: false, //是否全选
loadStatus: "more", //底部下拉加载状态 loadStatus: "more", //底部下拉加载状态
@@ -165,11 +170,31 @@ export default {
/** /**
* 点击后判断是不是全选 * 点击后判断是不是全选
*/ */
changeChecked(val) { changeChecked(val) {
var opt = null;
const isCheckedAll = this.trackList.every((key) => { 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; 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> </script>
@@ -292,6 +305,18 @@ export default {
color: $light-color; color: $light-color;
padding: 10rpx 0 0 0; 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 { .myTracks-action-btn {
width: 130rpx; width: 130rpx;
@@ -304,9 +329,7 @@ export default {
height: 20rpx; height: 20rpx;
} }
.myTracks-action-placeholder {
height: 110rpx;
}
.myTracks-action-check { .myTracks-action-check {
align-items: center; align-items: center;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -45,7 +45,7 @@
<view class="cell-item"> <view class="cell-item">
<view class="cell-title"> 投诉凭证 </view> <view class="cell-title"> 投诉凭证 </view>
<view class="cell-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> </u-upload>
</view> </view>
</view> </view>

View File

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

View File

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

View File

@@ -4,45 +4,107 @@
<u-navbar :is-back="showBack" :border-bottom="false"></u-navbar> <u-navbar :is-back="showBack" :border-bottom="false"></u-navbar>
<div> <div>
<div class="title">{{ loginTitleWay[current].title }}</div> <div class="title">{{ loginTitleWay[current].title }}</div>
<div :class="current == 1 ? 'desc-light':'desc'">{{loginTitleWay[current].desc}}<span <div :class="current == 1 ? 'desc-light' : 'desc'">
v-if="current == 1">{{mobile | secrecyMobile}}</span></div> {{ loginTitleWay[current].desc
}}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
</div>
</div> </div>
<!-- 手机号 --> <!-- 手机号 -->
<div v-show="current == 0"> <div v-show="current == 0">
<u-input :custom-style="inputStyle" :placeholder-style="placeholderStyle" placeholder="请输入手机号 (11位)" <u-input
class='mobile' focus v-model="mobile" type="number" maxlength="11" /> :custom-style="inputStyle"
<div :class="!enabuleFetchCode ?'disable':'fetch'" @click="fetchCode" class=" btn">获取验证码</div> :placeholder-style="placeholderStyle"
placeholder="请输入手机号 (11位)"
class="mobile"
focus
v-model="mobile"
type="number"
maxlength="11"
/>
<div
:class="!enabuleFetchCode ? 'disable' : 'fetch'"
@click="fetchCode"
class="btn"
>
获取验证码
</div>
<div class="flex"> <div class="flex">
<u-checkbox-group :icon-size="24" width="45rpx"> <u-checkbox-group :icon-size="24" width="45rpx">
<u-checkbox shape="circle" v-model="enabulePrivacy" active-color="#FF5E00"></u-checkbox> <u-checkbox
shape="circle"
v-model="enabulePrivacy"
active-color="#FF5E00"
></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<div class="tips">未注册的手机号验证后将自动创建用户账号登录即代表您已同意<span @click="navigateToPrivacy('privacy')">使用条款及隐私协议</span> <div class="tips">
未注册的手机号验证后将自动创建用户账号登录即代表您已同意<span
@click="navigateToPrivacy('privacy')"
>使用条款及隐私协议</span
>
</div> </div>
</div> </div>
</div> </div>
<!-- 输入验证码 --> <!-- 输入验证码 -->
<div v-show="current == 1" class="box-code"> <div v-show="current == 1" class="box-code">
<verifyCode type="bottom" @confirm="submit" boxActiveColor="#D8D8D8" v-model="code" isFocus <verifyCode
boxNormalColor="#D8D8D8" cursorColor="#D8D8D8" /> type="bottom"
@confirm="submit"
boxActiveColor="#D8D8D8"
v-model="code"
isFocus
boxNormalColor="#D8D8D8"
cursorColor="#D8D8D8"
/>
<div class="fetch-btn"> <div class="fetch-btn">
<u-verification-code change-text="验证码已发送x" end-text="重新获取验证码" unique-key="page-login" <u-verification-code
:seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code> change-text="验证码已发送x"
end-text="重新获取验证码"
unique-key="page-login"
:seconds="seconds"
@end="end"
@start="start"
ref="uCode"
@change="codeChange"
></u-verification-code>
<span @tap="fetchCode" :style="{ color: codeColor }"> {{ tips }}</span> <span @tap="fetchCode" :style="{ color: codeColor }"> {{ tips }}</span>
</div> </div>
</div> </div>
<!-- 循环出当前可使用的第三方登录模式 --> <!-- 循环出当前可使用的第三方登录模式 -->
<div class="flex login-list"> <div class="flex login-list">
<div :style="{background:item.color}" class="login-item" v-for="(item,index) in loginList" :key="index"> <div
<u-icon v-if="item.title!='APPLE'" color="#fff" size="42" :name="item.icon" @click="navigateLogin(item)"> 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-icon>
<u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)" width="80" <u-image
height="80" /> v-else
src="/static/appleidButton@2x.png"
:lazy-load="false"
@click="navigateLogin(item)"
width="80"
height="80"
/>
</div> </div>
</div> </div>
<myVerification v-if="codeFlag" @send="verification" class="verification" ref="verification" business="LOGIN" /> <myVerification
v-if="codeFlag"
@send="verification"
class="verification"
ref="verification"
business="LOGIN"
/>
</div> </div>
<view v-else> <view v-else>
<wechatH5Login /> <wechatH5Login />
@@ -137,7 +199,6 @@ export default {
//#endif //#endif
}, },
mounted() { mounted() {
// #ifndef APP-PLUS // #ifndef APP-PLUS
//判断是否微信浏览器 //判断是否微信浏览器
@@ -423,7 +484,7 @@ export default {
// #ifdef H5 // #ifdef H5
let code = connectLogin.code; let code = connectLogin.code;
let buyer = api.buyer; let buyer = api.buyer;
window.open(buyer + `/connect/login/web/` + code, "_self"); window.open(buyer + `/passport/connect/connect/login/web/` + code, "_self");
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.nonH5OpenId(connectLogin); this.nonH5OpenId(connectLogin);
@@ -438,13 +499,11 @@ export default {
storage.setHasLogin(false); storage.setHasLogin(false);
storage.setAccessToken(""); storage.setAccessToken("");
storage.setRefreshToken(""); storage.setRefreshToken("");
storage.setUuid(this.uuid.v1());
storage.setUserInfo({}); storage.setUserInfo({});
/** /**
* 执行登录 * 执行登录
*/ */
smsLogin({ mobile: this.mobile, code: this.code }, this.clientType).then( smsLogin({ mobile: this.mobile, code: this.code }, this.clientType).then((res) => {
(res) => {
if (res.data.success) { if (res.data.success) {
storage.setAccessToken(res.data.result.accessToken); storage.setAccessToken(res.data.result.accessToken);
storage.setRefreshToken(res.data.result.refreshToken); storage.setRefreshToken(res.data.result.refreshToken);
@@ -478,8 +537,7 @@ export default {
} }
}); });
} }
} });
);
}, },
// 验证码验证 // 验证码验证
verification(val) { verification(val) {
@@ -636,7 +694,7 @@ page {
position: absolute; position: absolute;
bottom: 20px; bottom: 20px;
align-items: center; align-items: center;
justify-content: space-around; justify-content: center;
} }
.login-item { .login-item {
@@ -647,5 +705,7 @@ page {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin: 0 20rpx;
} }
</style> </style>

View File

@@ -43,7 +43,7 @@ export default {
getUserProfile() { getUserProfile() {
let code = "WECHAT"; let code = "WECHAT";
let buyer = api.buyer; let buyer = api.buyer;
window.open(buyer + `/connect/login/web/` + code, "_self"); window.open(buyer + `/passport/connect/connect/login/web/` + code, "_self");
}, },
backToHome() { backToHome() {
uni.switchTab({ uni.switchTab({
@@ -55,8 +55,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wx-auth-container { .wx-auth-container {
width: 100%; width: 100%;

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
<template> <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="header-title">选择地址</view>
<view class="view-box" v-if="addressDetail"> <view class="view-box" v-if="addressDetail">
<view class="view-item" v-for="(item, index) in addressDetail" :key="index" @click="clickAddress(item)"> <view class="view-item" v-for="(item, index) in addressDetail" :key="index" @click="clickAddress(item)">

View File

@@ -11,13 +11,13 @@
<span class="group-item-name">还差{{ order.toBeGroupedNum }}人成团</span> <span class="group-item-name">还差{{ order.toBeGroupedNum }}人成团</span>
</view> </view>
<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>
</view> </view>
<view v-else class="nomore"> <view v-else class="nomore">
<u-empty text="暂无拼团信息" mode="list"></u-empty> <u-empty text="暂无拼团信息" mode="list"></u-empty>
</view> </view>
</view> </view>

View File

@@ -1,22 +1,37 @@
<template> <template>
<view> <view>
<div v-for="(promotion, promotion_index) in res" :key="promotion_index"> <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"> <view class="group-wrapper">
<div class="u-group-row"> <div class="u-group-row">
<view :span="8" class="showBox_L"> <view :span="8" class="showBox_L">
<view class="u-group-flex"> <view class="u-group-flex">
<!-- 限时抢购 --> <!-- 限时抢购 -->
<view class="u-group-flex-left" v-if="promotion.__key == 'SECKILL'"> <view class="u-group-flex-left" v-if="promotion.__key == 'SECKILL'">
<span
<span class="u-group-flex-left-span" v-if="detail.promotionPrice!=undefined"> class="u-group-flex-left-span"
<span class="flex-price"> {{ formatPrice(detail.promotionPrice)[0]}}.{{ formatPrice(detail.promotionPrice)[1]}}</span> v-if="detail.promotionPrice != undefined"
>
<span class="flex-price">
{{ formatPrice(detail.promotionPrice)[0] }}.{{
formatPrice(detail.promotionPrice)[1]
}}</span
>
</span> </span>
<view class="u-group-flex" v-if="detail.price != undefined"> <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 class="promotion">限时抢购</view>
</view> </view>
</view> </view>
@@ -24,24 +39,44 @@
<!-- 团购 --> <!-- 团购 -->
<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="u-group-flex-left-span">
<span class="flex-price" <span
v-if="promotion.groupbuy_goods_vo.price !=undefined">{{ formatPrice(promotion.groupbuy_goods_vo.price )[0]}}.{{ formatPrice(promotion.groupbuy_goods_vo.price )[1]}}</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 v-if="promotion.point">+{{promotion.point}}积分</span> -->
</span> </span>
<view class="u-group-flex"> <view class="u-group-flex">
<span class="old-price" <span
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> 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 class="promotion">团购活动</view>
</view> </view>
</view> </view>
<view class="u-group-flex-left" v-if="promotion.__key == 'PINTUAN'"> <view class="u-group-flex-left" v-if="promotion.__key == 'PINTUAN'">
<span
<span class="u-group-flex-left-span" v-if="detail.promotionPrice != undefined"> class="u-group-flex-left-span"
<span class="flex-price"> {{ formatPrice(detail.promotionPrice)[0]}}.</span>{{ formatPrice(detail.promotionPrice)[1]}} v-if="detail.promotionPrice != undefined"
>
¥<span class="flex-price">
{{ formatPrice(detail.promotionPrice)[0] }}.</span
>{{ formatPrice(detail.promotionPrice)[1] }}
</span> </span>
<view class="u-group-flex" v-if="detail.price != undefined"> <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 class="promotion">拼团活动</view>
</view> </view>
</view> </view>
@@ -54,8 +89,17 @@
</view> </view>
<view class="showBox_R" v-if="promotion && promotion.endTime"> <view class="showBox_R" v-if="promotion && promotion.endTime">
<u-tag :text="getIsTimer(promotion)" size="mini" type="error" /> <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" <u-count-down
:timestamp="getCountDownTime(promotion.endTime)"></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> </view>
</div> </div>
</view> </view>
@@ -105,14 +149,13 @@ export default {
return val.toFixed(2).split("."); return val.toFixed(2).split(".");
}, },
getCountDownTime(val) { getCountDownTime(val) {
let date = new Date(val.replace(/-/g, "/")) let date = new Date(val);
let timeSimple = new Date(date).getTime() / 1000; let timeSimple = new Date(date).getTime() / 1000;
return timeSimple - new Date().getTime() / 1000; return timeSimple - new Date().getTime() / 1000;
}, },
getIsTimer(val) { getIsTimer(val) {
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
if (timestamp < val.start_time) { if (timestamp < val.start_time) {
this.startTimer = true; this.startTimer = true;
return "距离活动开始"; return "距离活动开始";

View File

@@ -1,29 +1,33 @@
<template> <template>
<view class="wrapper"> <view class="wrapper">
<div class="coupon-empty" v-if="!res">暂无优惠券</div> <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="coupon-item">
<view class="top"> <view class="top">
<div class="price"> <div class="price">
<span v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}</span> <span v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}</span>
<span v-if="item.couponType == 'PRICE'">{{ item.price | unitPrice }}</span> <span v-if="item.couponType == 'PRICE'">{{ item.price | unitPrice }}</span>
</div> </div>
<view class="text"> <view class="text">
<div class="coupon-List-title"> <div class="coupon-List-title">
<view v-if="item.scopeType"> <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> <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>
</div> </div>
<div>{{ item.consumeThreshold | unitPrice }}可用</div> <div>{{ item.consumeThreshold | unitPrice }}可用</div>
</view> </view>
<view class="lingqu-btn" @click="getCoupon(item)"> <view class="lingqu-btn" @click="getCoupon(item, index)">
<div :class="yhqFlag ? 'cur' : ''">{{ yhqFlag ? '已领取或领完' : '立即领取' }}</div> <div :class="yhqFlag[index] ? 'cur' : ''">
{{ yhqFlag[index] ? "已领取或领完" : "立即领取" }}
</div>
</view> </view>
</view> </view>
<view class="line"></view> <view class="line"></view>
@@ -37,7 +41,8 @@
export default { export default {
data() { data() {
return { return {
yhqFlag: false, //获取优惠券判断是否点击 yhqFlag: [], //获取优惠券判断是否点击
couponRes: {},
}; };
}, },
props: { props: {
@@ -52,7 +57,9 @@ export default {
if (this.res && this.res.length != 0) { if (this.res && this.res.length != 0) {
Object.keys(this.res).forEach((item) => { Object.keys(this.res).forEach((item) => {
let key = item.split("-")[0]; 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: { methods: {
// 提交优惠券 // 提交优惠券
getCoupon(item) { getCoupon(item, index) {
this.yhqFlag = true; this.yhqFlag[index] = true;
this.$emit("getCoupon", item); this.$emit("getCoupon", item);
}, },
}, },

View File

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

View File

@@ -1,33 +1,52 @@
<template> <template>
<view> <view>
<view
<view v-for="(promotionItem,promotionIndex) in promotion" :key="promotionIndex" class="promotion_row" @click="shutMask(1)"> 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"> <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="promotion_col"
v-if="
item.split('-')[0] == promotionItem.value &&
item.split('-')[0] == 'FULL_DISCOUNT'
"
>
<!-- 满减,折扣 --> <!-- 满减,折扣 -->
<div class="flex"> <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 class="text proText">满{{ res[item].fullMoney }}元,立享优惠</div>
</div> </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"> <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 class="text proText">{{ res[item].promotionName }}</div>
</div> </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"> <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 class="text proText">{{ res[item].promotionName }}</div>
</div> </div>
</div> </div>
</view> </view>
<view class="promotion_row" style="display:inline;"> <view class="promotion_row" style="display: inline">
<view> <view>
<div class="promotion_col coupon" v-if="couponList && promotionIndex == 1"> <div class="promotion_col coupon" v-if="couponList && promotionIndex == 1">
<!-- 优惠券 --> <!-- 优惠券 -->
@@ -35,16 +54,12 @@
<div> <div>
<view class="deg_tag">优惠券</view> <view class="deg_tag">优惠券</view>
</div> </div>
</div> </div>
</view> </view>
</view> </view>
</view> </view>
<view v-if=" this.res != null && Object.keys(res).length == 0"> <view v-if="this.res != null && Object.keys(res).length == 0"> 暂无促销信息 </view>
暂无促销信息
</view>
</view> </view>
</template> </template>
@@ -69,7 +84,6 @@ export default {
handler() { handler() {
if (this.res && this.res.length != 0 && this.res != null) { if (this.res && this.res.length != 0 && this.res != null) {
Object.keys(this.res).forEach((item) => { Object.keys(this.res).forEach((item) => {
let key = item.split("-")[0]; let key = item.split("-")[0];
this.res[item].__key = key; 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-image width="100%" height="330rpx" mode="aspectFit" :src="item.content.thumbnail">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
</u-image> </u-image>
<div class="name">{{ item.content.goodsName }}</div> <div class="name wes-2">{{ item.content.goodsName }}</div>
<div class="price"> <div class="price">
<div>{{ item.content.price | unitPrice }}</div> <div>{{ item.content.price | unitPrice }}</div>
</div> </div>
@@ -126,7 +126,7 @@ export default {
}, },
watch: { watch: {
current(val) { current(val) {
val == 0 ? this.getGoodsData() : this.getCategoryData(); val == 0 ? ()=>{ this.goodsList = []; this.getGoodsData()} : this.getCategoryData();
}, },
}, },
@@ -421,8 +421,7 @@ export default {
color: #333; color: #333;
padding: 0 20rpx; padding: 0 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
line-height: 1.4em; height: 80rpx;
max-height: 2.8em; //height是line-height的整数倍防止文字显示不全
overflow: hidden; overflow: hidden;
} }
.price { .price {

View File

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

View File

@@ -26,7 +26,7 @@
<div v-if="groupBuy.length !=0"> <div v-if="groupBuy.length !=0">
<view class="view-item" v-for="(groupItem, groupIndex) in groupBuy" :key="groupIndex"> <view class="view-item" v-for="(groupItem, groupIndex) in groupBuy" :key="groupIndex">
<view class="view-left"> <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> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
@@ -42,7 +42,7 @@
{{groupItem.price | unitPrice }} {{groupItem.price | unitPrice }}
</view> </view>
<view class="view-content-original_price"> <view class="view-content-original_price">
{{ groupItem.originPrice | unitPrice }} {{ groupItem.originalPrice | unitPrice }}
</view> </view>
</view> </view>

View File

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

View File

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

View File

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

View File

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

View File

@@ -107,6 +107,11 @@ http.interceptors.response.use(
async (response) => { async (response) => {
/* 请求之后拦截器。可以使用async await 做异步操作 */ /* 请求之后拦截器。可以使用async await 做异步操作 */
// token存在并且token过期 // token存在并且token过期
if (isRefreshing && response.statusCode === 403) {
cleanStorage();
isRefreshing = false;
}
let token = storage.getAccessToken(); let token = storage.getAccessToken();
if ( if (
(token && response.statusCode === 403) || (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 FACE_LOGIN = isDev ? "face_login_dev" : "face_login";
const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login"; const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login";
const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn"; const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn";
const AFTERSALE_DATA = isDev ? "aftersale_data_dev" : "aftersale_data";
export default { export default {
// 写入热门搜索时间戳 // 写入热门搜索时间戳
setHotWords(val) { setHotWords(val) {
@@ -91,4 +92,16 @@ export default {
removeRefreshToken() { removeRefreshToken() {
uni.removeStorageSync(REFRESH_TOKEN); 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);
},
}; };