Showing
6 changed files
with
25 additions
and
16 deletions
| @@ -59,6 +59,7 @@ Page({ | @@ -59,6 +59,7 @@ Page({ | ||
| 59 | StyleType: options.StyleType, | 59 | StyleType: options.StyleType, |
| 60 | }) | 60 | }) |
| 61 | console.log('onLoad',{...this.data.opt}); | 61 | console.log('onLoad',{...this.data.opt}); |
| 62 | + console.log('StyleType',options.StyleType); | ||
| 62 | let obj = wx.getStorageSync('info') | 63 | let obj = wx.getStorageSync('info') |
| 63 | console.log('objobjobjobj',{...obj}) | 64 | console.log('objobjobjobj',{...obj}) |
| 64 | if (obj) { | 65 | if (obj) { |
| @@ -84,12 +85,12 @@ Page({ | @@ -84,12 +85,12 @@ Page({ | ||
| 84 | this.modal.showModal() //调用组件中打开模态框方法 | 85 | this.modal.showModal() //调用组件中打开模态框方法 |
| 85 | }, | 86 | }, |
| 86 | confirmPayment(gid) { | 87 | confirmPayment(gid) { |
| 88 | + let that = this; | ||
| 87 | App.PayOnline.CombineTransactionsByNewRecharge({ | 89 | App.PayOnline.CombineTransactionsByNewRecharge({ |
| 88 | combine_out_trade_no: this.data.opt.combine_out_trade_no, | 90 | combine_out_trade_no: this.data.opt.combine_out_trade_no, |
| 89 | gid:gid?gid:'', | 91 | gid:gid?gid:'', |
| 90 | }).then(res => { | 92 | }).then(res => { |
| 91 | console.log(res.data); | 93 | console.log(res.data); |
| 92 | - let that = this; | ||
| 93 | if (res.ret != '200') { | 94 | if (res.ret != '200') { |
| 94 | wx.showToast({ | 95 | wx.showToast({ |
| 95 | title: res.msg, | 96 | title: res.msg, |
| @@ -140,9 +141,10 @@ Page({ | @@ -140,9 +141,10 @@ Page({ | ||
| 140 | }, | 141 | }, |
| 141 | // 支付失败回调 types 1邀请函 2提前点餐 3商家端app分享 | 142 | // 支付失败回调 types 1邀请函 2提前点餐 3商家端app分享 |
| 142 | callbackFun() { | 143 | callbackFun() { |
| 143 | - let url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid; | ||
| 144 | let that = this; | 144 | let that = this; |
| 145 | + let url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid; | ||
| 145 | if(that.data.opt.types == '1'){ | 146 | if(that.data.opt.types == '1'){ |
| 147 | + console.log('StyleType',this.data.StyleType); | ||
| 146 | switch (this.data.StyleType) { | 148 | switch (this.data.StyleType) { |
| 147 | case '1': | 149 | case '1': |
| 148 | url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid; | 150 | url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid; |
| @@ -174,6 +176,7 @@ Page({ | @@ -174,6 +176,7 @@ Page({ | ||
| 174 | // 充值后跳转 | 176 | // 充值后跳转 |
| 175 | recharge() { | 177 | recharge() { |
| 176 | console.log('充值完成跳转', this.data.opt.detail.oid); | 178 | console.log('充值完成跳转', this.data.opt.detail.oid); |
| 179 | + console.log('StyleType',this.data.StyleType); | ||
| 177 | this.closeModal() | 180 | this.closeModal() |
| 178 | let url=`/pages/customer/detail_owner_invitation_new1?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1` | 181 | let url=`/pages/customer/detail_owner_invitation_new1?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1` |
| 179 | switch (this.data.StyleType) { | 182 | switch (this.data.StyleType) { |
| @@ -18,6 +18,7 @@ Page({ | @@ -18,6 +18,7 @@ Page({ | ||
| 18 | exp_date:{}, | 18 | exp_date:{}, |
| 19 | detail:{}, | 19 | detail:{}, |
| 20 | recharge_list:{}, | 20 | recharge_list:{}, |
| 21 | + StyleType:'',//邀请函模板 | ||
| 21 | }, | 22 | }, |
| 22 | 23 | ||
| 23 | /** | 24 | /** |
| @@ -32,7 +33,8 @@ Page({ | @@ -32,7 +33,8 @@ Page({ | ||
| 32 | sid:options.sid, | 33 | sid:options.sid, |
| 33 | oid:options.oid, | 34 | oid:options.oid, |
| 34 | types:options.types, | 35 | types:options.types, |
| 35 | - rid:options.rid?options.rid:'' | 36 | + rid:options.rid?options.rid:'', |
| 37 | + StyleType:options.StyleType|| '1', | ||
| 36 | } | 38 | } |
| 37 | }) | 39 | }) |
| 38 | console.log('onLoad',{...this.data.opt}); | 40 | console.log('onLoad',{...this.data.opt}); |
| @@ -103,7 +105,8 @@ Page({ | @@ -103,7 +105,8 @@ Page({ | ||
| 103 | totalize:this.data.detail.recharge_money, | 105 | totalize:this.data.detail.recharge_money, |
| 104 | sellerName: this.data.opt.name, | 106 | sellerName: this.data.opt.name, |
| 105 | oid: this.data.opt.oid, | 107 | oid: this.data.opt.oid, |
| 106 | - rid:this.data.opt.rid?this.data.opt.rid:'' | 108 | + rid:this.data.opt.rid?this.data.opt.rid:'', |
| 109 | + StyleType:this.data.opt.StyleType, | ||
| 107 | }, './confirmPayment') | 110 | }, './confirmPayment') |
| 108 | wx.navigateTo({ | 111 | wx.navigateTo({ |
| 109 | url | 112 | url |
| @@ -248,7 +248,7 @@ | @@ -248,7 +248,7 @@ | ||
| 248 | {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。 | 248 | {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。 |
| 249 | </view> | 249 | </view> |
| 250 | </view> | 250 | </view> |
| 251 | - <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> | 251 | + <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 252 | <view class="font24r orderingFood"> | 252 | <view class="font24r orderingFood"> |
| 253 | 去充值 | 253 | 去充值 |
| 254 | </view> | 254 | </view> |
| @@ -151,7 +151,7 @@ | @@ -151,7 +151,7 @@ | ||
| 151 | {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。 | 151 | {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。 |
| 152 | </view> | 152 | </view> |
| 153 | </view> | 153 | </view> |
| 154 | - <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> | 154 | + <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 155 | <view class="font24r orderingFood"> | 155 | <view class="font24r orderingFood"> |
| 156 | 去充值 | 156 | 去充值 |
| 157 | </view> | 157 | </view> |
| @@ -141,30 +141,31 @@ Page({ | @@ -141,30 +141,31 @@ Page({ | ||
| 141 | console.log(res.data.openid,'resdataopenidopenidopenidopenid'); | 141 | console.log(res.data.openid,'resdataopenidopenidopenidopenid'); |
| 142 | console.log(opt.hasInvitation,'hasInvitation'); | 142 | console.log(opt.hasInvitation,'hasInvitation'); |
| 143 | console.log(opt.openid,'optopenidoptopenidopt.openid'); | 143 | console.log(opt.openid,'optopenidoptopenidopt.openid'); |
| 144 | - console.log('type',res.data.temp_config_type); | 144 | + console.log('type',res.data.seller.temp_config_type); |
| 145 | + let configType=res.data.seller.temp_config_type | ||
| 145 | if (!res.data.openid) {//无预订人 | 146 | if (!res.data.openid) {//无预订人 |
| 146 | url = '/pages/customer/detail_owner'; | 147 | url = '/pages/customer/detail_owner'; |
| 147 | - if (opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='1') { | 148 | + if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') { |
| 148 | url = '/pages/customer/detail_owner_invitation_new1'; | 149 | url = '/pages/customer/detail_owner_invitation_new1'; |
| 149 | - }else if(opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='2') { | 150 | + }else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') { |
| 150 | url = '/pages/customer/detail_owner_invitation_new2'; | 151 | url = '/pages/customer/detail_owner_invitation_new2'; |
| 151 | }else{ | 152 | }else{ |
| 152 | url = '/pages/customer/detail_owner_invitation'; | 153 | url = '/pages/customer/detail_owner_invitation'; |
| 153 | } | 154 | } |
| 154 | } else { | 155 | } else { |
| 155 | url = '/pages/customer/detail_customer'; | 156 | url = '/pages/customer/detail_customer'; |
| 156 | - if (opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='1') { | 157 | + if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') { |
| 157 | url = '/pages/customer/detail_owner_invitation_new1'; | 158 | url = '/pages/customer/detail_owner_invitation_new1'; |
| 158 | - }else if(opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='2') { | 159 | + }else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') { |
| 159 | url = '/pages/customer/detail_owner_invitation_new2'; | 160 | url = '/pages/customer/detail_owner_invitation_new2'; |
| 160 | }else{ | 161 | }else{ |
| 161 | url = '/pages/customer/detail_invitation'; | 162 | url = '/pages/customer/detail_invitation'; |
| 162 | } | 163 | } |
| 163 | if (res.data.openid == opt.openid) { | 164 | if (res.data.openid == opt.openid) { |
| 164 | url = '/pages/customer/detail_owner'; | 165 | url = '/pages/customer/detail_owner'; |
| 165 | - if (opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='1') { | 166 | + if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') { |
| 166 | url = '/pages/customer/detail_owner_invitation_new1'; | 167 | url = '/pages/customer/detail_owner_invitation_new1'; |
| 167 | - }else if(opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='2') { | 168 | + }else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') { |
| 168 | url = '/pages/customer/detail_owner_invitation_new2'; | 169 | url = '/pages/customer/detail_owner_invitation_new2'; |
| 169 | }else{ | 170 | }else{ |
| 170 | url = '/pages/customer/detail_owner_invitation'; | 171 | url = '/pages/customer/detail_owner_invitation'; |
| 1 | // pages/me/wananchi.js | 1 | // pages/me/wananchi.js |
| 2 | +import App from '../../utils/api'; | ||
| 2 | Page({ | 3 | Page({ |
| 3 | 4 | ||
| 4 | /** | 5 | /** |
| @@ -24,16 +25,17 @@ Page({ | @@ -24,16 +25,17 @@ Page({ | ||
| 24 | console.log('options',options); | 25 | console.log('options',options); |
| 25 | }, | 26 | }, |
| 26 | navEvent(){ | 27 | navEvent(){ |
| 28 | + let that=this; | ||
| 27 | App.Seller.GetSellerTemplateConf({ | 29 | App.Seller.GetSellerTemplateConf({ |
| 28 | sid:this.data.sid | 30 | sid:this.data.sid |
| 29 | }).then(res => { | 31 | }).then(res => { |
| 30 | - let url='/pages/customer/detail_owner_invitation_new1?id='+this.data.oid | 32 | + let url='/pages/customer/detail_owner_invitation_new1?id='+that.data.oid |
| 31 | switch (res.data.type) { | 33 | switch (res.data.type) { |
| 32 | case '1': | 34 | case '1': |
| 33 | - url = '/pages/customer/detail_owner_invitation_new1?id='+this.data.oid | 35 | + url = '/pages/customer/detail_owner_invitation_new1?id='+that.data.oid |
| 34 | break; | 36 | break; |
| 35 | case '2': | 37 | case '2': |
| 36 | - url = '/pages/customer/detail_owner_invitation_new2??id='+this.data.oid | 38 | + url = '/pages/customer/detail_owner_invitation_new2?id='+that.data.oid |
| 37 | break; | 39 | break; |
| 38 | } | 40 | } |
| 39 | return wx.reLaunch({ | 41 | return wx.reLaunch({ |
-
Please register or login to post a comment