diff --git a/pages/product/index.vue b/pages/product/index.vue index 56904bb..36f7dc1 100644 --- a/pages/product/index.vue +++ b/pages/product/index.vue @@ -989,8 +989,7 @@ const imageLoaded = (item, index, index1) => { // 计算左侧位置 const leftIndex = ref(0); -//距离顶部的高度 -const scrollTopSiz = ref(0); + //元素最低端的距离 const lastbottom = ref(""); diff --git a/stores/carts.js b/stores/carts.js index 8a4dcef..4b392a8 100644 --- a/stores/carts.js +++ b/stores/carts.js @@ -423,7 +423,7 @@ export const useCartsStore = defineStore("cart", () => { return false; } const isUse = - shopUserInfo.value.isVip && shopUserInfo.value.isMemberPrice + shopUserInfo.value.isVip && shopUserInfo.value.isMemberPrice && shopInfo.value.isMemberPrice==1 ? true : false; return isUse; @@ -433,29 +433,7 @@ export const useCartsStore = defineStore("cart", () => { const n = item.number - (item.returnNum || 0); return n <= 0 ? 0 : n; } - //历史订单商品价格总和 - const oldOrderMoney = computed(() => { - let total = 0; - for (let i in oldOrder.value.detailMap) { - total += oldOrder.value.detailMap[i].reduce((prve, cur) => { - if (cur.isGift) { - return prve + 0; - } - const discount_sale_amount = cur.discount_sale_amount * 1 || 0; - const memberPrice = cur.skuData - ? cur.skuData.memberPrice || cur.skuData.salePrice - : 0; - const price = discount_sale_amount || cur.salePrice || 0; - const number = currentCalcMpneyNumber(cur); - return ( - prve + - (number <= 0 ? 0 : number) * - (discount_sale_amount || (useVipPrice.value ? memberPrice : price)) - ); - }, 0); - } - return total; - }); + //当前购物车总价格 const totalPrice = computed(() => {