水滴兑换模块开发完成
This commit is contained in:
@@ -24,6 +24,9 @@ Page({
|
||||
* 确认支付
|
||||
*/
|
||||
payBtn() {
|
||||
this.setData({
|
||||
disabled: false
|
||||
})
|
||||
wx.showLoading({
|
||||
title: '支付中...',
|
||||
mask : true
|
||||
@@ -31,9 +34,6 @@ Page({
|
||||
let that = this
|
||||
wx.$api.mall.mallPay(this.data.orderNo,{type: 'miniapp', openid: wx.getStorageSync("openid")}).then(res=>{
|
||||
wx.hideLoading()
|
||||
this.setData({
|
||||
disabled: false
|
||||
})
|
||||
let payInfo = JSON.parse(res.data.wechat)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
@@ -51,7 +51,8 @@ Page({
|
||||
mask:true,
|
||||
success: function () {
|
||||
that.setData({
|
||||
paySuccess: true
|
||||
paySuccess: true,
|
||||
disabled: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
@@ -71,7 +72,8 @@ Page({
|
||||
mask:true,
|
||||
success: function () {
|
||||
that.setData({
|
||||
paySuccess: true
|
||||
paySuccess: true,
|
||||
disabled: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
@@ -82,6 +84,10 @@ Page({
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(err => {});
|
||||
}).catch(err => {
|
||||
that.setData({
|
||||
disabled: true
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user