Showing
12 changed files
with
127 additions
and
83 deletions
| @@ -172,7 +172,7 @@ Page({ | @@ -172,7 +172,7 @@ Page({ | ||
| 172 | * 监听用户点击分享到朋友圈按钮的操作 | 172 | * 监听用户点击分享到朋友圈按钮的操作 |
| 173 | */ | 173 | */ |
| 174 | onShareTimeline() { | 174 | onShareTimeline() { |
| 175 | - return this.sharesetting('1'); | 175 | + return this.sharesetting(); |
| 176 | }, | 176 | }, |
| 177 | /** | 177 | /** |
| 178 | * 生命周期函数--监听页面显示 | 178 | * 生命周期函数--监听页面显示 |
| @@ -418,9 +418,14 @@ Page({ | @@ -418,9 +418,14 @@ Page({ | ||
| 418 | // 点击支付定金 | 418 | // 点击支付定金 |
| 419 | paymentFun() { | 419 | paymentFun() { |
| 420 | let that = this; | 420 | let that = this; |
| 421 | + let openid = getApp().openid; | ||
| 422 | + if (!openid) return wx.showToast({ | ||
| 423 | + title: '请在小程序中支付订金!', | ||
| 424 | + icon: 'none', | ||
| 425 | + }) | ||
| 421 | App.PayOnline.CombineTransactionsByDeposit({ | 426 | App.PayOnline.CombineTransactionsByDeposit({ |
| 422 | id: this.data.paymentId, | 427 | id: this.data.paymentId, |
| 423 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 428 | + openid, |
| 424 | }).then(res => { | 429 | }).then(res => { |
| 425 | if (res.ret == 200) { | 430 | if (res.ret == 200) { |
| 426 | wx.requestPayment({ | 431 | wx.requestPayment({ |
| @@ -579,7 +584,7 @@ Page({ | @@ -579,7 +584,7 @@ Page({ | ||
| 579 | console.log('海报生成成功', this.data.imgSrc); | 584 | console.log('海报生成成功', this.data.imgSrc); |
| 580 | }, | 585 | }, |
| 581 | // 分享 | 586 | // 分享 |
| 582 | - sharesetting(timeline) { | 587 | + sharesetting() { |
| 583 | wx.reportMonitor('1017', 1) | 588 | wx.reportMonitor('1017', 1) |
| 584 | this.closeModal() | 589 | this.closeModal() |
| 585 | if (this.data.options.isOrder == '1' && this.data.detail.status != '4') { | 590 | if (this.data.options.isOrder == '1' && this.data.detail.status != '4') { |
| @@ -593,10 +598,9 @@ Page({ | @@ -593,10 +598,9 @@ Page({ | ||
| 593 | } else { | 598 | } else { |
| 594 | let parmdata = { | 599 | let parmdata = { |
| 595 | id: this.id, | 600 | id: this.id, |
| 596 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 601 | + fromid: getApp().openid, |
| 597 | hasInvitation: 1, | 602 | hasInvitation: 1, |
| 598 | - tplid: this.data.options.tplid, | ||
| 599 | - timeline | 603 | + tplid: this.data.options.tplid |
| 600 | } | 604 | } |
| 601 | if (this.data.options.uid) { | 605 | if (this.data.options.uid) { |
| 602 | parmdata.uid = this.data.options.uid; | 606 | parmdata.uid = this.data.options.uid; |
| @@ -200,7 +200,7 @@ Page({ | @@ -200,7 +200,7 @@ Page({ | ||
| 200 | * 监听用户点击分享到朋友圈按钮的操作 | 200 | * 监听用户点击分享到朋友圈按钮的操作 |
| 201 | */ | 201 | */ |
| 202 | onShareTimeline() { | 202 | onShareTimeline() { |
| 203 | - return this.sharesetting('1'); | 203 | + return this.sharesetting(); |
| 204 | }, | 204 | }, |
| 205 | /** | 205 | /** |
| 206 | * 生命周期函数--监听页面显示 | 206 | * 生命周期函数--监听页面显示 |
| @@ -436,9 +436,14 @@ Page({ | @@ -436,9 +436,14 @@ Page({ | ||
| 436 | // 点击支付定金 | 436 | // 点击支付定金 |
| 437 | paymentFun() { | 437 | paymentFun() { |
| 438 | let that = this; | 438 | let that = this; |
| 439 | + let openid = getApp().openid; | ||
| 440 | + if (!openid) return wx.showToast({ | ||
| 441 | + title: '请在小程序中支付订金!', | ||
| 442 | + icon: 'none', | ||
| 443 | + }) | ||
| 439 | App.PayOnline.CombineTransactionsByDeposit({ | 444 | App.PayOnline.CombineTransactionsByDeposit({ |
| 440 | id: this.data.paymentId, | 445 | id: this.data.paymentId, |
| 441 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 446 | + openid, |
| 442 | }).then(res => { | 447 | }).then(res => { |
| 443 | if (res.ret == 200) { | 448 | if (res.ret == 200) { |
| 444 | wx.requestPayment({ | 449 | wx.requestPayment({ |
| @@ -596,7 +601,7 @@ Page({ | @@ -596,7 +601,7 @@ Page({ | ||
| 596 | console.log('海报生成成功', this.data.imgSrc); | 601 | console.log('海报生成成功', this.data.imgSrc); |
| 597 | }, | 602 | }, |
| 598 | // 分享 | 603 | // 分享 |
| 599 | - sharesetting(timeline) { | 604 | + sharesetting() { |
| 600 | wx.reportMonitor('1017', 1) | 605 | wx.reportMonitor('1017', 1) |
| 601 | this.closeModal() | 606 | this.closeModal() |
| 602 | if (this.data.options.isOrder == '1' && this.data.detail.status != '4') { | 607 | if (this.data.options.isOrder == '1' && this.data.detail.status != '4') { |
| @@ -610,10 +615,9 @@ Page({ | @@ -610,10 +615,9 @@ Page({ | ||
| 610 | } else { | 615 | } else { |
| 611 | let parmdata = { | 616 | let parmdata = { |
| 612 | id: this.id, | 617 | id: this.id, |
| 613 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 618 | + fromid: getApp().openid, |
| 614 | hasInvitation: 1, | 619 | hasInvitation: 1, |
| 615 | - tplid: this.data.options.tplid, | ||
| 616 | - timeline | 620 | + tplid: this.data.options.tplid |
| 617 | } | 621 | } |
| 618 | if (this.data.options.uid) { | 622 | if (this.data.options.uid) { |
| 619 | parmdata.uid = this.data.options.uid; | 623 | parmdata.uid = this.data.options.uid; |
| @@ -208,7 +208,7 @@ Page({ | @@ -208,7 +208,7 @@ Page({ | ||
| 208 | * 监听用户点击分享到朋友圈按钮的操作 | 208 | * 监听用户点击分享到朋友圈按钮的操作 |
| 209 | */ | 209 | */ |
| 210 | onShareTimeline() { | 210 | onShareTimeline() { |
| 211 | - return this.sharesetting('1'); | 211 | + return this.sharesetting(); |
| 212 | }, | 212 | }, |
| 213 | /** | 213 | /** |
| 214 | * 生命周期函数--监听页面显示 | 214 | * 生命周期函数--监听页面显示 |
| @@ -444,9 +444,14 @@ Page({ | @@ -444,9 +444,14 @@ Page({ | ||
| 444 | // 点击支付定金 | 444 | // 点击支付定金 |
| 445 | paymentFun() { | 445 | paymentFun() { |
| 446 | let that = this; | 446 | let that = this; |
| 447 | + let openid = getApp().openid; | ||
| 448 | + if (!openid) return wx.showToast({ | ||
| 449 | + title: '请在小程序中支付订金!', | ||
| 450 | + icon: 'none', | ||
| 451 | + }) | ||
| 447 | App.PayOnline.CombineTransactionsByDeposit({ | 452 | App.PayOnline.CombineTransactionsByDeposit({ |
| 448 | id: this.data.paymentId, | 453 | id: this.data.paymentId, |
| 449 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 454 | + openid, |
| 450 | }).then(res => { | 455 | }).then(res => { |
| 451 | if (res.ret == 200) { | 456 | if (res.ret == 200) { |
| 452 | wx.requestPayment({ | 457 | wx.requestPayment({ |
| @@ -605,7 +610,7 @@ Page({ | @@ -605,7 +610,7 @@ Page({ | ||
| 605 | console.log('海报生成成功', this.data.imgSrc); | 610 | console.log('海报生成成功', this.data.imgSrc); |
| 606 | }, | 611 | }, |
| 607 | // 分享 | 612 | // 分享 |
| 608 | - sharesetting(timeline) { | 613 | + sharesetting() { |
| 609 | wx.reportMonitor('1017', 1) | 614 | wx.reportMonitor('1017', 1) |
| 610 | this.closeModal() | 615 | this.closeModal() |
| 611 | if (this.data.options.isOrder == '1' && this.data.detail.status != '4') { | 616 | if (this.data.options.isOrder == '1' && this.data.detail.status != '4') { |
| @@ -619,10 +624,9 @@ Page({ | @@ -619,10 +624,9 @@ Page({ | ||
| 619 | } else { | 624 | } else { |
| 620 | let parmdata = { | 625 | let parmdata = { |
| 621 | id: this.id, | 626 | id: this.id, |
| 622 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 627 | + fromid: getApp().openid, |
| 623 | hasInvitation: 1, | 628 | hasInvitation: 1, |
| 624 | - tplid: this.data.options.tplid, | ||
| 625 | - timeline | 629 | + tplid: this.data.options.tplid |
| 626 | } | 630 | } |
| 627 | if (this.data.options.uid) { | 631 | if (this.data.options.uid) { |
| 628 | parmdata.uid = this.data.options.uid; | 632 | parmdata.uid = this.data.options.uid; |
| @@ -169,7 +169,7 @@ Page({ | @@ -169,7 +169,7 @@ Page({ | ||
| 169 | * 监听用户点击分享到朋友圈按钮的操作 | 169 | * 监听用户点击分享到朋友圈按钮的操作 |
| 170 | */ | 170 | */ |
| 171 | onShareTimeline() { | 171 | onShareTimeline() { |
| 172 | - return this.sharesetting('1'); | 172 | + return this.sharesetting(); |
| 173 | }, | 173 | }, |
| 174 | /** | 174 | /** |
| 175 | * 生命周期函数--监听页面显示 | 175 | * 生命周期函数--监听页面显示 |
| @@ -403,9 +403,14 @@ Page({ | @@ -403,9 +403,14 @@ Page({ | ||
| 403 | // 点击支付定金 | 403 | // 点击支付定金 |
| 404 | paymentFun() { | 404 | paymentFun() { |
| 405 | let that = this; | 405 | let that = this; |
| 406 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 407 | - id: this.data.paymentId, | ||
| 408 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 406 | + let openid = getApp().openid; |
| 407 | + if (!openid) return wx.showToast({ | ||
| 408 | + title: '请在小程序中支付订金!', | ||
| 409 | + icon: 'none', | ||
| 410 | + }) | ||
| 411 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 412 | + id: this.data.paymentId, | ||
| 413 | + openid, | ||
| 409 | }).then(res => { | 414 | }).then(res => { |
| 410 | if (res.ret == 200) { | 415 | if (res.ret == 200) { |
| 411 | wx.requestPayment({ | 416 | wx.requestPayment({ |
| @@ -565,7 +570,7 @@ Page({ | @@ -565,7 +570,7 @@ Page({ | ||
| 565 | console.log('海报生成成功',this.data.imgSrc); | 570 | console.log('海报生成成功',this.data.imgSrc); |
| 566 | }, | 571 | }, |
| 567 | // 分享 | 572 | // 分享 |
| 568 | - sharesetting(timeline) { | 573 | + sharesetting() { |
| 569 | wx.reportMonitor('1017', 1) | 574 | wx.reportMonitor('1017', 1) |
| 570 | this.closeModal() | 575 | this.closeModal() |
| 571 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 576 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -579,10 +584,9 @@ Page({ | @@ -579,10 +584,9 @@ Page({ | ||
| 579 | }else{ | 584 | }else{ |
| 580 | let parmdata = { | 585 | let parmdata = { |
| 581 | id: this.id, | 586 | id: this.id, |
| 582 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 587 | + fromid: getApp().openid, |
| 583 | hasInvitation: 1, | 588 | hasInvitation: 1, |
| 584 | - tplid: this.data.options.tplid, | ||
| 585 | - timeline | 589 | + tplid: this.data.options.tplid |
| 586 | } | 590 | } |
| 587 | if (this.data.options.uid) { | 591 | if (this.data.options.uid) { |
| 588 | parmdata.uid = this.data.options.uid; | 592 | parmdata.uid = this.data.options.uid; |
| @@ -169,7 +169,7 @@ Page({ | @@ -169,7 +169,7 @@ Page({ | ||
| 169 | * 监听用户点击分享到朋友圈按钮的操作 | 169 | * 监听用户点击分享到朋友圈按钮的操作 |
| 170 | */ | 170 | */ |
| 171 | onShareTimeline() { | 171 | onShareTimeline() { |
| 172 | - return this.sharesetting('1'); | 172 | + return this.sharesetting(); |
| 173 | }, | 173 | }, |
| 174 | /** | 174 | /** |
| 175 | * 生命周期函数--监听页面显示 | 175 | * 生命周期函数--监听页面显示 |
| @@ -403,9 +403,14 @@ Page({ | @@ -403,9 +403,14 @@ Page({ | ||
| 403 | // 点击支付定金 | 403 | // 点击支付定金 |
| 404 | paymentFun() { | 404 | paymentFun() { |
| 405 | let that = this; | 405 | let that = this; |
| 406 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 407 | - id: this.data.paymentId, | ||
| 408 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 406 | + let openid = getApp().openid; |
| 407 | + if (!openid) return wx.showToast({ | ||
| 408 | + title: '请在小程序中支付订金!', | ||
| 409 | + icon: 'none', | ||
| 410 | + }) | ||
| 411 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 412 | + id: this.data.paymentId, | ||
| 413 | + openid, | ||
| 409 | }).then(res => { | 414 | }).then(res => { |
| 410 | if (res.ret == 200) { | 415 | if (res.ret == 200) { |
| 411 | wx.requestPayment({ | 416 | wx.requestPayment({ |
| @@ -565,7 +570,7 @@ Page({ | @@ -565,7 +570,7 @@ Page({ | ||
| 565 | console.log('海报生成成功',this.data.imgSrc); | 570 | console.log('海报生成成功',this.data.imgSrc); |
| 566 | }, | 571 | }, |
| 567 | // 分享 | 572 | // 分享 |
| 568 | - sharesetting(timeline) { | 573 | + sharesetting() { |
| 569 | wx.reportMonitor('1017', 1) | 574 | wx.reportMonitor('1017', 1) |
| 570 | this.closeModal() | 575 | this.closeModal() |
| 571 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 576 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -579,10 +584,9 @@ Page({ | @@ -579,10 +584,9 @@ Page({ | ||
| 579 | }else{ | 584 | }else{ |
| 580 | let parmdata = { | 585 | let parmdata = { |
| 581 | id: this.id, | 586 | id: this.id, |
| 582 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 587 | + fromid: getApp().openid, |
| 583 | hasInvitation: 1, | 588 | hasInvitation: 1, |
| 584 | - tplid: this.data.options.tplid, | ||
| 585 | - timeline | 589 | + tplid: this.data.options.tplid |
| 586 | } | 590 | } |
| 587 | if (this.data.options.uid) { | 591 | if (this.data.options.uid) { |
| 588 | parmdata.uid = this.data.options.uid; | 592 | parmdata.uid = this.data.options.uid; |
| @@ -169,7 +169,7 @@ Page({ | @@ -169,7 +169,7 @@ Page({ | ||
| 169 | * 监听用户点击分享到朋友圈按钮的操作 | 169 | * 监听用户点击分享到朋友圈按钮的操作 |
| 170 | */ | 170 | */ |
| 171 | onShareTimeline() { | 171 | onShareTimeline() { |
| 172 | - return this.sharesetting('1'); | 172 | + return this.sharesetting(); |
| 173 | }, | 173 | }, |
| 174 | /** | 174 | /** |
| 175 | * 生命周期函数--监听页面显示 | 175 | * 生命周期函数--监听页面显示 |
| @@ -403,9 +403,14 @@ Page({ | @@ -403,9 +403,14 @@ Page({ | ||
| 403 | // 点击支付定金 | 403 | // 点击支付定金 |
| 404 | paymentFun() { | 404 | paymentFun() { |
| 405 | let that = this; | 405 | let that = this; |
| 406 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 407 | - id: this.data.paymentId, | ||
| 408 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 406 | + let openid = getApp().openid; |
| 407 | + if (!openid) return wx.showToast({ | ||
| 408 | + title: '请在小程序中支付订金!', | ||
| 409 | + icon: 'none', | ||
| 410 | + }) | ||
| 411 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 412 | + id: this.data.paymentId, | ||
| 413 | + openid, | ||
| 409 | }).then(res => { | 414 | }).then(res => { |
| 410 | if (res.ret == 200) { | 415 | if (res.ret == 200) { |
| 411 | wx.requestPayment({ | 416 | wx.requestPayment({ |
| @@ -565,7 +570,7 @@ Page({ | @@ -565,7 +570,7 @@ Page({ | ||
| 565 | console.log('海报生成成功',this.data.imgSrc); | 570 | console.log('海报生成成功',this.data.imgSrc); |
| 566 | }, | 571 | }, |
| 567 | // 分享 | 572 | // 分享 |
| 568 | - sharesetting(timeline) { | 573 | + sharesetting() { |
| 569 | wx.reportMonitor('1017', 1) | 574 | wx.reportMonitor('1017', 1) |
| 570 | this.closeModal() | 575 | this.closeModal() |
| 571 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 576 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -579,10 +584,9 @@ Page({ | @@ -579,10 +584,9 @@ Page({ | ||
| 579 | }else{ | 584 | }else{ |
| 580 | let parmdata = { | 585 | let parmdata = { |
| 581 | id: this.id, | 586 | id: this.id, |
| 582 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 587 | + fromid: getApp().openid, |
| 583 | hasInvitation: 1, | 588 | hasInvitation: 1, |
| 584 | - tplid: this.data.options.tplid, | ||
| 585 | - timeline | 589 | + tplid: this.data.options.tplid |
| 586 | } | 590 | } |
| 587 | if (this.data.options.uid) { | 591 | if (this.data.options.uid) { |
| 588 | parmdata.uid = this.data.options.uid; | 592 | parmdata.uid = this.data.options.uid; |
| @@ -168,7 +168,7 @@ Page({ | @@ -168,7 +168,7 @@ Page({ | ||
| 168 | * 监听用户点击分享到朋友圈按钮的操作 | 168 | * 监听用户点击分享到朋友圈按钮的操作 |
| 169 | */ | 169 | */ |
| 170 | onShareTimeline() { | 170 | onShareTimeline() { |
| 171 | - return this.sharesetting('1'); | 171 | + return this.sharesetting(); |
| 172 | }, | 172 | }, |
| 173 | /** | 173 | /** |
| 174 | * 生命周期函数--监听页面显示 | 174 | * 生命周期函数--监听页面显示 |
| @@ -402,9 +402,14 @@ Page({ | @@ -402,9 +402,14 @@ Page({ | ||
| 402 | // 点击支付定金 | 402 | // 点击支付定金 |
| 403 | paymentFun() { | 403 | paymentFun() { |
| 404 | let that = this; | 404 | let that = this; |
| 405 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 406 | - id: this.data.paymentId, | ||
| 407 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 405 | + let openid = getApp().openid; |
| 406 | + if (!openid) return wx.showToast({ | ||
| 407 | + title: '请在小程序中支付订金!', | ||
| 408 | + icon: 'none', | ||
| 409 | + }) | ||
| 410 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 411 | + id: this.data.paymentId, | ||
| 412 | + openid, | ||
| 408 | }).then(res => { | 413 | }).then(res => { |
| 409 | if (res.ret == 200) { | 414 | if (res.ret == 200) { |
| 410 | wx.requestPayment({ | 415 | wx.requestPayment({ |
| @@ -564,7 +569,7 @@ Page({ | @@ -564,7 +569,7 @@ Page({ | ||
| 564 | console.log('海报生成成功',this.data.imgSrc); | 569 | console.log('海报生成成功',this.data.imgSrc); |
| 565 | }, | 570 | }, |
| 566 | // 分享 | 571 | // 分享 |
| 567 | - sharesetting(timeline) { | 572 | + sharesetting() { |
| 568 | wx.reportMonitor('1017', 1) | 573 | wx.reportMonitor('1017', 1) |
| 569 | this.closeModal() | 574 | this.closeModal() |
| 570 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 575 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -578,10 +583,9 @@ Page({ | @@ -578,10 +583,9 @@ Page({ | ||
| 578 | }else{ | 583 | }else{ |
| 579 | let parmdata = { | 584 | let parmdata = { |
| 580 | id: this.id, | 585 | id: this.id, |
| 581 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 586 | + fromid: getApp().openid, |
| 582 | hasInvitation: 1, | 587 | hasInvitation: 1, |
| 583 | - tplid: this.data.options.tplid, | ||
| 584 | - timeline | 588 | + tplid: this.data.options.tplid |
| 585 | } | 589 | } |
| 586 | if (this.data.options.uid) { | 590 | if (this.data.options.uid) { |
| 587 | parmdata.uid = this.data.options.uid; | 591 | parmdata.uid = this.data.options.uid; |
| @@ -164,7 +164,7 @@ Page({ | @@ -164,7 +164,7 @@ Page({ | ||
| 164 | return this.sharesetting(); | 164 | return this.sharesetting(); |
| 165 | }, | 165 | }, |
| 166 | onShareTimeline() { | 166 | onShareTimeline() { |
| 167 | - return this.sharesetting('1'); | 167 | + return this.sharesetting(); |
| 168 | }, | 168 | }, |
| 169 | /** | 169 | /** |
| 170 | * 生命周期函数--监听页面显示 | 170 | * 生命周期函数--监听页面显示 |
| @@ -357,9 +357,14 @@ Page({ | @@ -357,9 +357,14 @@ Page({ | ||
| 357 | // 点击支付定金 | 357 | // 点击支付定金 |
| 358 | paymentFun() { | 358 | paymentFun() { |
| 359 | let that = this; | 359 | let that = this; |
| 360 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 361 | - id: this.data.paymentId, | ||
| 362 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 360 | + let openid = getApp().openid; |
| 361 | + if (!openid) return wx.showToast({ | ||
| 362 | + title: '请在小程序中支付订金!', | ||
| 363 | + icon: 'none', | ||
| 364 | + }) | ||
| 365 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 366 | + id: this.data.paymentId, | ||
| 367 | + openid, | ||
| 363 | }).then(res => { | 368 | }).then(res => { |
| 364 | if (res.ret == 200) { | 369 | if (res.ret == 200) { |
| 365 | wx.requestPayment({ | 370 | wx.requestPayment({ |
| @@ -518,7 +523,7 @@ Page({ | @@ -518,7 +523,7 @@ Page({ | ||
| 518 | console.log('海报生成成功',this.data.imgSrc); | 523 | console.log('海报生成成功',this.data.imgSrc); |
| 519 | }, | 524 | }, |
| 520 | // 分享 | 525 | // 分享 |
| 521 | - sharesetting(timeline) { | 526 | + sharesetting() { |
| 522 | wx.reportMonitor('1017', 1) | 527 | wx.reportMonitor('1017', 1) |
| 523 | this.closeModal() | 528 | this.closeModal() |
| 524 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 529 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -532,10 +537,9 @@ Page({ | @@ -532,10 +537,9 @@ Page({ | ||
| 532 | }else{ | 537 | }else{ |
| 533 | let parmdata = { | 538 | let parmdata = { |
| 534 | id: this.id, | 539 | id: this.id, |
| 535 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 540 | + fromid: getApp().openid, |
| 536 | hasInvitation: 1, | 541 | hasInvitation: 1, |
| 537 | - tplid: this.data.options.tplid, | ||
| 538 | - timeline | 542 | + tplid: this.data.options.tplid |
| 539 | } | 543 | } |
| 540 | if (this.data.options.uid) { | 544 | if (this.data.options.uid) { |
| 541 | parmdata.uid = this.data.options.uid; | 545 | parmdata.uid = this.data.options.uid; |
| @@ -169,7 +169,7 @@ Page({ | @@ -169,7 +169,7 @@ Page({ | ||
| 169 | * 监听用户点击分享到朋友圈按钮的操作 | 169 | * 监听用户点击分享到朋友圈按钮的操作 |
| 170 | */ | 170 | */ |
| 171 | onShareTimeline() { | 171 | onShareTimeline() { |
| 172 | - return this.sharesetting('1'); | 172 | + return this.sharesetting(); |
| 173 | }, | 173 | }, |
| 174 | /** | 174 | /** |
| 175 | * 生命周期函数--监听页面显示 | 175 | * 生命周期函数--监听页面显示 |
| @@ -403,9 +403,14 @@ Page({ | @@ -403,9 +403,14 @@ Page({ | ||
| 403 | // 点击支付定金 | 403 | // 点击支付定金 |
| 404 | paymentFun() { | 404 | paymentFun() { |
| 405 | let that = this; | 405 | let that = this; |
| 406 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 407 | - id: this.data.paymentId, | ||
| 408 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 406 | + let openid = getApp().openid; |
| 407 | + if (!openid) return wx.showToast({ | ||
| 408 | + title: '请在小程序中支付订金!', | ||
| 409 | + icon: 'none', | ||
| 410 | + }) | ||
| 411 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 412 | + id: this.data.paymentId, | ||
| 413 | + openid, | ||
| 409 | }).then(res => { | 414 | }).then(res => { |
| 410 | if (res.ret == 200) { | 415 | if (res.ret == 200) { |
| 411 | wx.requestPayment({ | 416 | wx.requestPayment({ |
| @@ -565,7 +570,7 @@ Page({ | @@ -565,7 +570,7 @@ Page({ | ||
| 565 | console.log('海报生成成功',this.data.imgSrc); | 570 | console.log('海报生成成功',this.data.imgSrc); |
| 566 | }, | 571 | }, |
| 567 | // 分享 | 572 | // 分享 |
| 568 | - sharesetting(timeline) { | 573 | + sharesetting() { |
| 569 | wx.reportMonitor('1017', 1) | 574 | wx.reportMonitor('1017', 1) |
| 570 | this.closeModal() | 575 | this.closeModal() |
| 571 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 576 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -579,10 +584,9 @@ Page({ | @@ -579,10 +584,9 @@ Page({ | ||
| 579 | }else{ | 584 | }else{ |
| 580 | let parmdata = { | 585 | let parmdata = { |
| 581 | id: this.id, | 586 | id: this.id, |
| 582 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 587 | + fromid: getApp().openid, |
| 583 | hasInvitation: 1, | 588 | hasInvitation: 1, |
| 584 | - tplid: this.data.options.tplid, | ||
| 585 | - timeline | 589 | + tplid: this.data.options.tplid |
| 586 | } | 590 | } |
| 587 | if (this.data.options.uid) { | 591 | if (this.data.options.uid) { |
| 588 | parmdata.uid = this.data.options.uid; | 592 | parmdata.uid = this.data.options.uid; |
| @@ -169,7 +169,7 @@ Page({ | @@ -169,7 +169,7 @@ Page({ | ||
| 169 | * 监听用户点击分享到朋友圈按钮的操作 | 169 | * 监听用户点击分享到朋友圈按钮的操作 |
| 170 | */ | 170 | */ |
| 171 | onShareTimeline() { | 171 | onShareTimeline() { |
| 172 | - return this.sharesetting('1'); | 172 | + return this.sharesetting(); |
| 173 | }, | 173 | }, |
| 174 | /** | 174 | /** |
| 175 | * 生命周期函数--监听页面显示 | 175 | * 生命周期函数--监听页面显示 |
| @@ -402,9 +402,14 @@ Page({ | @@ -402,9 +402,14 @@ Page({ | ||
| 402 | // 点击支付定金 | 402 | // 点击支付定金 |
| 403 | paymentFun() { | 403 | paymentFun() { |
| 404 | let that = this; | 404 | let that = this; |
| 405 | - App.PayOnline.CombineTransactionsByDeposit({ | ||
| 406 | - id: this.data.paymentId, | ||
| 407 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 405 | + let openid = getApp().openid; |
| 406 | + if (!openid) return wx.showToast({ | ||
| 407 | + title: '请在小程序中支付订金!', | ||
| 408 | + icon: 'none', | ||
| 409 | + }) | ||
| 410 | + App.PayOnline.CombineTransactionsByDeposit({ | ||
| 411 | + id: this.data.paymentId, | ||
| 412 | + openid, | ||
| 408 | }).then(res => { | 413 | }).then(res => { |
| 409 | if (res.ret == 200) { | 414 | if (res.ret == 200) { |
| 410 | wx.requestPayment({ | 415 | wx.requestPayment({ |
| @@ -564,7 +569,7 @@ Page({ | @@ -564,7 +569,7 @@ Page({ | ||
| 564 | console.log('海报生成成功',this.data.imgSrc); | 569 | console.log('海报生成成功',this.data.imgSrc); |
| 565 | }, | 570 | }, |
| 566 | // 分享 | 571 | // 分享 |
| 567 | - sharesetting(timeline) { | 572 | + sharesetting() { |
| 568 | wx.reportMonitor('1017', 1) | 573 | wx.reportMonitor('1017', 1) |
| 569 | this.closeModal() | 574 | this.closeModal() |
| 570 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 575 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -578,10 +583,9 @@ Page({ | @@ -578,10 +583,9 @@ Page({ | ||
| 578 | }else{ | 583 | }else{ |
| 579 | let parmdata = { | 584 | let parmdata = { |
| 580 | id: this.id, | 585 | id: this.id, |
| 581 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 586 | + fromid: getApp().openid, |
| 582 | hasInvitation: 1, | 587 | hasInvitation: 1, |
| 583 | - tplid: this.data.options.tplid, | ||
| 584 | - timeline | 588 | + tplid: this.data.options.tplid |
| 585 | } | 589 | } |
| 586 | if (this.data.options.uid) { | 590 | if (this.data.options.uid) { |
| 587 | parmdata.uid = this.data.options.uid; | 591 | parmdata.uid = this.data.options.uid; |
| @@ -186,7 +186,7 @@ Page({ | @@ -186,7 +186,7 @@ Page({ | ||
| 186 | * 监听用户点击分享到朋友圈按钮的操作 | 186 | * 监听用户点击分享到朋友圈按钮的操作 |
| 187 | */ | 187 | */ |
| 188 | onShareTimeline() { | 188 | onShareTimeline() { |
| 189 | - return this.sharesetting('1'); | 189 | + return this.sharesetting(); |
| 190 | }, | 190 | }, |
| 191 | /** | 191 | /** |
| 192 | * 生命周期函数--监听页面显示 | 192 | * 生命周期函数--监听页面显示 |
| @@ -422,9 +422,14 @@ Page({ | @@ -422,9 +422,14 @@ Page({ | ||
| 422 | // 点击支付定金 | 422 | // 点击支付定金 |
| 423 | paymentFun() { | 423 | paymentFun() { |
| 424 | let that = this; | 424 | let that = this; |
| 425 | + let openid = getApp().openid; | ||
| 426 | + if (!openid) return wx.showToast({ | ||
| 427 | + title: '请在小程序中支付订金!', | ||
| 428 | + icon: 'none', | ||
| 429 | + }) | ||
| 425 | App.PayOnline.CombineTransactionsByDeposit({ | 430 | App.PayOnline.CombineTransactionsByDeposit({ |
| 426 | id: this.data.paymentId, | 431 | id: this.data.paymentId, |
| 427 | - openid: this.data.options.timeline == '1' ? '' : getApp().openid, | 432 | + openid, |
| 428 | }).then(res => { | 433 | }).then(res => { |
| 429 | if (res.ret == 200) { | 434 | if (res.ret == 200) { |
| 430 | wx.requestPayment({ | 435 | wx.requestPayment({ |
| @@ -584,7 +589,7 @@ Page({ | @@ -584,7 +589,7 @@ Page({ | ||
| 584 | console.log('海报生成成功', this.data.imgSrc); | 589 | console.log('海报生成成功', this.data.imgSrc); |
| 585 | }, | 590 | }, |
| 586 | // 分享 | 591 | // 分享 |
| 587 | - sharesetting(timeline) { | 592 | + sharesetting() { |
| 588 | wx.reportMonitor('1017', 1) | 593 | wx.reportMonitor('1017', 1) |
| 589 | this.closeModal() | 594 | this.closeModal() |
| 590 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ | 595 | if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| @@ -598,10 +603,9 @@ Page({ | @@ -598,10 +603,9 @@ Page({ | ||
| 598 | }else{ | 603 | }else{ |
| 599 | let parmdata = { | 604 | let parmdata = { |
| 600 | id: this.id, | 605 | id: this.id, |
| 601 | - fromid: this.data.options.timeline == '1' ? '' : getApp().openid, | 606 | + fromid: getApp().openid, |
| 602 | hasInvitation: 1, | 607 | hasInvitation: 1, |
| 603 | - tplid: this.data.options.tplid, | ||
| 604 | - timeline | 608 | + tplid: this.data.options.tplid |
| 605 | } | 609 | } |
| 606 | if (this.data.options.uid) { | 610 | if (this.data.options.uid) { |
| 607 | parmdata.uid = this.data.options.uid; | 611 | parmdata.uid = this.data.options.uid; |
| @@ -52,10 +52,11 @@ Page({ | @@ -52,10 +52,11 @@ Page({ | ||
| 52 | }, | 52 | }, |
| 53 | // 创建邀请关系链 | 53 | // 创建邀请关系链 |
| 54 | setRelaOpenidFun() { | 54 | setRelaOpenidFun() { |
| 55 | - if (this.data.options && this.data.options.id && this.data.options.timeline!='1') { | 55 | + let openid = getApp().openid; |
| 56 | + if (this.data.options && this.data.options.id && openid) { | ||
| 56 | let obj = { | 57 | let obj = { |
| 57 | rid: this.data.options.id, | 58 | rid: this.data.options.id, |
| 58 | - openid: getApp().openid, | 59 | + openid, |
| 59 | uid: this.data.options.uid, | 60 | uid: this.data.options.uid, |
| 60 | fromid: this.data.options.fromid || '' | 61 | fromid: this.data.options.fromid || '' |
| 61 | } | 62 | } |
| @@ -183,7 +184,6 @@ Page({ | @@ -183,7 +184,6 @@ Page({ | ||
| 183 | url += (isOrder == '1' || reserev.status == '3') ? '&isOrder=1' : ''; | 184 | url += (isOrder == '1' || reserev.status == '3') ? '&isOrder=1' : ''; |
| 184 | url+= this.data.options.paymentId?'&paymentId='+this.data.options.paymentId:'&paymentId=' ; | 185 | url+= this.data.options.paymentId?'&paymentId='+this.data.options.paymentId:'&paymentId=' ; |
| 185 | if(data.type == '1') url+= '&uid='+this.data.options.uid | 186 | if(data.type == '1') url+= '&uid='+this.data.options.uid |
| 186 | - if(this.data.options.timeline == '1') url+= '&timeline=1' | ||
| 187 | console.log('跳转路径url', url); | 187 | console.log('跳转路径url', url); |
| 188 | wx.redirectTo({ | 188 | wx.redirectTo({ |
| 189 | url | 189 | url |
-
Please register or login to post a comment