白屏,首页,霸王餐,网络完善
This commit is contained in:
@@ -65,12 +65,15 @@
|
||||
</view>
|
||||
<view class="info">
|
||||
<text class="productName">{{item.productName}}</text>
|
||||
<text class="productSkuName" v-if="item.productSkuName">{{item.productSkuName}}</text>
|
||||
<text class="productSkuName" v-if="item.skuName">{{item.skuName}}</text>
|
||||
</view>
|
||||
|
||||
<view class="price">
|
||||
<view class="priceAmount">
|
||||
¥{{orderVIP.isVip ==1 && ordershopUserInfo.isMemberPrice==1?(item.memberPrice|| item.price):item.price}}
|
||||
<text v-if="changeFreeenable">{{item.price}}</text>
|
||||
<text v-else>
|
||||
¥{{orderVIP.isVip ==1 && ordershopUserInfo.isMemberPrice==1?(item.memberPrice|| item.price):item.price}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="num">x{{item.num}}</view>
|
||||
</view>
|
||||
|
||||
@@ -212,41 +212,34 @@
|
||||
// 监听价格算法
|
||||
watchEffect(async () => {
|
||||
if (listinfo.combinedArray.length > 0) {
|
||||
console.log(11)
|
||||
// 打包费packFeess 计算购物车商品费用totalPrices 餐位费Seatcharge
|
||||
try {
|
||||
let sum = (is_type.value != 0 ? listinfo.packFeess : 0) + listinfo.totalPrices + (is_type
|
||||
.value == 0 ? listinfo.Seatcharge : 0);
|
||||
console.log(listinfo.totalPrices,11)
|
||||
listinfo.originAmount = Math.round(sum * 100) / 100;
|
||||
// try {
|
||||
let sum = (is_type.value != 0 ? listinfo.packFeess : 0) + listinfo.totalPrices + (is_type
|
||||
.value == 0 ? listinfo.Seatcharge : 0);
|
||||
listinfo.originAmount = Math.round(sum * 100) / 100;
|
||||
|
||||
// 打包费packFeess 计算购物车商品费用totalPrices 餐位费Seatcharge 商品卷Productroll 优惠卷coupondiscountAmount 积分listinfo.pointsDiscountAmount
|
||||
let sums = (is_type.value != 0 ? listinfo.packFeess : 0) + listinfo.totalPrices + (is_type
|
||||
.value ==
|
||||
0 ? listinfo.Seatcharge : 0) - (listinfo.Productroll || 0) - (listinfo
|
||||
.coupondiscountAmount || 0) - (listinfo.pointsDiscountAmount || 0);
|
||||
listinfo.totalCost = Math.round(sums * 100) / 100;
|
||||
//总价格
|
||||
console.log(listinfo.combinedArray, listinfo.packFeess, listinfo.totalPrices, listinfo
|
||||
.Seatcharge, listinfo.Productroll, listinfo.coupondiscountAmount, sums)
|
||||
// 霸王餐
|
||||
try {
|
||||
// console.log(orderVIP.value.freeDineConfig.enable, changeFreeenable.value)
|
||||
if (orderVIP.value.freeDineConfig.enable && changeFreeenable.value) {
|
||||
listinfo.totalCost = (parseFloat(listinfo.totalCost) * parseFloat(orderVIP.value
|
||||
.freeDineConfig
|
||||
.rechargeTimes)).toFixed(2)
|
||||
}
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
// 积分
|
||||
if (listinfo.totalCost && listinfo.status == 'unpaid' && orderVIP.value.id) {
|
||||
uni.$u.debounce(memberPointscalcUsablePoints, 500)
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
// 打包费packFeess 计算购物车商品费用totalPrices 餐位费Seatcharge 商品卷Productroll 优惠卷coupondiscountAmount 积分listinfo.pointsDiscountAmount
|
||||
let sums = (is_type.value != 0 ? listinfo.packFeess : 0) + listinfo.totalPrices + (is_type
|
||||
.value ==
|
||||
0 ? listinfo.Seatcharge : 0) - (listinfo.Productroll || 0) - (listinfo
|
||||
.coupondiscountAmount || 0) - (listinfo.pointsDiscountAmount || 0);
|
||||
listinfo.totalCost = Math.round(sums * 100) / 100;
|
||||
//总价格
|
||||
// console.log(listinfo.combinedArray, listinfo.packFeess, listinfo.totalPrices, listinfo
|
||||
// .Seatcharge, listinfo.Productroll, listinfo.coupondiscountAmount, sums) // 霸王餐
|
||||
console.log(orderVIP.value.freeDineConfig.enable, changeFreeenable.value)
|
||||
if (orderVIP.value.freeDineConfig.enable && changeFreeenable.value) {
|
||||
listinfo.totalCost = (parseFloat(listinfo.totalCost) * parseFloat(orderVIP.value
|
||||
.freeDineConfig.rechargeTimes)).toFixed(2)
|
||||
}
|
||||
// 积分
|
||||
if (listinfo.totalCost && listinfo.status == 'unpaid' && orderVIP.value.id) {
|
||||
uni.$u.debounce(memberPointscalcUsablePoints, 500)
|
||||
}
|
||||
// } catch (error) {
|
||||
// //TODO handle the exception
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
@@ -259,22 +252,21 @@
|
||||
uniqueIds.value = [] // 筛选出商品卷的id
|
||||
listinfo.coupondiscountAmount = 0 // 优惠卷减去的金额
|
||||
listinfo.pointsNum = 0 // 商品卷总价价格
|
||||
let res = cartStore.getTotalTotalPrices(listinfo.combinedArray, 1)
|
||||
// 商品价格
|
||||
listinfo.totalPrices = cartStore.getTotalTotalPrices(listinfo.combinedArray, false)
|
||||
// 支付方式切换
|
||||
// #ifdef MP-WEIXIN
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
// paymentmethod.radiovalue = 2;
|
||||
// paymentmethod.paymentBtnText = "微信支付";
|
||||
// paymentmethod.payType = 'wechatPay';
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
paymentMethodref.value.groupChanges(3)
|
||||
// paymentmethod.radiovalue = 3;
|
||||
// paymentmethod.paymentBtnText = "支付宝支付";
|
||||
// paymentmethod.payType = 'wechatPay';
|
||||
// #endif
|
||||
} else {
|
||||
// 商品价格
|
||||
listinfo.totalPrices = cartStore.getTotalTotalPrices(listinfo.combinedArray)
|
||||
}
|
||||
changeFreeenable.value = e
|
||||
|
||||
}
|
||||
|
||||
const saveImage = (url) => {
|
||||
@@ -482,7 +474,6 @@
|
||||
//TODO handle the exception
|
||||
}
|
||||
}
|
||||
|
||||
orderorderInfo()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user