Commit a4ce2481 authored by zhengke's avatar zhengke

no message

parent 337412c8
......@@ -51,7 +51,7 @@ export default {
};
},
created() {
console.log(wx)
},
wacth:{
payInfo: {
......@@ -106,33 +106,33 @@ export default {
},
// 微信支付
wxPay(payData) {
console.log(payData,'----payData')
let that = this
uni.showLoading({
title:'支付中...'
})
uni.requestPayment({
provider: 'wxpay',
wx.requestPayment(
{
"timeStamp": payData.timeStamp, //时间戳,自1970年以来的秒数
"nonceStr": payData.nonceStr, //随机串
"package": payData.package,
"signType": payData.signType, //微信签名方式:
"paySign": payData.paySign, //微信签名
success: function(res) {
if(that.payInfo.successType==1){
uni.navigateTo({
url: '/pages/reserve/offline-success?payInfo='+JSON.stringify(that.payInfo)
});
}else{
uni.navigateTo({
url: '/pages/order-submit/pay-success?payInfo='+JSON.stringify(that.payInfo)
});
}
'success':function(res){
uni.showLoading({
title:JSON.stringify(res)
})
uni.navigateTo({
url: '/pages/reserve/offline-success?payInfo='+JSON.stringify(that.payInfo)
});
},
fail: function(err) {
console.log('fail:', err);
}
});
'fail':function(res){
uni.showLoading({
title:JSON.stringify(res)
})
},
'complete':function(res){}
})
},
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment