mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 10:49:36 +08:00
描述:微信支付
This commit is contained in:
parent
1dd20a0380
commit
b5b4a18eae
@ -10,3 +10,12 @@ export function wxPaySignRq(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 查询订单状态
|
||||
export function wxMerchantOrderQueryRq(data) {
|
||||
return request({
|
||||
url: '/meeting/wxPay/wxMerchantOrderQuery',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -6,7 +6,8 @@ import {
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
import {
|
||||
wxPaySignRq
|
||||
wxPaySignRq,
|
||||
wxMerchantOrderQueryRq
|
||||
} from "../../../../api/pay/pay.js"
|
||||
|
||||
Page({
|
||||
@ -98,6 +99,7 @@ Page({
|
||||
|
||||
// 唤起支付
|
||||
callPay(data) {
|
||||
let _this = this;
|
||||
wx.requestPayment({
|
||||
timeStamp: data.timeStamp,
|
||||
nonceStr: data.nonceStr,
|
||||
@ -105,15 +107,41 @@ Page({
|
||||
signType: data.signType,
|
||||
paySign: data.paySign,
|
||||
success(res) {
|
||||
console.log('success' ,res );
|
||||
console.log('success', res);
|
||||
|
||||
},
|
||||
fail(res) {
|
||||
console.log('fail' ,res );
|
||||
console.log('fail', res);
|
||||
|
||||
},
|
||||
complete(res) {
|
||||
console.log('complete' , res);
|
||||
console.log('complete', res);
|
||||
// 查询订单详情
|
||||
_this.wxMerchantOrderQuery()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询订单详情
|
||||
wxMerchantOrderQuery() {
|
||||
let _this = this
|
||||
wxMerchantOrderQueryRq({
|
||||
outTradeNo: _this.data.detail.oderNumber
|
||||
}).then(res => {
|
||||
console.log('wxMerchantOrderQuery', res);
|
||||
if (res.code == '200') {
|
||||
Notify({
|
||||
type: 'primary',
|
||||
message: res.msg
|
||||
});
|
||||
wx.reLaunch({
|
||||
url: '/pages/meeting/pay/waitComplete/waitComplete',
|
||||
})
|
||||
} else {
|
||||
Notify({
|
||||
type: 'warning',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user