代客下单确认订单修改根据购物车数据选中就餐模式

This commit is contained in:
YeMingfei666 2024-11-19 11:34:49 +08:00
parent 6cf47c6365
commit f99fcad9bf
1 changed files with 8 additions and 5 deletions

View File

@ -551,14 +551,17 @@
records,
seatFee
} = await Api.getCart(par)
let useType=''
if (seatFee && seatFee.useType) {
$storageManage.useType(seatFee.useType)
// uni.setStorageSync('useType',seatFee.useType);
eatTypes.active = seatFee.useType == 'takeout' ? seatFee.useType : seatFee.useType.replace(
/-after|-before/g, '');
useType=seatFee.useType
$storageManage.useType(useType)
}else{
$storageManage.useType(records[0].info[0].useType)
useType=records[0].info[0].useType
$storageManage.useType(useType)
}
console.log(useType);
eatTypes.active =useType == 'takeout' ? useType : useType.replace(
/-after|-before/g, '');
goods.list = getNowCart(records)
if (seatFee && seatFee.totalNumber) {
userNumbers.defaultCateIndex = seatFee.totalNumber - 1 || 0