Commit 833d642e2d2014834b489de49c0ea56bf4c2566b

Authored by pengye
2 parents dff335a4 66506d3a

Merge branch 'pycode' of http://123.56.79.57/xt/xcx-book into pycode

@@ -274,14 +274,14 @@ Page({ @@ -274,14 +274,14 @@ Page({
274 let data=res.data 274 let data=res.data
275 console.log('data',data); 275 console.log('data',data);
276 let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,coupon_data,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse; 276 let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,coupon_data,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
277 - chef = util.determine(data.chef); 277 + chef = util.determine(data.chef);
278 reserve = util.determine(data.reserve); 278 reserve = util.determine(data.reserve);
279 swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:''; 279 swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
280 marketing = util.determine(data.marketing); 280 marketing = util.determine(data.marketing);
281 signboard = util.determine(data.signboard); 281 signboard = util.determine(data.signboard);
282 store = util.determine(data.store); 282 store = util.determine(data.store);
283 home = util.determine(data.home); 283 home = util.determine(data.home);
284 - if(marketing.coupon_data){ 284 + if(marketing && marketing.coupon_data){
285 coupon_data=marketing.coupon_data; 285 coupon_data=marketing.coupon_data;
286 stringifyUse=JSON.stringify(marketing.coupon_data.use) 286 stringifyUse=JSON.stringify(marketing.coupon_data.use)
287 } 287 }
@@ -297,7 +297,7 @@ Page({ @@ -297,7 +297,7 @@ Page({
297 swich_phone 297 swich_phone
298 } 298 }
299 console.log('获取数据', {...obj}); 299 console.log('获取数据', {...obj});
300 - if(marketing.is_recharge=='1' && marketing.recharge_data){ 300 + if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){
301 let recharge_data=marketing.recharge_data 301 let recharge_data=marketing.recharge_data
302 recharge_list=marketing.recharge_data.recharge_list 302 recharge_list=marketing.recharge_data.recharge_list
303 if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; 303 if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额';
@@ -316,7 +316,7 @@ Page({ @@ -316,7 +316,7 @@ Page({
316 stringifyUse 316 stringifyUse
317 }) 317 })
318 // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 318 // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
319 - if(marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){ 319 + if(marketing && marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){
320 let cash=coupon_data.use.cash; 320 let cash=coupon_data.use.cash;
321 let price=coupon_data.price*1; 321 let price=coupon_data.price*1;
322 let discount=((price/cash)*10).toFixed(2); 322 let discount=((price/cash)*10).toFixed(2);