问题修复
This commit is contained in:
@@ -847,6 +847,7 @@ import {
|
||||
onReady,
|
||||
onShow,
|
||||
onHide,
|
||||
onUnload,
|
||||
onPageScroll,
|
||||
} from "@dcloudio/uni-app";
|
||||
|
||||
@@ -989,8 +990,6 @@ const imageLoaded = (item, index, index1) => {
|
||||
// 计算左侧位置
|
||||
const leftIndex = ref(0);
|
||||
|
||||
|
||||
|
||||
//元素最低端的距离
|
||||
const lastbottom = ref("");
|
||||
|
||||
@@ -1428,7 +1427,7 @@ const submitSelection = async () => {
|
||||
} else {
|
||||
selectedGroupSnap.value = [];
|
||||
}
|
||||
|
||||
console.log('specifications.item', specifications.item);
|
||||
websocketsendMessage({
|
||||
id: res ? res.cartListId : "",
|
||||
type: "shopping",
|
||||
@@ -1446,8 +1445,7 @@ const submitSelection = async () => {
|
||||
memberPrice: specifications.item.memberPrice,
|
||||
is_print: 1,
|
||||
product_type: specifications.item.type,
|
||||
is_time_discount:specifications.item.is_time_discount
|
||||
|
||||
is_time_discount: specifications.item.is_time_discount,
|
||||
});
|
||||
// 清空套餐选中
|
||||
selectedGroupSnap.value = [];
|
||||
@@ -1487,7 +1485,7 @@ const clickspecifications = async (item, index, indexs, type) => {
|
||||
// skuBtnText.value = '请选择规格'
|
||||
// single-单规格商品 sku-多规格商品 package-套餐商品 weight-称重商品 coupon-团购券
|
||||
let res = await APIminiAppinfo(item.id);
|
||||
specifications.item = res;
|
||||
specifications.item = {...res,is_time_discount:item.is_time_discount};
|
||||
if (specifications.item.type == "package") {
|
||||
selectedOptions.value = [];
|
||||
specifications.product_id = res.id;
|
||||
@@ -1595,7 +1593,7 @@ const singleclick = async (item, i) => {
|
||||
number: await calculateValue(item.cartNumber, i, suitNum),
|
||||
is_print: 1,
|
||||
product_type: item.type,
|
||||
is_time_discount:item.is_time_discount
|
||||
is_time_discount: item.is_time_discount,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2122,7 +2120,7 @@ const productqueryProduct = async () => {
|
||||
product.startTime,
|
||||
product.endTime
|
||||
);
|
||||
product.is_time_discount = showLimitDiscount(product)?1:0;
|
||||
product.is_time_discount = showLimitDiscount(product) ? 1 : 0;
|
||||
product.limitSalePrice = returnLimitPrice(product);
|
||||
|
||||
cartStore.setGoodsMap(product.id, product);
|
||||
@@ -2135,11 +2133,11 @@ const productqueryProduct = async () => {
|
||||
i.startTime,
|
||||
i.endTime
|
||||
);
|
||||
i.is_time_discount = showLimitDiscount(i)?1:0;
|
||||
i.is_time_discount = showLimitDiscount(i) ? 1 : 0;
|
||||
i.limitSalePrice = returnLimitPrice(i);
|
||||
cartStore.setGoodsMap(i.id, i);
|
||||
});
|
||||
|
||||
console.log("shopProductList", shopProductList);
|
||||
cartStore.goodsIsloading = true;
|
||||
scrollTopSize.value = 0;
|
||||
topArr.value = [];
|
||||
@@ -2167,6 +2165,11 @@ provide("shopUserInfo", shopUserInfo);
|
||||
provide("shopInfo", shopInfo);
|
||||
|
||||
onLoad(async (e) => {
|
||||
console.log("onLoad:e", e);
|
||||
cartStore.setOldOrder({
|
||||
detailMap: {},
|
||||
originAmount: 0,
|
||||
});
|
||||
await proxy.$onLaunched;
|
||||
});
|
||||
|
||||
@@ -2215,7 +2218,16 @@ onShow(async () => {
|
||||
}
|
||||
});
|
||||
|
||||
onHide(() => {});
|
||||
onHide(() => {
|
||||
console.log("product index onHide");
|
||||
useSocket.closeSocket();
|
||||
useSocket.setOnMessage(()=>{});
|
||||
});
|
||||
onUnload(() => {
|
||||
console.log("product index onUnload");
|
||||
useSocket.closeSocket();
|
||||
useSocket.setOnMessage(()=>{});
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await proxy.$onLaunched;
|
||||
@@ -2252,7 +2264,6 @@ onMounted(async () => {
|
||||
operate_type: "time_discount_save",
|
||||
data: null,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
await productqueryProduct();
|
||||
|
||||
Reference in New Issue
Block a user