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

This commit is contained in:
2024-11-19 11:34:49 +08:00
parent 6cf47c6365
commit f99fcad9bf

View File

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