剔除部分无用代码
This commit is contained in:
@@ -989,8 +989,7 @@ const imageLoaded = (item, index, index1) => {
|
|||||||
// 计算左侧位置
|
// 计算左侧位置
|
||||||
const leftIndex = ref(0);
|
const leftIndex = ref(0);
|
||||||
|
|
||||||
//距离顶部的高度
|
|
||||||
const scrollTopSiz = ref(0);
|
|
||||||
|
|
||||||
//元素最低端的距离
|
//元素最低端的距离
|
||||||
const lastbottom = ref("");
|
const lastbottom = ref("");
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ export const useCartsStore = defineStore("cart", () => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const isUse =
|
const isUse =
|
||||||
shopUserInfo.value.isVip && shopUserInfo.value.isMemberPrice
|
shopUserInfo.value.isVip && shopUserInfo.value.isMemberPrice && shopInfo.value.isMemberPrice==1
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
return isUse;
|
return isUse;
|
||||||
@@ -433,29 +433,7 @@ export const useCartsStore = defineStore("cart", () => {
|
|||||||
const n = item.number - (item.returnNum || 0);
|
const n = item.number - (item.returnNum || 0);
|
||||||
return n <= 0 ? 0 : n;
|
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(() => {
|
const totalPrice = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user