Showing
10 changed files
with
84 additions
and
15 deletions
| @@ -20,6 +20,7 @@ Page({ | @@ -20,6 +20,7 @@ Page({ | ||
| 20 | exp_date:{}, | 20 | exp_date:{}, |
| 21 | num: 1, | 21 | num: 1, |
| 22 | totalize: '', | 22 | totalize: '', |
| 23 | + StyleType:'',//邀请函模板 | ||
| 23 | explain: "关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事", | 24 | explain: "关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事", |
| 24 | }, | 25 | }, |
| 25 | 26 | ||
| @@ -35,6 +36,7 @@ Page({ | @@ -35,6 +36,7 @@ Page({ | ||
| 35 | oid:options.oid, | 36 | oid:options.oid, |
| 36 | types:options.types, | 37 | types:options.types, |
| 37 | rid:options.rid?options.rid:'', | 38 | rid:options.rid?options.rid:'', |
| 39 | + StyleType:options.StyleType|| '1', | ||
| 38 | } | 40 | } |
| 39 | }) | 41 | }) |
| 40 | console.log('onLoad',{...this.data.opt}); | 42 | console.log('onLoad',{...this.data.opt}); |
| @@ -179,7 +181,7 @@ Page({ | @@ -179,7 +181,7 @@ Page({ | ||
| 179 | return | 181 | return |
| 180 | } | 182 | } |
| 181 | wx.navigateTo({ | 183 | wx.navigateTo({ |
| 182 | - url: `./confirmPayment?sid=${this.data.opt.sid}&sellerName=${this.data.opt.name}&oid=${this.data.opt.oid}&rid=${this.data.opt.rid?this.data.opt.rid:''}&type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}&types=${this.data.opt.types}`, | 184 | + url: `./confirmPayment?sid=${this.data.opt.sid}&sellerName=${this.data.opt.name}&oid=${this.data.opt.oid}&rid=${this.data.opt.rid?this.data.opt.rid:''}&type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}&types=${this.data.opt.types}&StyleType=${this.data.opt.StyleType}`, |
| 183 | }) | 185 | }) |
| 184 | }else{ | 186 | }else{ |
| 185 | wx.showToast({ | 187 | wx.showToast({ |
| @@ -24,6 +24,7 @@ Page({ | @@ -24,6 +24,7 @@ Page({ | ||
| 24 | calendarData: '', | 24 | calendarData: '', |
| 25 | sex: "先生", | 25 | sex: "先生", |
| 26 | indexs: 0, | 26 | indexs: 0, |
| 27 | + StyleType:'',//邀请函模板 | ||
| 27 | sexList: [{ | 28 | sexList: [{ |
| 28 | sex: '先生', | 29 | sex: '先生', |
| 29 | value: '1', | 30 | value: '1', |
| @@ -55,6 +56,7 @@ Page({ | @@ -55,6 +56,7 @@ Page({ | ||
| 55 | sellerName: options.sellerName ? options.sellerName : '', | 56 | sellerName: options.sellerName ? options.sellerName : '', |
| 56 | }, | 57 | }, |
| 57 | type: options.type, | 58 | type: options.type, |
| 59 | + StyleType: options.StyleType, | ||
| 58 | }) | 60 | }) |
| 59 | console.log('onLoad',{...this.data.opt}); | 61 | console.log('onLoad',{...this.data.opt}); |
| 60 | let obj = wx.getStorageSync('info') | 62 | let obj = wx.getStorageSync('info') |
| @@ -75,7 +77,7 @@ Page({ | @@ -75,7 +77,7 @@ Page({ | ||
| 75 | wananchi() { | 77 | wananchi() { |
| 76 | this.closeModal() | 78 | this.closeModal() |
| 77 | wx.navigateTo({ | 79 | wx.navigateTo({ |
| 78 | - url: `/pages/me/wananchi?type=1&oid=${this.data.opt.detail.oid}` | 80 | + url: `/pages/me/wananchi?type=1&oid=${this.data.opt.detail.oid}&sid=${this.data.opt.sid}` |
| 79 | }) | 81 | }) |
| 80 | }, | 82 | }, |
| 81 | showModal() { | 83 | showModal() { |
| @@ -138,10 +140,17 @@ Page({ | @@ -138,10 +140,17 @@ Page({ | ||
| 138 | }, | 140 | }, |
| 139 | // 支付失败回调 types 1邀请函 2提前点餐 3商家端app分享 | 141 | // 支付失败回调 types 1邀请函 2提前点餐 3商家端app分享 |
| 140 | callbackFun() { | 142 | callbackFun() { |
| 141 | - let url = ''; | 143 | + let url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid; |
| 142 | let that = this; | 144 | let that = this; |
| 143 | - if (that.data.opt.types == '1') { | ||
| 144 | - url = '/pages/customer/detail_owner_invitation_new?id=' + that.data.opt.detail.oid; | 145 | + if(that.data.opt.types == '1'){ |
| 146 | + switch (this.data.StyleType) { | ||
| 147 | + case '1': | ||
| 148 | + url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid; | ||
| 149 | + break; | ||
| 150 | + case '2': | ||
| 151 | + url = '/pages/customer/detail_owner_invitation_new2?id=' + that.data.opt.detail.oid; | ||
| 152 | + break; | ||
| 153 | + } | ||
| 145 | } | 154 | } |
| 146 | if (that.data.opt.types == '2') { | 155 | if (that.data.opt.types == '2') { |
| 147 | let data={} | 156 | let data={} |
| @@ -166,8 +175,17 @@ Page({ | @@ -166,8 +175,17 @@ Page({ | ||
| 166 | recharge() { | 175 | recharge() { |
| 167 | console.log('充值完成跳转', this.data.opt.detail.oid); | 176 | console.log('充值完成跳转', this.data.opt.detail.oid); |
| 168 | this.closeModal() | 177 | this.closeModal() |
| 178 | + 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) { | ||
| 180 | + case '1': | ||
| 181 | + url = `/pages/customer/detail_owner_invitation_new1?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1` | ||
| 182 | + break; | ||
| 183 | + case '2': | ||
| 184 | + url = `/pages/customer/detail_owner_invitation_new2?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1` | ||
| 185 | + break; | ||
| 186 | + } | ||
| 169 | wx.reLaunch({ | 187 | wx.reLaunch({ |
| 170 | - url: `/pages/customer/detail_owner_invitation_new?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1` | 188 | + url |
| 171 | }) | 189 | }) |
| 172 | }, | 190 | }, |
| 173 | // 绑定名称 | 191 | // 绑定名称 |
| @@ -334,8 +352,17 @@ Page({ | @@ -334,8 +352,17 @@ Page({ | ||
| 334 | navEvent() { | 352 | navEvent() { |
| 335 | // 1 邀请函 2 提前点餐 3商家端分享 | 353 | // 1 邀请函 2 提前点餐 3商家端分享 |
| 336 | if (this.data.opt.types == '1') { | 354 | if (this.data.opt.types == '1') { |
| 355 | + let url='/pages/customer/detail_owner_invitation_new1?id=' + this.data.opt.detail.oid; | ||
| 356 | + switch (this.data.StyleType) { | ||
| 357 | + case '1': | ||
| 358 | + url = '/pages/customer/detail_owner_invitation_new1?id=' + this.data.opt.detail.oid; | ||
| 359 | + break; | ||
| 360 | + case '2': | ||
| 361 | + url = '/pages/customer/detail_owner_invitation_new1?id=' + this.data.opt.detail.oid; | ||
| 362 | + break; | ||
| 363 | + } | ||
| 337 | return wx.reLaunch({ | 364 | return wx.reLaunch({ |
| 338 | - url: '/pages/customer/detail_owner_invitation_new?id=' + this.data.opt.detail.oid, | 365 | + url, |
| 339 | }) | 366 | }) |
| 340 | } | 367 | } |
| 341 | if (this.data.opt.types == '2') { | 368 | if (this.data.opt.types == '2') { |
| @@ -62,6 +62,25 @@ Page({ | @@ -62,6 +62,25 @@ Page({ | ||
| 62 | } | 62 | } |
| 63 | }) | 63 | }) |
| 64 | }, | 64 | }, |
| 65 | + // 跳转到邀请函页面,获取商家使用模板 | ||
| 66 | + gotoInvitation(){ | ||
| 67 | + App.Seller.GetSellerTemplateConf({ | ||
| 68 | + sid:this.detail.seller.id | ||
| 69 | + }).then(res => { | ||
| 70 | + let url=`/pages/customer/detail_owner_invitation_new1?id=${detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1` | ||
| 71 | + switch (res.data.type) { | ||
| 72 | + case '1': | ||
| 73 | + url = `/pages/customer/detail_owner_invitation_new1?id=${detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1` | ||
| 74 | + break; | ||
| 75 | + case '2': | ||
| 76 | + url = `/pages/customer/detail_owner_invitation_new2?id=${detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1` | ||
| 77 | + break; | ||
| 78 | + } | ||
| 79 | + wx.navigateTo({ | ||
| 80 | + url, | ||
| 81 | + }) | ||
| 82 | + }) | ||
| 83 | + }, | ||
| 65 | //返回我的订单页面 | 84 | //返回我的订单页面 |
| 66 | navEvent(){ | 85 | navEvent(){ |
| 67 | wx.redirectTo({ | 86 | wx.redirectTo({ |
| @@ -39,11 +39,11 @@ | @@ -39,11 +39,11 @@ | ||
| 39 | <view class="min-but flex align-center justify-center txt-30-h solid">取消预订</view> | 39 | <view class="min-but flex align-center justify-center txt-30-h solid">取消预订</view> |
| 40 | </navigator> | 40 | </navigator> |
| 41 | <block> | 41 | <block> |
| 42 | - <navigator url="/pages/customer/detail_owner_invitation_new?id={{detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1" | 42 | + <view bindtap="gotoInvitation" |
| 43 | wx:if="{{detail.hasRunning}}" | 43 | wx:if="{{detail.hasRunning}}" |
| 44 | class="split"> | 44 | class="split"> |
| 45 | <view class="min-but flex align-center justify-center txt-30-h solid line-blue">通知好友</view> | 45 | <view class="min-but flex align-center justify-center txt-30-h solid line-blue">通知好友</view> |
| 46 | - </navigator> | 46 | + </view> |
| 47 | </block> | 47 | </block> |
| 48 | 48 | ||
| 49 | <navigator url="/pages/pinglun/create?sid={{detail.seller.id}}&oid={{detail.id}}&sellername={{detail.seller.sellername}}" | 49 | <navigator url="/pages/pinglun/create?sid={{detail.seller.id}}&oid={{detail.id}}&sellername={{detail.seller.sellername}}" |
| @@ -44,6 +44,7 @@ Page({ | @@ -44,6 +44,7 @@ Page({ | ||
| 44 | swich_phone:'0', | 44 | swich_phone:'0', |
| 45 | is_comments:'0', | 45 | is_comments:'0', |
| 46 | is_user_comments:false, | 46 | is_user_comments:false, |
| 47 | + StyleType:'', | ||
| 47 | }, | 48 | }, |
| 48 | /** | 49 | /** |
| 49 | * 生命周期函数--监听页面加载 | 50 | * 生命周期函数--监听页面加载 |
| @@ -338,6 +339,7 @@ Page({ | @@ -338,6 +339,7 @@ Page({ | ||
| 338 | coupon_dataList, | 339 | coupon_dataList, |
| 339 | swich_phone, | 340 | swich_phone, |
| 340 | is_comments, | 341 | is_comments, |
| 342 | + StyleType:res.data.type, | ||
| 341 | } | 343 | } |
| 342 | console.log('获取数据', {...obj}); | 344 | console.log('获取数据', {...obj}); |
| 343 | if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){ | 345 | if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){ |
| @@ -383,6 +385,7 @@ Page({ | @@ -383,6 +385,7 @@ Page({ | ||
| 383 | scoreInfo, | 385 | scoreInfo, |
| 384 | swich_phone, | 386 | swich_phone, |
| 385 | is_comments, | 387 | is_comments, |
| 388 | + StyleType:res.data.type, | ||
| 386 | }) | 389 | }) |
| 387 | if (home && home.red == '1' && home.green == '67' && home.blue == '163') { | 390 | if (home && home.red == '1' && home.green == '67' && home.blue == '163') { |
| 388 | this.setData({ | 391 | this.setData({ |
| @@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
| 88 | 会员生日当天可用{{item.desc?','+item.desc+'。':'。'}} | 88 | 会员生日当天可用{{item.desc?','+item.desc+'。':'。'}} |
| 89 | </view> | 89 | </view> |
| 90 | </view> | 90 | </view> |
| 91 | - <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> | 91 | + <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 92 | <view class="font24r orderingFood"> | 92 | <view class="font24r orderingFood"> |
| 93 | 去抢购 | 93 | 去抢购 |
| 94 | </view> | 94 | </view> |
| @@ -45,6 +45,7 @@ Page({ | @@ -45,6 +45,7 @@ Page({ | ||
| 45 | is_comments: '0', | 45 | is_comments: '0', |
| 46 | is_user_comments: false, | 46 | is_user_comments: false, |
| 47 | tableinfo: [], | 47 | tableinfo: [], |
| 48 | + StyleType:'', | ||
| 48 | }, | 49 | }, |
| 49 | tablestr: '', | 50 | tablestr: '', |
| 50 | urlsValue: [], | 51 | urlsValue: [], |
| @@ -379,6 +380,7 @@ Page({ | @@ -379,6 +380,7 @@ Page({ | ||
| 379 | coupon_dataList, | 380 | coupon_dataList, |
| 380 | swich_phone, | 381 | swich_phone, |
| 381 | is_comments, | 382 | is_comments, |
| 383 | + StyleType:res.data.type, | ||
| 382 | } | 384 | } |
| 383 | console.log('获取数据', { | 385 | console.log('获取数据', { |
| 384 | ...obj | 386 | ...obj |
| @@ -426,6 +428,7 @@ Page({ | @@ -426,6 +428,7 @@ Page({ | ||
| 426 | scoreInfo, | 428 | scoreInfo, |
| 427 | swich_phone, | 429 | swich_phone, |
| 428 | is_comments, | 430 | is_comments, |
| 431 | + StyleType:res.data.type, | ||
| 429 | }) | 432 | }) |
| 430 | if (home && home.red == '1' && home.green == '67' && home.blue == '163') { | 433 | if (home && home.red == '1' && home.green == '67' && home.blue == '163') { |
| 431 | this.setData({ | 434 | this.setData({ |
| @@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
| 68 | 会员生日当天可用{{item.desc?','+item.desc+'。':'。'}} | 68 | 会员生日当天可用{{item.desc?','+item.desc+'。':'。'}} |
| 69 | </view> | 69 | </view> |
| 70 | </view> | 70 | </view> |
| 71 | - <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> | 71 | + <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 72 | <view class="font24r orderingFood"> | 72 | <view class="font24r orderingFood"> |
| 73 | 去抢购 | 73 | 去抢购 |
| 74 | </view> | 74 | </view> |
| @@ -168,7 +168,7 @@ Page({ | @@ -168,7 +168,7 @@ Page({ | ||
| 168 | }, | 168 | }, |
| 169 | gotoDetailHan(e){ | 169 | gotoDetailHan(e){ |
| 170 | console.log(util.attr(e,'id')) | 170 | console.log(util.attr(e,'id')) |
| 171 | - let url='/pages/customer/detail_owner_invitation_new?id='+util.attr(e,'id')+'&hasInvitation=1&hasSellerShare=1&tplid=1' | 171 | + let url='/pages/customer/detail_owner_invitation_new1?id='+util.attr(e,'id')+'&hasInvitation=1&hasSellerShare=1&tplid=1' |
| 172 | wx.navigateTo({ | 172 | wx.navigateTo({ |
| 173 | url:url, | 173 | url:url, |
| 174 | }) | 174 | }) |
| @@ -7,6 +7,7 @@ Page({ | @@ -7,6 +7,7 @@ Page({ | ||
| 7 | data: { | 7 | data: { |
| 8 | isShow:'show', | 8 | isShow:'show', |
| 9 | oid:'', | 9 | oid:'', |
| 10 | + sid:'', | ||
| 10 | }, | 11 | }, |
| 11 | /** | 12 | /** |
| 12 | * 生命周期函数--监听页面加载 | 13 | * 生命周期函数--监听页面加载 |
| @@ -16,14 +17,28 @@ Page({ | @@ -16,14 +17,28 @@ Page({ | ||
| 16 | if(options && options.type=='1'){ | 17 | if(options && options.type=='1'){ |
| 17 | this.setData({ | 18 | this.setData({ |
| 18 | isShow:'none', | 19 | isShow:'none', |
| 19 | - oid:options.oid | 20 | + oid:options.oid, |
| 21 | + sid:options.sid, | ||
| 20 | }) | 22 | }) |
| 21 | } | 23 | } |
| 22 | console.log('options',options); | 24 | console.log('options',options); |
| 23 | }, | 25 | }, |
| 24 | navEvent(){ | 26 | navEvent(){ |
| 25 | - return wx.reLaunch({ | ||
| 26 | - url: '/pages/customer/detail_owner_invitation_new?id='+this.data.oid, | 27 | + App.Seller.GetSellerTemplateConf({ |
| 28 | + sid:this.data.sid | ||
| 29 | + }).then(res => { | ||
| 30 | + let url='/pages/customer/detail_owner_invitation_new1?id='+this.data.oid | ||
| 31 | + switch (res.data.type) { | ||
| 32 | + case '1': | ||
| 33 | + url = '/pages/customer/detail_owner_invitation_new1?id='+this.data.oid | ||
| 34 | + break; | ||
| 35 | + case '2': | ||
| 36 | + url = '/pages/customer/detail_owner_invitation_new2??id='+this.data.oid | ||
| 37 | + break; | ||
| 38 | + } | ||
| 39 | + return wx.reLaunch({ | ||
| 40 | + url, | ||
| 41 | + }) | ||
| 27 | }) | 42 | }) |
| 28 | }, | 43 | }, |
| 29 | /** | 44 | /** |
-
Please register or login to post a comment