mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-19 17:05:55 +08:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e73d76eb57 | ||
|
|
b9a89d7c40 | ||
|
|
1a1bf814a0 | ||
|
|
f52e929d04 | ||
|
|
38d8d2e1ca | ||
|
|
ab4015d0e0 | ||
|
|
15027e51ee | ||
|
|
557d7ef1d9 | ||
|
|
4dea906e23 | ||
|
|
68e25cb0b3 | ||
|
|
4d033e59f1 | ||
|
|
a80c579d8a | ||
|
|
5cc48ed462 | ||
|
|
2abc8ff9d8 | ||
|
|
198bd6c322 | ||
|
|
7fb96f1eac | ||
|
|
2020f55826 | ||
|
|
c58f8d7831 | ||
|
|
32a6bbacd0 | ||
|
|
b08c77b6c0 | ||
|
|
a8836744f6 | ||
|
|
3a2202a2e8 | ||
|
|
896749d812 | ||
|
|
09ec1e8c06 | ||
|
|
07627c41e3 | ||
|
|
e4e278c2fa | ||
|
|
1b1b239ba0 | ||
|
|
c1d4d39265 | ||
|
|
dfd3885486 | ||
|
|
892f49c83a | ||
|
|
85d0671443 | ||
|
|
f22e7b9fcb | ||
|
|
d282ef1b24 | ||
|
|
9c2529ae3d | ||
|
|
108b7f5b0b | ||
|
|
b4c8be3e63 | ||
|
|
4064c56b21 | ||
|
|
1416762afe | ||
|
|
17f23fe920 | ||
|
|
c412c92b3e | ||
|
|
deed875c1b | ||
|
|
f600b628ce | ||
|
|
0c887a25e3 | ||
|
|
89dbd32351 | ||
|
|
98c5863973 |
@@ -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,
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,32 @@
|
|||||||
/**
|
/**
|
||||||
* 公共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";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取地区数据
|
||||||
/**
|
* @param id
|
||||||
* 获取地区数据
|
*/
|
||||||
* @param id
|
export function getRegionsById(id = 0) {
|
||||||
*/
|
return http.request({
|
||||||
export function getRegionsById(id = 0) {
|
url: `${api.common}/common/region/item/${id}`,
|
||||||
return http.request({
|
method: Method.GET,
|
||||||
url: `${api.common}/region/item/${id}`,
|
message: false,
|
||||||
method: Method.GET,
|
});
|
||||||
message: false,
|
}
|
||||||
});
|
|
||||||
}
|
// 获取IM接口前缀
|
||||||
|
export function getIMDetail() {
|
||||||
/**
|
return http.request({
|
||||||
* 文件上传地址
|
url: `${api.common}/IM`,
|
||||||
* @type {string}
|
method: Method.GET,
|
||||||
*/
|
message: false,
|
||||||
export const upload =api.common+'/upload/file';
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件上传地址
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
export const upload = api.common + "/common/upload/file";
|
||||||
|
|||||||
26
api/goods.js
26
api/goods.js
@@ -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,
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
12
api/login.js
12
api/login.js
@@ -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,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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,
|
||||||
});
|
});
|
||||||
|
|||||||
11
api/store.js
11
api/store.js
@@ -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,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,48 @@
|
|||||||
<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">
|
||||||
¥
|
¥
|
||||||
<span class="goods-price-bigshow">{{
|
<span class="goods-price-bigshow">{{
|
||||||
formatPrice(goodsDetail.price)[0]
|
formatPrice(goodsDetail.price)[0]
|
||||||
}}</span>
|
}}</span>
|
||||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<!-- 正常商品的价格 -->
|
<!-- 正常商品的价格 -->
|
||||||
@@ -37,10 +50,9 @@
|
|||||||
<span>
|
<span>
|
||||||
¥
|
¥
|
||||||
<span class="goods-price-bigshow">{{
|
<span class="goods-price-bigshow">{{
|
||||||
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,
|
||||||
@@ -140,15 +181,17 @@ export default {
|
|||||||
default: "",
|
default: "",
|
||||||
type: null,
|
type: null,
|
||||||
},
|
},
|
||||||
pointDetail:{
|
pointDetail: {
|
||||||
default: "",
|
default: "",
|
||||||
type: null,
|
type: null,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
buyType: {
|
buyType: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.buyType = val;
|
if (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") {
|
||||||
@@ -215,7 +256,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直接购买
|
* 直接购买
|
||||||
*/
|
*/
|
||||||
buy(data) {
|
buy(data) {
|
||||||
@@ -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],
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|
||||||
};
|
};
|
||||||
// 生产环境
|
// 生产环境
|
||||||
|
|||||||
@@ -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" : {
|
||||||
|
|||||||
21
pages.json
21
pages.json
@@ -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"
|
||||||
|
|||||||
@@ -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 />
|
||||||
|
|||||||
@@ -1,12 +1,22 @@
|
|||||||
<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">
|
||||||
<u-empty text="暂无优惠券" mode="coupon"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon"></u-empty>
|
||||||
</div>
|
</div>
|
||||||
<view class="coupon-item" v-for="(item, index) in couponsList" :key="index" >
|
<view class="coupon-item" v-for="(item, index) in couponsList" :key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="wave-line">
|
<view class="wave-line">
|
||||||
<view class="wave" v-for="(item, index) in 12" :key="index"></view>
|
<view class="wave" v-for="(item, index) in 12" :key="index"></view>
|
||||||
@@ -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>
|
||||||
@@ -69,9 +91,8 @@ export default {
|
|||||||
routerVal: "", //上级传参
|
routerVal: "", //上级传参
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
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) {
|
||||||
@@ -216,7 +238,7 @@ export default {
|
|||||||
> view:nth-child(1) {
|
> view:nth-child(1) {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
|
|
||||||
> view:nth-child(1) {
|
> view:nth-child(1) {
|
||||||
color: #ff6262;
|
color: #ff6262;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -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",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
</style>
|
.log-item-footer {
|
||||||
|
padding: 8rpx 32rpx;
|
||||||
|
display: flex;
|
||||||
|
font-size: 13px;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.log-item-footers {
|
||||||
|
padding: 8rpx 32rpx;
|
||||||
|
display: flex;
|
||||||
|
font-size: 13px;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,422 +1,440 @@
|
|||||||
<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 class="swiper-box">
|
||||||
</view>
|
<!-- 显示商品栏 -->
|
||||||
</view>
|
<view v-if="tabCurrentIndex == 0" class="tab-content">
|
||||||
<view class="swiper-box">
|
<scroll-view class="list-scroll-content" scroll-y>
|
||||||
<!-- 显示商品栏 -->
|
<!-- 空白页 -->
|
||||||
<view v-if="tabCurrentIndex == 0" class="tab-content">
|
<u-empty style="margin-top: 40rpx" text="暂无收藏商品数据" mode="favor" v-if="goodsEmpty"></u-empty>
|
||||||
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadMore">
|
<!-- 商品展示数据 -->
|
||||||
<!-- 空白页 -->
|
<u-swipe-action @open="openLeftChange(item, index, 'goods')" :show="item.selected" btn-width="180"
|
||||||
<u-empty style="margin-top:40rpx;" text="暂无收藏商品数据" mode="favor" v-if="goodsEmpty"></u-empty>
|
:options="LeftOptions" v-else v-for="(item, index) in goodList"
|
||||||
<!-- 商品展示数据 -->
|
@click="clickGoodsSwiperAction(item, index)" :index="index" :key="index">
|
||||||
<u-swipe-action @open="openLeftChange(item,index,'goods')" :show="item.selected" btn-width="180"
|
<view class="goods" @click="goGoodsDetail(item)">
|
||||||
:options="LeftOptions" v-else v-for="(item,index) in goodList" @click="clickGoodsSwiperAction(item,index)"
|
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
|
||||||
:index="index" :key="index">
|
<u-loading slot="loading"></u-loading>
|
||||||
<view class="goods" @click="goGoodsDetail(item)">
|
</u-image>
|
||||||
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
|
<view class="goods-intro">
|
||||||
<u-loading slot="loading"></u-loading>
|
<view>{{ item.goodsName }}</view>
|
||||||
</u-image>
|
<view class="goods-sn">{{ item.goods_sn }}</view>
|
||||||
<view class="goods-intro">
|
<view>¥{{ item.price | unitPrice }}</view>
|
||||||
<view>{{item.goodsName}}</view>
|
</view>
|
||||||
<view class="goods-sn">{{item.goods_sn}}</view>
|
</view>
|
||||||
<view>¥{{item.price | unitPrice}}</view>
|
</u-swipe-action>
|
||||||
</view>
|
|
||||||
</view>
|
</scroll-view>
|
||||||
</u-swipe-action>
|
</view>
|
||||||
|
<!-- 显示收藏的店铺栏 -->
|
||||||
<uni-load-more :status="goodsLoad"></uni-load-more>
|
<view v-else class="tab-content">
|
||||||
</scroll-view>
|
<scroll-view class="list-scroll-content" scroll-y>
|
||||||
</view>
|
<!-- 空白页 -->
|
||||||
<!-- 显示收藏的店铺栏 -->
|
<u-empty style="margin-top: 40rpx" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
|
||||||
<view v-else class="tab-content">
|
<!-- 店铺展示数据 -->
|
||||||
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadMore">
|
<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"
|
||||||
<u-empty style="margin-top:40rpx;" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
|
@click="clickStoreSwiperAction(item)">
|
||||||
<!-- 店铺展示数据 -->
|
<view class="store" @click="goStoreMainPage(item.id)">
|
||||||
<u-swipe-action @open="openLeftChange(item,'store')" :show="item.selected" btn-width="180"
|
<view class="intro">
|
||||||
:options="LeftOptions" v-else v-for="(item,index) in storeList" :key="index"
|
<view class="store-logo">
|
||||||
@click="clickstoreSwiperAction(item)">
|
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
|
||||||
<view class="store" @click="gostoreMainPage(item.id)">
|
mode="aspectFit">
|
||||||
<view class="intro">
|
<u-loading slot="loading"></u-loading>
|
||||||
<view class="store-logo">
|
</u-image>
|
||||||
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName" mode="aspectFit">
|
</view>
|
||||||
<u-loading slot="loading"></u-loading>
|
<view class="store-name">
|
||||||
</u-image>
|
<view>{{ item.storeName }}</view>
|
||||||
</view>
|
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
|
||||||
<view class="store-name">
|
text="自营" mode="plain" shape="circle" />
|
||||||
<view>{{item.storeName}}</view>
|
</view>
|
||||||
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated" text="自营" mode="plain"
|
<view class="store-collect">
|
||||||
shape="circle" />
|
<view>进店逛逛</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="store-collect">
|
</view>
|
||||||
<view>进店逛逛</view>
|
</view>
|
||||||
</view>
|
</u-swipe-action>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</u-swipe-action>
|
</view>
|
||||||
<uni-load-more :status="storeLoad"></uni-load-more>
|
</view>
|
||||||
</scroll-view>
|
</template>
|
||||||
</view>
|
|
||||||
</view>
|
<script>
|
||||||
</view>
|
import {
|
||||||
</template>
|
getGoodsCollection,
|
||||||
|
deleteGoodsCollection,
|
||||||
<script>
|
deleteStoreCollection,
|
||||||
import {
|
} from "@/api/members.js";
|
||||||
getGoodsCollection,
|
export default {
|
||||||
deleteGoodsCollection,
|
data() {
|
||||||
deleteStoreCollection,
|
return {
|
||||||
} from "@/api/members.js";
|
lightColor:this.$lightColor,
|
||||||
export default {
|
// 商品左滑侧边栏
|
||||||
data() {
|
LeftOptions: [{
|
||||||
return {
|
text: "取消",
|
||||||
// 商品左滑侧边栏
|
style: {
|
||||||
LeftOptions: [
|
backgroundColor: this.$lightColor,
|
||||||
{
|
},
|
||||||
text: "取消",
|
}, ],
|
||||||
style: {
|
tabCurrentIndex: 0, //tab的下标默认为0,也就是说会默认请求商品
|
||||||
backgroundColor: this.$lightColor,
|
navList: [
|
||||||
},
|
//tab显示数据
|
||||||
},
|
{
|
||||||
],
|
name: "商品(0)",
|
||||||
tabCurrentIndex: 0, //tab的下标默认为0,也就是说会默认请求商品
|
|
||||||
navList: [
|
params: {
|
||||||
//tab显示数据
|
pageNumber: 1,
|
||||||
{
|
pageSize: 10,
|
||||||
text: "商品(0)",
|
},
|
||||||
loadingType: "more",
|
},
|
||||||
params: {
|
{
|
||||||
pageNumber: 1,
|
name: "店铺(0)",
|
||||||
pageSize: 10,
|
|
||||||
},
|
params: {
|
||||||
},
|
pageNumber: 1,
|
||||||
{
|
pageSize: 10,
|
||||||
text: "店铺(0)",
|
},
|
||||||
loadingType: "more",
|
},
|
||||||
params: {
|
],
|
||||||
pageNumber: 1,
|
|
||||||
pageSize: 10,
|
goodsEmpty: false, //商品数据是否为空
|
||||||
},
|
storeEmpty: false, //店铺数据是否为空
|
||||||
},
|
goodList: [], //商品集合
|
||||||
],
|
storeList: [], //店铺集合
|
||||||
goodsLoad: "more", //商品加载
|
};
|
||||||
storeLoad: "more", //店铺加载
|
},
|
||||||
goodsEmpty: false, //商品数据是否为空
|
onLoad() {
|
||||||
storeEmpty: false, //店铺数据是否为空
|
this.getGoodList();
|
||||||
goodList: [], //商品集合
|
this.getStoreList();
|
||||||
storeList: [], //店铺集合
|
},
|
||||||
};
|
onReachBottom() {
|
||||||
},
|
if (this.tabCurrentIndex == 0) {
|
||||||
onLoad() {
|
this.navList[0].params.pageNumber++;
|
||||||
this.getGoodList();
|
this.getGoodList();
|
||||||
this.getstoreList();
|
} else {
|
||||||
},
|
this.navList[1].params.pageNumber++;
|
||||||
|
this.getStoreList();
|
||||||
methods: {
|
}
|
||||||
/**
|
},
|
||||||
* 打开商品左侧取消收藏
|
|
||||||
*/
|
methods: {
|
||||||
openLeftChange(val, type) {
|
/**
|
||||||
const { goodList, storeList } = this;
|
* 打开商品左侧取消收藏
|
||||||
let way;
|
*/
|
||||||
type == "goods" ? (way = goodList) : (way = storeList);
|
openLeftChange(val, type) {
|
||||||
way.forEach((item) => {
|
const {
|
||||||
this.$set(item, "selected", false);
|
goodList,
|
||||||
});
|
storeList
|
||||||
this.$set(val, "selected", false);
|
} = this;
|
||||||
val.selected = true;
|
let way;
|
||||||
},
|
type == "goods" ? (way = goodList) : (way = storeList);
|
||||||
|
way.forEach((item) => {
|
||||||
/**
|
this.$set(item, "selected", false);
|
||||||
* 点击商品左侧取消收藏
|
});
|
||||||
*/
|
this.$set(val, "selected", false);
|
||||||
clickGoodsSwiperAction(val) {
|
val.selected = true;
|
||||||
deleteGoodsCollection(val.skuId).then((res) => {
|
},
|
||||||
if (res.statusCode == 200) {
|
|
||||||
this.storeList = [];
|
/**
|
||||||
this.goodList = [];
|
* 点击商品左侧取消收藏
|
||||||
this.getGoodList();
|
*/
|
||||||
}
|
clickGoodsSwiperAction(val) {
|
||||||
});
|
deleteGoodsCollection(val.skuId).then((res) => {
|
||||||
},
|
if (res.statusCode == 200) {
|
||||||
|
this.storeList = [];
|
||||||
/**
|
this.goodList = [];
|
||||||
* 点击店铺左侧取消收藏
|
this.getGoodList();
|
||||||
*/
|
}
|
||||||
clickstoreSwiperAction(val) {
|
});
|
||||||
deleteStoreCollection(val.storeId).then((res) => {
|
},
|
||||||
if (res.statusCode == 200) {
|
|
||||||
this.storeList = [];
|
/**
|
||||||
this.getstoreList();
|
* 点击店铺左侧取消收藏
|
||||||
}
|
*/
|
||||||
});
|
clickStoreSwiperAction(val) {
|
||||||
},
|
deleteStoreCollection(val.storeId).then((res) => {
|
||||||
|
if (res.statusCode == 200) {
|
||||||
/**
|
this.storeList = [];
|
||||||
* 顶部tab点击
|
this.getStoreList();
|
||||||
*/
|
}
|
||||||
tabClick(index) {
|
});
|
||||||
this.tabCurrentIndex = index;
|
},
|
||||||
},
|
|
||||||
|
/**
|
||||||
/**
|
* 顶部tab点击
|
||||||
* 查看商品详情
|
*/
|
||||||
*/
|
tabClick(index) {
|
||||||
goGoodsDetail(val) {
|
this.tabCurrentIndex = index;
|
||||||
//商品详情
|
},
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/product/goods?id=" + val.skuId + "&goodsId=" + val.goodsId,
|
/**
|
||||||
});
|
* 查看商品详情
|
||||||
},
|
*/
|
||||||
|
goGoodsDetail(val) {
|
||||||
/**
|
//商品详情
|
||||||
* 查看店铺详情
|
uni.navigateTo({
|
||||||
*/
|
url: "/pages/product/goods?id=" + val.skuId + "&goodsId=" + val.goodsId,
|
||||||
gostoreMainPage(id) {
|
});
|
||||||
//店铺主页
|
},
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/product/shopPage?id=" + id,
|
/**
|
||||||
});
|
* 查看店铺详情
|
||||||
},
|
*/
|
||||||
|
goStoreMainPage(id) {
|
||||||
/**
|
//店铺主页
|
||||||
* 获取商品集合
|
uni.navigateTo({
|
||||||
*/
|
url: "/pages/product/shopPage?id=" + id,
|
||||||
getGoodList() {
|
});
|
||||||
uni.showLoading({
|
},
|
||||||
title: "加载中",
|
|
||||||
});
|
/**
|
||||||
getGoodsCollection(this.navList[0].params, "GOODS").then((res) => {
|
* 获取商品集合
|
||||||
uni.hideLoading();
|
*/
|
||||||
uni.stopPullDownRefresh();
|
getGoodList() {
|
||||||
if (res.data.success) {
|
uni.showLoading({
|
||||||
let data = res.data.result;
|
title: "加载中",
|
||||||
data.selected = false;
|
});
|
||||||
this.navList[0].text = `商品(${data.total})`;
|
getGoodsCollection(this.navList[0].params, "GOODS").then((res) => {
|
||||||
if (data.total == 0) {
|
uni.hideLoading();
|
||||||
this.goodsEmpty = true;
|
uni.stopPullDownRefresh();
|
||||||
} else if (data.total < 10) {
|
if (res.data.success) {
|
||||||
this.goodsLoad = "noMore";
|
let data = res.data.result;
|
||||||
this.goodList.push(...data.records);
|
data.selected = false;
|
||||||
} else {
|
this.navList[0].name = `商品(${data.total})`;
|
||||||
this.goodList.push(...data.records);
|
|
||||||
if (data.total.length < 10) this.goodsLoad = "noMore";
|
if (data.total == 0) {
|
||||||
}
|
this.goodsEmpty = true;
|
||||||
}
|
} else if (data.total < 10) {
|
||||||
});
|
this.goodsLoad = "noMore";
|
||||||
},
|
this.goodList.push(...data.records);
|
||||||
|
} else {
|
||||||
/**
|
this.goodList.push(...data.records);
|
||||||
* 获取店铺集合
|
if (data.total.length < 10) this.goodsLoad = "noMore";
|
||||||
*/
|
}
|
||||||
getstoreList() {
|
}
|
||||||
uni.showLoading({
|
});
|
||||||
title: "加载中",
|
},
|
||||||
});
|
|
||||||
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
/**
|
||||||
uni.hideLoading();
|
* 获取店铺集合
|
||||||
uni.stopPullDownRefresh();
|
*/
|
||||||
if (res.data.success) {
|
getStoreList() {
|
||||||
let data = res.data.result;
|
uni.showLoading({
|
||||||
data.selected = false;
|
title: "加载中",
|
||||||
this.navList[1].text = `店铺(${data.total})`;
|
});
|
||||||
if (data.total == 0) {
|
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
||||||
this.storeEmpty = true;
|
uni.hideLoading();
|
||||||
} else if (data.total < 10) {
|
uni.stopPullDownRefresh();
|
||||||
this.storeLoad = "noMore";
|
if (res.data.success) {
|
||||||
this.storeList.push(...data.records);
|
let data = res.data.result;
|
||||||
} else {
|
data.selected = false;
|
||||||
this.storeList.push(...data.records);
|
this.navList[1].name = `店铺(${data.total})`;
|
||||||
if (data.total.length < 10) this.storeLoad = "noMore";
|
if (data.total == 0) {
|
||||||
}
|
this.storeEmpty = true;
|
||||||
}
|
} else if (data.total < 10) {
|
||||||
});
|
|
||||||
},
|
this.storeList.push(...data.records);
|
||||||
|
}
|
||||||
/**
|
}
|
||||||
* 底部加载更多
|
});
|
||||||
*/
|
},
|
||||||
loadMore() {
|
},
|
||||||
if (this.tabCurrentIndex == 0) {
|
|
||||||
this.navList[0].params.pageNumber++;
|
/**
|
||||||
this.getGoodList();
|
* 下拉刷新时
|
||||||
} else {
|
*/
|
||||||
this.navList[1].params.pageNumber++;
|
onPullDownRefresh() {
|
||||||
this.getstoreList();
|
if (this.tabCurrentIndex == 0) {
|
||||||
}
|
this.navList[0].params.pageNumber = 1;
|
||||||
},
|
this.goodList = [];
|
||||||
},
|
this.getGoodList();
|
||||||
|
} else {
|
||||||
/**
|
this.navList[1].params.pageNumber = 1;
|
||||||
* 下拉刷新时
|
this.storeList = [];
|
||||||
*/
|
this.getStoreList();
|
||||||
onPullDownRefresh() {
|
}
|
||||||
if (this.tabCurrentIndex == 0) {
|
},
|
||||||
this.navList[0].params.pageNumber = 1;
|
};
|
||||||
this.goodList = [];
|
</script>
|
||||||
this.getGoodList();
|
|
||||||
} else {
|
<style lang="scss">
|
||||||
this.navList[1].params.pageNumber = 1;
|
page,
|
||||||
this.storeList = [];
|
.content {
|
||||||
this.getstoreList();
|
background: $page-color-base;
|
||||||
}
|
height: 100%;
|
||||||
},
|
}
|
||||||
};
|
|
||||||
</script>
|
.slot-wrap{
|
||||||
|
flex: 1;
|
||||||
<style lang="scss">
|
display: flex;
|
||||||
page,
|
justify-content: center;
|
||||||
.content {
|
padding-right: 72rpx;
|
||||||
background: $page-color-base;
|
}
|
||||||
height: 100%;
|
|
||||||
}
|
.content {
|
||||||
.content {
|
width: 100%;
|
||||||
width: 100%;
|
}
|
||||||
overflow: hidden;
|
|
||||||
}
|
.swiper-box {
|
||||||
.swiper-box {
|
overflow-y: auto;
|
||||||
overflow-y: auto;
|
}
|
||||||
}
|
|
||||||
|
.list-scroll-content {
|
||||||
.list-scroll-content {
|
height: 100%;
|
||||||
height: 100%;
|
width: 100%;
|
||||||
width: 100%;
|
}
|
||||||
}
|
|
||||||
|
/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;
|
||||||
height: 190rpx;
|
height: 190rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 30rpx 20rpx;
|
padding: 30rpx 20rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
image {
|
|
||||||
width: 131rpx;
|
image {
|
||||||
height: 131rpx;
|
width: 131rpx;
|
||||||
border-radius: 10rpx;
|
height: 131rpx;
|
||||||
}
|
border-radius: 10rpx;
|
||||||
.goods-intro {
|
}
|
||||||
flex: 1;
|
|
||||||
font-size: $font-base;
|
.goods-intro {
|
||||||
line-height: 48rpx;
|
flex: 1;
|
||||||
margin-left: 30rpx;
|
font-size: $font-base;
|
||||||
|
line-height: 48rpx;
|
||||||
view:nth-child(1) {
|
margin-left: 30rpx;
|
||||||
line-height: 1.4em;
|
|
||||||
font-size: 24rpx;
|
view:nth-child(1) {
|
||||||
max-height: 2.8em; //height是line-height的整数倍,防止文字显示不全
|
line-height: 1.4em;
|
||||||
overflow: hidden;
|
font-size: 24rpx;
|
||||||
color: #666;
|
max-height: 2.8em; //height是line-height的整数倍,防止文字显示不全
|
||||||
}
|
overflow: hidden;
|
||||||
view:nth-child(2) {
|
color: #666;
|
||||||
color: #cccccc;
|
}
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
view:nth-child(2) {
|
||||||
view:nth-child(3) {
|
color: #cccccc;
|
||||||
color: $light-color;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
button {
|
view:nth-child(3) {
|
||||||
color: $main-color;
|
color: $light-color;
|
||||||
height: 50rpx;
|
}
|
||||||
width: 120rpx;
|
}
|
||||||
font-size: $font-sm;
|
|
||||||
padding: 0;
|
button {
|
||||||
line-height: 50rpx;
|
color: $main-color;
|
||||||
background-color: #ffffff;
|
height: 50rpx;
|
||||||
margin-top: 80rpx;
|
width: 120rpx;
|
||||||
&::after {
|
font-size: $font-sm;
|
||||||
border-color: $main-color;
|
padding: 0;
|
||||||
}
|
line-height: 50rpx;
|
||||||
}
|
background-color: #ffffff;
|
||||||
}
|
margin-top: 80rpx;
|
||||||
.store {
|
|
||||||
background-color: #fff;
|
&::after {
|
||||||
border: 1px solid $border-color-light;
|
border-color: $main-color;
|
||||||
border-radius: 16rpx;
|
}
|
||||||
margin: 20rpx 10rpx;
|
}
|
||||||
.intro {
|
}
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
.store {
|
||||||
align-items: center;
|
background-color: #fff;
|
||||||
padding: 0 30rpx 0 40rpx;
|
border: 1px solid $border-color-light;
|
||||||
height: 170rpx;
|
border-radius: 16rpx;
|
||||||
|
margin: 20rpx 10rpx;
|
||||||
.store-logo {
|
|
||||||
width: 102rpx;
|
.intro {
|
||||||
height: 102rpx;
|
display: flex;
|
||||||
border-radius: 50%;
|
justify-content: space-between;
|
||||||
overflow: hidden;
|
align-items: center;
|
||||||
image {
|
padding: 0 30rpx 0 40rpx;
|
||||||
width: 100%;
|
height: 170rpx;
|
||||||
height: 100%;
|
|
||||||
border-radius: 50%;
|
.store-logo {
|
||||||
}
|
width: 102rpx;
|
||||||
}
|
height: 102rpx;
|
||||||
.store-name {
|
border-radius: 50%;
|
||||||
flex: 1;
|
overflow: hidden;
|
||||||
margin-left: 30rpx;
|
|
||||||
line-height: 2em;
|
image {
|
||||||
:first-child {
|
width: 100%;
|
||||||
font-size: $font-base;
|
height: 100%;
|
||||||
}
|
border-radius: 50%;
|
||||||
:last-child {
|
}
|
||||||
font-size: $font-sm;
|
}
|
||||||
color: #999;
|
|
||||||
}
|
.store-name {
|
||||||
}
|
flex: 1;
|
||||||
.store-collect {
|
margin-left: 30rpx;
|
||||||
border-left: 1px solid $border-color-light;
|
line-height: 2em;
|
||||||
padding-left: 20rpx;
|
|
||||||
text-align: center;
|
:first-child {
|
||||||
:last-child {
|
font-size: $font-base;
|
||||||
color: #999;
|
}
|
||||||
font-size: $font-sm;
|
|
||||||
}
|
:last-child {
|
||||||
}
|
font-size: $font-sm;
|
||||||
}
|
color: #999;
|
||||||
}
|
}
|
||||||
.navbar {
|
}
|
||||||
display: flex;
|
|
||||||
height: 40px;
|
.store-collect {
|
||||||
padding: 0 5px;
|
border-left: 1px solid $border-color-light;
|
||||||
background: #fff;
|
padding-left: 20rpx;
|
||||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
text-align: center;
|
||||||
position: relative;
|
|
||||||
z-index: 10;
|
:last-child {
|
||||||
.nav-item {
|
color: #999;
|
||||||
flex: 1;
|
font-size: $font-sm;
|
||||||
display: flex;
|
}
|
||||||
justify-content: center;
|
}
|
||||||
align-items: center;
|
}
|
||||||
height: 100%;
|
}
|
||||||
font-size: 26rpx;
|
|
||||||
|
.navbar {
|
||||||
text {
|
display: flex;
|
||||||
position: relative;
|
height: 40px;
|
||||||
}
|
padding: 0 5px;
|
||||||
text.current {
|
background: #fff;
|
||||||
color: $light-color;
|
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
||||||
font-weight: bold;
|
position: relative;
|
||||||
font-size: 28rpx;
|
z-index: 10;
|
||||||
&::after {
|
|
||||||
content: "";
|
.nav-item {
|
||||||
position: absolute;
|
flex: 1;
|
||||||
left: 20rpx;
|
display: flex;
|
||||||
bottom: -10rpx;
|
justify-content: center;
|
||||||
width: 30rpx;
|
align-items: center;
|
||||||
height: 0;
|
height: 100%;
|
||||||
border-bottom: 2px solid $light-color;
|
font-size: 26rpx;
|
||||||
}
|
|
||||||
}
|
text {
|
||||||
}
|
position: relative;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
text.current {
|
||||||
|
color: $light-color;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 20rpx;
|
||||||
|
bottom: -10rpx;
|
||||||
|
width: 30rpx;
|
||||||
|
height: 0;
|
||||||
|
border-bottom: 2px solid $light-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -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;
|
||||||
});
|
});
|
||||||
this.allChecked = isCheckedAll;
|
if(opt){
|
||||||
|
this.allChecked = isCheckedAll;
|
||||||
|
}else{
|
||||||
|
this.allChecked = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右侧标签栏切换
|
||||||
|
*/
|
||||||
|
changeRightBtn(e) {
|
||||||
|
if (!this.editFlag) {
|
||||||
|
this.edit = "完成";
|
||||||
|
} else {
|
||||||
|
this.edit = "编辑";
|
||||||
|
}
|
||||||
|
this.editFlag = !this.editFlag;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -208,18 +233,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 右侧标签栏切换
|
|
||||||
*/
|
|
||||||
onNavigationBarButtonTap(e) {
|
|
||||||
if (!this.editFlag) {
|
|
||||||
this.setStyle("完成");
|
|
||||||
} else {
|
|
||||||
this.setStyle("编辑");
|
|
||||||
}
|
|
||||||
this.editFlag = !this.editFlag;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
<!-- 售后申请 -->
|
||||||
|
<div v-if="current === 0 && sku.afterSaleStatus && (sku.afterSaleStatus.includes('NOT_APPLIED') || sku.afterSaleStatus.includes('PART_AFTER_SALE')) " @click="applyService(sku.sn, order, sku)" class="sale">
|
||||||
|
<view class=" default-btn border" >
|
||||||
|
申请售后
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
<view class="after-line">
|
<view class="after-line">
|
||||||
<!-- 售后申请 -->
|
|
||||||
<view v-if="
|
|
||||||
current === 0 && order.groupAfterSaleStatus.includes('NOT_APPLIED')
|
|
||||||
" @click="applyService(sku.sn, order, sku)" class="rebuy-btn">
|
|
||||||
申请售后
|
|
||||||
</view>
|
|
||||||
<!-- 申请中 -->
|
<!-- 申请中 -->
|
||||||
<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>
|
||||||
|
|||||||
@@ -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)) {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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}`,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -11,8 +11,12 @@
|
|||||||
<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
|
||||||
{{item}}
|
class="address-item"
|
||||||
|
v-for="(item, index) in address.consigneeAddressPath"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</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,43 +95,88 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<p class="goods-prices">
|
<p class="goods-prices">
|
||||||
<span>¥</span>
|
<span>¥</span>
|
||||||
<span class="goods-price">{{formatPrice(val.goodsSku.price)[0]}}</span>
|
<span class="goods-price">{{ formatPrice(val.goodsSku.price)[0] }}</span>
|
||||||
<span>.{{formatPrice(val.goodsSku.price)[1] }}</span>
|
<span>.{{ formatPrice(val.goodsSku.price)[1] }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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">{{
|
||||||
<span>.{{formatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }} </span>
|
formatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
|
||||||
|
}}</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 (
|
||||||
@@ -576,7 +693,7 @@ page {
|
|||||||
.nums {
|
.nums {
|
||||||
flex: 2;
|
flex: 2;
|
||||||
color: $light-color;
|
color: $light-color;
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.wait {
|
.wait {
|
||||||
@@ -820,7 +937,7 @@ page {
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
padding: 0rpx 12rpx;
|
padding: 0rpx 12rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.address-box {
|
.address-box {
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<!-- 循环出当前可使用的第三方登录模式 -->
|
<!-- 循环出当前可使用的第三方登录模式 -->
|
||||||
<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 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 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 v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)" width="80"
|
||||||
@@ -438,7 +438,6 @@ export default {
|
|||||||
storage.setHasLogin(false);
|
storage.setHasLogin(false);
|
||||||
storage.setAccessToken("");
|
storage.setAccessToken("");
|
||||||
storage.setRefreshToken("");
|
storage.setRefreshToken("");
|
||||||
storage.setUuid(this.uuid.v1());
|
|
||||||
storage.setUserInfo({});
|
storage.setUserInfo({});
|
||||||
/**
|
/**
|
||||||
* 执行登录
|
* 执行登录
|
||||||
@@ -636,7 +635,8 @@ 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 +647,8 @@ page {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
margin: 0 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -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">
|
||||||
@@ -140,7 +221,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-flex" @click="shutMask(3)">
|
<view class="card-flex" @click="shutMask(3)">
|
||||||
<view class="card-title"> 送至 </view>
|
<view class="card-title"> 送至</view>
|
||||||
<view class="card-content">
|
<view class="card-content">
|
||||||
<span v-if="delivery">{{
|
<span v-if="delivery">{{
|
||||||
delivery.consigneeAddressPath | clearStrComma
|
delivery.consigneeAddressPath | clearStrComma
|
||||||
@@ -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,37 +696,52 @@ 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();
|
||||||
},
|
},
|
||||||
linkMsgDetail() {
|
|
||||||
// 客服
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
|
|
||||||
const params = {
|
async getIMDetailMethods() {
|
||||||
storeName: this.storeDetail.storeName,
|
let res = await getIMDetail();
|
||||||
goodsName: this.goodsDetail.goodsName,
|
if (res.data.success) {
|
||||||
goodsId: this.goodsDetail.goodsId,
|
this.IMLink = res.data.result;
|
||||||
goodsImg: this.goodsDetail.thumbnail,
|
}
|
||||||
price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
|
},
|
||||||
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
|
|
||||||
uuid: storage.getUuid(),
|
linkMsgDetail() {
|
||||||
token: storage.getAccessToken(),
|
if (this.storeDetail.merchantEuid) {
|
||||||
sign: this.storeDetail.yzfSign,
|
uni.navigateTo({
|
||||||
mpSign: this.storeDetail.yzfMpSign,
|
url: `/pages/tabbar/home/web-view?src=${this.IM}`,
|
||||||
};
|
});
|
||||||
uni.navigateTo({
|
} else {
|
||||||
url:
|
// 客服
|
||||||
"/pages/product/customerservice/index?params=" +
|
// #ifdef MP-WEIXIN
|
||||||
encodeURIComponent(JSON.stringify(params)),
|
const params = {
|
||||||
});
|
storeName: this.storeDetail.storeName,
|
||||||
// #endif
|
goodsName: this.goodsDetail.goodsName,
|
||||||
// #ifndef MP-WEIXIN
|
goodsId: this.goodsDetail.goodsId,
|
||||||
const sign = this.storeDetail.yzfSign;
|
goodsImg: this.goodsDetail.thumbnail,
|
||||||
uni.navigateTo({
|
price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
|
||||||
url:
|
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
|
||||||
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
|
uuid: storage.getUuid(),
|
||||||
sign,
|
token: storage.getAccessToken(),
|
||||||
});
|
sign: this.storeDetail.yzfSign,
|
||||||
// #endif
|
mpSign: this.storeDetail.yzfMpSign,
|
||||||
|
};
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pages/product/customerservice/index?params=" +
|
||||||
|
encodeURIComponent(JSON.stringify(params)),
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
const sign = this.storeDetail.yzfSign;
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
|
||||||
|
sign,
|
||||||
|
});
|
||||||
|
// #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:
|
||||||
|
|||||||
@@ -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 class="empty" text="暂无商品介绍" mode="data" v-if="!res.mobileIntro"></u-empty>
|
<u-empty
|
||||||
<u-parse class="vhtml" :lazy-load="true" :use-cache="true" :show-with-animation="true" :html="res.mobileIntro"></u-parse>
|
class="empty"
|
||||||
|
text="暂无商品介绍"
|
||||||
|
mode="data"
|
||||||
|
v-if="!res.mobileIntro"
|
||||||
|
></u-empty>
|
||||||
|
<u-parse
|
||||||
|
class="vhtml"
|
||||||
|
:lazy-load="true"
|
||||||
|
:use-cache="true"
|
||||||
|
:show-with-animation="true"
|
||||||
|
:html="res.mobileIntro"
|
||||||
|
></u-parse>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -21,17 +31,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <u-divider>商品参数</u-divider> -->
|
<!-- <u-divider>商品参数</u-divider> -->
|
||||||
<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
|
||||||
|
class="params-group"
|
||||||
|
v-for="(group, groupIndex) in goodsParams"
|
||||||
|
:key="groupIndex"
|
||||||
|
>
|
||||||
|
<view style="font-weight: bold; margin-left: 10px">{{
|
||||||
|
group.groupName
|
||||||
|
}}</view>
|
||||||
|
<div class="param-list">
|
||||||
|
<div
|
||||||
|
class="param-item"
|
||||||
|
v-for="(param, index) in group.goodsParamsItemDTOList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<div class="param-left">{{ param.paramName }}</div>
|
||||||
|
<div class="param-right">{{ param.paramValue }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="params-group" v-for="(group,groupIndex) in goodsParams" :key="groupIndex">
|
|
||||||
<view style="font-weight: bold;margin-left: 10px;">{{group.groupName}}</view>
|
|
||||||
<div class="param-list">
|
|
||||||
<div class="param-item" v-for="(param,index) in group.goodsParamsItemDTOList" :key="index">
|
|
||||||
<div class="param-left">{{param.paramName}}</div>
|
|
||||||
<div class="param-right">{{param.paramValue}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -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%;
|
||||||
|
|||||||
@@ -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)">
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="group-list">
|
<view class="group-list">
|
||||||
<view class="group-name">拼购列表</view>
|
<view class="group-name">拼购列表</view>
|
||||||
<view v-if="assembleOrder.length !=0">
|
<view v-if="assembleOrder.length != 0">
|
||||||
<view class="group-item" v-for="(order,index) in assembleOrder" :key="index">
|
<view class="group-item" v-for="(order, index) in assembleOrder" :key="index">
|
||||||
<view class="group-item-user">
|
<view class="group-item-user">
|
||||||
<u-image shape="circle" width="40px" height="40px" :src="order.face"></u-image>
|
<u-image shape="circle" width="40px" height="40px" :src="order.face"></u-image>
|
||||||
<span class="group-item-name">{{order.nickName | noPassByName}}</span>
|
<span class="group-item-name">{{ order.nickName | noPassByName }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<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>
|
||||||
|
|||||||
@@ -1,61 +1,105 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<!-- 团购 -->
|
<!-- 团购 -->
|
||||||
<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>
|
||||||
<!-- 拼团右侧 -->
|
<!-- 拼团右侧 -->
|
||||||
<view class="u-group-flex-right" v-if="promotion.__key == 'PINTUAN' ">
|
<view class="u-group-flex-right" v-if="promotion.__key == 'PINTUAN'">
|
||||||
<span class="group-bag">{{promotion.requiredNum}}人拼团 </span>
|
<span class="group-bag">{{ promotion.requiredNum }}人拼团 </span>
|
||||||
<span class="group-bag">限购{{promotion.limitNum}}件</span>
|
<span class="group-bag">限购{{ promotion.limitNum }}件</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</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,13 +149,12 @@ 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;
|
||||||
|
|||||||
@@ -1,33 +1,37 @@
|
|||||||
<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>
|
||||||
<view class="time">{{ item.startTime }} - {{item.endTime }}</view>
|
<view class="time">{{ item.startTime }} - {{ item.endTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +1,65 @@
|
|||||||
<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"
|
||||||
<view v-if="res!=null" v-for="(item, index) in Object.keys(res)" :key="index">
|
:key="promotionIndex"
|
||||||
<div class="promotion_col" v-if="item.split('-')[0] == promotionItem.value && item.split('-')[0] == 'FULL_DISCOUNT'">
|
class="promotion_row"
|
||||||
|
@click="shutMask(1)"
|
||||||
|
>
|
||||||
|
<view v-if="res != null" v-for="(item, index) in Object.keys(res)" :key="index">
|
||||||
|
<div
|
||||||
|
class="promotion_col"
|
||||||
|
v-if="
|
||||||
|
item.split('-')[0] == promotionItem.value &&
|
||||||
|
item.split('-')[0] == 'FULL_DISCOUNT'
|
||||||
|
"
|
||||||
|
>
|
||||||
<!-- 满减,折扣 -->
|
<!-- 满减,折扣 -->
|
||||||
<div class="flex">
|
<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">
|
||||||
<!-- 优惠券 -->
|
<!-- 优惠券 -->
|
||||||
|
|
||||||
<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
163
pages/product/shopList.vue
Normal 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>
|
||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -27,10 +27,11 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
<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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<u-sticky >
|
<u-sticky>
|
||||||
<div class="goods-cell-title">
|
<div class="goods-cell-title">
|
||||||
<div class="goods-item-title" :class="{ 'selected-title': selected.index == index }"
|
<div class="goods-item-title" :class="{ 'selected-title': selected.index == index }"
|
||||||
@click="handleClickTitle(title, index)" v-for="(title, index) in res.list[0].titleWay" :key="index">
|
@click="handleClickTitle(title, index)" v-for="(title, index) in res.list[0].titleWay" :key="index">
|
||||||
@@ -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({
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -168,7 +195,7 @@ export function orderStatusList(val) {
|
|||||||
PAID: "已付款",
|
PAID: "已付款",
|
||||||
DELIVERED: "已发货",
|
DELIVERED: "已发货",
|
||||||
CANCELLED: "已取消",
|
CANCELLED: "已取消",
|
||||||
COMPLETED:"已完成",
|
COMPLETED: "已完成",
|
||||||
COMPLETE: "已完成",
|
COMPLETE: "已完成",
|
||||||
TAKE: "待核验",
|
TAKE: "待核验",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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) ||
|
||||||
|
|||||||
@@ -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);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user