问题修复,下单修复
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
export const useCartsStore = defineStore('cart',
|
||||
() => {
|
||||
|
||||
// 商品订单会员
|
||||
// 店铺信息
|
||||
const shopInfo = ref(uni.cache.get('shopInfo') || {
|
||||
isMemberPrice: 0,
|
||||
isTableFee: 1
|
||||
@@ -97,10 +97,10 @@ export const useCartsStore = defineStore('cart',
|
||||
}
|
||||
//餐位费配置
|
||||
|
||||
const dinersNum = uni.cache.set('dinersNum') || 1
|
||||
const dinersNum = uni.cache.get('dinersNum') || 0
|
||||
const seatFeeConfig = ref({
|
||||
pricePerPerson: shopInfo.value.tableFee || 1,
|
||||
personCount: dinersNum,
|
||||
pricePerPerson: shopInfo.value.tableFee || 0,
|
||||
personCount: dinersNum||0,
|
||||
isEnabled: !shopInfo.value.isTableFee
|
||||
})
|
||||
watch(() => shopInfo.value.isTableFee, (newval) => {
|
||||
@@ -555,7 +555,14 @@ export const useCartsStore = defineStore('cart',
|
||||
return result;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function clearOrderConfig(){
|
||||
backendCoupons.value=[];
|
||||
seatFeeConfig.value.personCount=uni.cache.get('dinersNum') || 0;
|
||||
dinnerType.value='dine-in';
|
||||
userPoints.value=0
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
getTotalPackFee,
|
||||
@@ -582,6 +589,8 @@ export const useCartsStore = defineStore('cart',
|
||||
//优惠券列表
|
||||
backendCoupons,
|
||||
allGoods,
|
||||
//就餐类型
|
||||
dinnerType,
|
||||
setDinnerType,
|
||||
setSeatFeeConfig,
|
||||
seatFeeConfig,
|
||||
@@ -591,6 +600,8 @@ export const useCartsStore = defineStore('cart',
|
||||
//新客立减金额
|
||||
newUserDiscount,
|
||||
getAllGoodsList,
|
||||
//清空配置
|
||||
clearOrderConfig
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user