Commit 66506d3a071ff8dd43c032e8ad6baf8fc9a00775

Authored by lsp
1 parent a97ab16f

邀请函问题处理

... ... @@ -280,14 +280,14 @@ Page({
let data=res.data
console.log('data',data);
let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,coupon_data,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
chef = util.determine(data.chef);
chef = util.determine(data.chef);
reserve = util.determine(data.reserve);
swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
marketing = util.determine(data.marketing);
signboard = util.determine(data.signboard);
store = util.determine(data.store);
home = util.determine(data.home);
if(marketing.coupon_data){
if(marketing && marketing.coupon_data){
coupon_data=marketing.coupon_data;
stringifyUse=JSON.stringify(marketing.coupon_data.use)
}
... ... @@ -303,7 +303,7 @@ Page({
swich_phone
}
console.log('获取数据', {...obj});
if(marketing.is_recharge=='1' && marketing.recharge_data){
if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){
let recharge_data=marketing.recharge_data
recharge_list=marketing.recharge_data.recharge_list
if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额';
... ... @@ -322,7 +322,7 @@ Page({
stringifyUse
})
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if(marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){
if(marketing && marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){
let cash=coupon_data.use.cash;
let price=coupon_data.price*1;
let discount=((price/cash)*10).toFixed(2);
... ...