|
|
|
@ -10,13 +10,16 @@ |
|
|
|
timesIndex: 0, |
|
|
|
userInfo: {}, |
|
|
|
payErr: {}, |
|
|
|
paySuccecc: {} |
|
|
|
paySuccecc: {}, |
|
|
|
count: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow(e) { |
|
|
|
// this.order_id = uni.getStorageSync('order_id') |
|
|
|
let that = this |
|
|
|
uni.$once('order_id',function(data){ |
|
|
|
let that = this; |
|
|
|
that.count++; |
|
|
|
if(that.count == 1) { |
|
|
|
uni.$on('order_id',function(data){ |
|
|
|
that.order_id = data.msg |
|
|
|
if (that.order_id) { |
|
|
|
that.getUserProfile() |
|
|
|
@ -24,7 +27,10 @@ |
|
|
|
that.$msg('获取订单失败'); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
onUnload() { |
|
|
|
uni.$off('order_id'); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取用户信息 |
|
|
|
@ -78,13 +84,6 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: (err) => { |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: JSON.stringify(err), |
|
|
|
confirmColor: '#1998FE', |
|
|
|
showCancel: false, |
|
|
|
success(res2) { |
|
|
|
if (res2.confirm) { |
|
|
|
wx.navigateBackMiniProgram({ |
|
|
|
extraData: { |
|
|
|
backPayState: false, |
|
|
|
@ -92,15 +91,13 @@ |
|
|
|
}, |
|
|
|
success(res) {} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}) |
|
|
|
}).catch(err => { |
|
|
|
let that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: JSON.stringify(err), |
|
|
|
content: '支付订单失败', |
|
|
|
showCancel: false, |
|
|
|
confirmColor: '#1998FE', |
|
|
|
success(res2) { |
|
|
|
|