增加网络波动加载中,增加会员信息扫码充值
This commit is contained in:
@@ -419,9 +419,14 @@
|
||||
// * 获取积分相关信息
|
||||
const getCalcUsablePoints = async (data) => {
|
||||
Object.assign(calcUsablePointsData, data);
|
||||
calcUsablePointsData.minIntegral = data.minDeductionPoints
|
||||
calcUsablePointsData.maxIntegral = data.maxUsablePoints
|
||||
calcUsablePointsData.instructionText = `请输入 ${ data.minDeductionPoints} - ${data.maxUsablePoints} 之间的积分`
|
||||
try {
|
||||
calcUsablePointsData.minIntegral = data.minDeductionPoints
|
||||
calcUsablePointsData.maxIntegral = data.maxUsablePoints
|
||||
calcUsablePointsData.instructionText =
|
||||
`请输入 ${ data.minDeductionPoints} - ${data.maxUsablePoints} 之间的积分`
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,8 @@
|
||||
reactive,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
watchEffect
|
||||
watchEffect,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
|
||||
import {
|
||||
@@ -211,13 +212,11 @@
|
||||
// 监听价格算法
|
||||
watchEffect(async () => {
|
||||
if (listinfo.combinedArray.length > 0) {
|
||||
//总价格
|
||||
// console.log(listinfo.combinedArray, listinfo.packFeess, listinfo.totalPrices, listinfo.Seatcharge,
|
||||
// listinfo.Productroll, listinfo.coupondiscountAmount)
|
||||
// 打包费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;
|
||||
|
||||
// 打包费packFeess 计算购物车商品费用totalPrices 餐位费Seatcharge 商品卷Productroll 优惠卷coupondiscountAmount 积分listinfo.pointsDiscountAmount
|
||||
@@ -226,10 +225,12 @@
|
||||
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)
|
||||
// console.log(orderVIP.value.freeDineConfig.enable, changeFreeenable.value)
|
||||
if (orderVIP.value.freeDineConfig.enable && changeFreeenable.value) {
|
||||
listinfo.totalCost = (parseFloat(listinfo.totalCost) * parseFloat(orderVIP.value
|
||||
.freeDineConfig
|
||||
@@ -239,7 +240,7 @@
|
||||
//TODO handle the exception
|
||||
}
|
||||
// 积分
|
||||
if (listinfo.totalCost && listinfo.status == 'unpaid') {
|
||||
if (listinfo.totalCost && listinfo.status == 'unpaid' && orderVIP.value.id) {
|
||||
uni.$u.debounce(memberPointscalcUsablePoints, 500)
|
||||
|
||||
}
|
||||
@@ -259,7 +260,6 @@
|
||||
listinfo.coupondiscountAmount = 0 // 优惠卷减去的金额
|
||||
listinfo.pointsNum = 0 // 商品卷总价价格
|
||||
let res = cartStore.getTotalTotalPrices(listinfo.combinedArray, 1)
|
||||
console.log(res)
|
||||
// 支付方式切换
|
||||
// #ifdef MP-WEIXIN
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
@@ -347,7 +347,6 @@
|
||||
|
||||
const learcoupons = (data) => {
|
||||
if (data == 'product') {
|
||||
console.log(listinfo)
|
||||
uniqueIds.value = [] // 筛选出商品卷的id
|
||||
listinfo.coupondiscountAmount = 0 // 优惠卷减去的金额
|
||||
listinfo.Productroll = 0 // 商品卷总价价格
|
||||
@@ -549,6 +548,7 @@
|
||||
try {
|
||||
// 更新数据
|
||||
if (orderVIP.value) {
|
||||
console.log(uni.cache.get('orderVIP'))
|
||||
orderVIP.value = uni.cache.get('orderVIP')
|
||||
ordershopUserInfo.value = orderVIP.value.shopInfo
|
||||
paymentMethodref.value.orderVIPfun(uni.cache.get('orderVIP'))
|
||||
@@ -572,12 +572,12 @@
|
||||
uni.cache.set('shopId', options.shopId, 30)
|
||||
uni.$on('returnData', handleReturnData);
|
||||
}
|
||||
try {
|
||||
// * 获取会员信息
|
||||
await storeuser.actionsproductqueryProduct()
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
// * 获取会员信息
|
||||
await storeuser.actionsproductqueryProduct()
|
||||
await nextTick()
|
||||
orderVIP.value = uni.cache.get('orderVIP')
|
||||
// 积分信息
|
||||
|
||||
orderorderInfo()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user