Commit ab1be31064d0c778e7f43741932ba00bf7d14f80

Authored by pengye
1 parent a5c80e2e

邀请函分享到朋友圈,因获取不到openid报错不显示页面问题处理2

... ... @@ -172,7 +172,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -418,9 +418,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -579,7 +584,7 @@ Page({
console.log('海报生成成功', this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if (this.data.options.isOrder == '1' && this.data.detail.status != '4') {
... ... @@ -593,10 +598,9 @@ Page({
} else {
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -200,7 +200,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -436,9 +436,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -596,7 +601,7 @@ Page({
console.log('海报生成成功', this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if (this.data.options.isOrder == '1' && this.data.detail.status != '4') {
... ... @@ -610,10 +615,9 @@ Page({
} else {
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -208,7 +208,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -444,9 +444,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -605,7 +610,7 @@ Page({
console.log('海报生成成功', this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if (this.data.options.isOrder == '1' && this.data.detail.status != '4') {
... ... @@ -619,10 +624,9 @@ Page({
} else {
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -169,7 +169,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -403,9 +403,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -565,7 +570,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -579,10 +584,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -169,7 +169,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -403,9 +403,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -565,7 +570,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -579,10 +584,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -169,7 +169,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -403,9 +403,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -565,7 +570,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -579,10 +584,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -168,7 +168,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -402,9 +402,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -564,7 +569,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -578,10 +583,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -164,7 +164,7 @@ Page({
return this.sharesetting();
},
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -357,9 +357,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -518,7 +523,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -532,10 +537,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -169,7 +169,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -403,9 +403,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -565,7 +570,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -579,10 +584,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -169,7 +169,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -402,9 +402,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -564,7 +569,7 @@ Page({
console.log('海报生成成功',this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -578,10 +583,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -186,7 +186,7 @@ Page({
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting('1');
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
... ... @@ -422,9 +422,14 @@ Page({
// 点击支付定金
paymentFun() {
let that = this;
let openid = getApp().openid;
if (!openid) return wx.showToast({
title: '请在小程序中支付订金!',
icon: 'none',
})
App.PayOnline.CombineTransactionsByDeposit({
id: this.data.paymentId,
openid: this.data.options.timeline == '1' ? '' : getApp().openid,
openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
... ... @@ -584,7 +589,7 @@ Page({
console.log('海报生成成功', this.data.imgSrc);
},
// 分享
sharesetting(timeline) {
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
... ... @@ -598,10 +603,9 @@ Page({
}else{
let parmdata = {
id: this.id,
fromid: this.data.options.timeline == '1' ? '' : getApp().openid,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
timeline
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
... ...
... ... @@ -52,10 +52,11 @@ Page({
},
// 创建邀请关系链
setRelaOpenidFun() {
if (this.data.options && this.data.options.id && this.data.options.timeline!='1') {
let openid = getApp().openid;
if (this.data.options && this.data.options.id && openid) {
let obj = {
rid: this.data.options.id,
openid: getApp().openid,
openid,
uid: this.data.options.uid,
fromid: this.data.options.fromid || ''
}
... ... @@ -183,7 +184,6 @@ Page({
url += (isOrder == '1' || reserev.status == '3') ? '&isOrder=1' : '';
url+= this.data.options.paymentId?'&paymentId='+this.data.options.paymentId:'&paymentId=' ;
if(data.type == '1') url+= '&uid='+this.data.options.uid
if(this.data.options.timeline == '1') url+= '&timeline=1'
console.log('跳转路径url', url);
wx.redirectTo({
url
... ...