Showing
1 changed file
with
4 additions
and
4 deletions
| @@ -280,14 +280,14 @@ Page({ | @@ -280,14 +280,14 @@ Page({ | ||
| 280 | let data=res.data | 280 | let data=res.data |
| 281 | console.log('data',data); | 281 | console.log('data',data); |
| 282 | let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,coupon_data,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse; | 282 | let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,coupon_data,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse; |
| 283 | - chef = util.determine(data.chef); | 283 | + chef = util.determine(data.chef); |
| 284 | reserve = util.determine(data.reserve); | 284 | reserve = util.determine(data.reserve); |
| 285 | swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:''; | 285 | swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:''; |
| 286 | marketing = util.determine(data.marketing); | 286 | marketing = util.determine(data.marketing); |
| 287 | signboard = util.determine(data.signboard); | 287 | signboard = util.determine(data.signboard); |
| 288 | store = util.determine(data.store); | 288 | store = util.determine(data.store); |
| 289 | home = util.determine(data.home); | 289 | home = util.determine(data.home); |
| 290 | - if(marketing.coupon_data){ | 290 | + if(marketing && marketing.coupon_data){ |
| 291 | coupon_data=marketing.coupon_data; | 291 | coupon_data=marketing.coupon_data; |
| 292 | stringifyUse=JSON.stringify(marketing.coupon_data.use) | 292 | stringifyUse=JSON.stringify(marketing.coupon_data.use) |
| 293 | } | 293 | } |
| @@ -303,7 +303,7 @@ Page({ | @@ -303,7 +303,7 @@ Page({ | ||
| 303 | swich_phone | 303 | swich_phone |
| 304 | } | 304 | } |
| 305 | console.log('获取数据', {...obj}); | 305 | console.log('获取数据', {...obj}); |
| 306 | - if(marketing.is_recharge=='1' && marketing.recharge_data){ | 306 | + if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){ |
| 307 | let recharge_data=marketing.recharge_data | 307 | let recharge_data=marketing.recharge_data |
| 308 | recharge_list=marketing.recharge_data.recharge_list | 308 | recharge_list=marketing.recharge_data.recharge_list |
| 309 | if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; | 309 | if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; |
| @@ -322,7 +322,7 @@ Page({ | @@ -322,7 +322,7 @@ Page({ | ||
| 322 | stringifyUse | 322 | stringifyUse |
| 323 | }) | 323 | }) |
| 324 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 | 324 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 |
| 325 | - if(marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){ | 325 | + if(marketing && marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){ |
| 326 | let cash=coupon_data.use.cash; | 326 | let cash=coupon_data.use.cash; |
| 327 | let price=coupon_data.price*1; | 327 | let price=coupon_data.price*1; |
| 328 | let discount=((price/cash)*10).toFixed(2); | 328 | let discount=((price/cash)*10).toFixed(2); |
-
Please register or login to post a comment