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({
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)
}
... ... @@ -297,7 +297,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+'元余额';
... ... @@ -316,7 +316,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);
... ...