调整配置项支付
This commit is contained in:
@@ -199,71 +199,72 @@ export default {
|
||||
return;
|
||||
},
|
||||
// 微信支付鉴权
|
||||
wxPayConfig() {
|
||||
wxConfig({
|
||||
url: window.location.href,
|
||||
jsApiList: ['chooseWXPay']
|
||||
}).then(res => {
|
||||
let payConfig = JSON.parse(res);
|
||||
let jweixin = require('jweixin-module');
|
||||
jweixin.ready(() => {
|
||||
// res
|
||||
});
|
||||
jweixin.error(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
jweixin.config({ ...payConfig });
|
||||
vipOrder(this.identitie[this.tabsIndex].identity_id, {
|
||||
year: this.sumNumber
|
||||
}).then(payId => {
|
||||
this.wechatPay(payId.id, jweixin);
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
wxPayConfig() {
|
||||
console.log('微信支付')
|
||||
// wxConfig({
|
||||
// url: window.location.href,
|
||||
// jsApiList: ['chooseWXPay']
|
||||
// }).then(res => {
|
||||
// let payConfig = JSON.parse(res);
|
||||
// let jweixin = require('jweixin-module');
|
||||
// jweixin.ready(() => {
|
||||
// // res
|
||||
// });
|
||||
// jweixin.error(err => {
|
||||
// uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none'
|
||||
// });
|
||||
// });
|
||||
// jweixin.config({ ...payConfig });
|
||||
// vipOrder(this.identitie[this.tabsIndex].identity_id, {
|
||||
// year: this.sumNumber
|
||||
// }).then(payId => {
|
||||
// this.wechatPay(payId.id, jweixin);
|
||||
// }).catch(err => {
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon: 'none'
|
||||
// });
|
||||
// });
|
||||
// }).catch(err => {
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon: 'none'
|
||||
// });
|
||||
// });
|
||||
},
|
||||
|
||||
// 微信支付
|
||||
wechatPay(id, wx) {
|
||||
vipWechatPay(id, {
|
||||
openid: this.$store.getters.getCode
|
||||
}).then(payConfig => {
|
||||
wx.chooseWXPay({...payConfig,
|
||||
success() {
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '支付成功,恭喜您成功开通',
|
||||
showCancel:false,
|
||||
confirmColor: '#8b64fd',
|
||||
success : ()=> {
|
||||
this.$Router.back()
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: '支付被取消',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
// vipWechatPay(id, {
|
||||
// openid: this.$store.getters.getCode
|
||||
// }).then(payConfig => {
|
||||
// wx.chooseWXPay({...payConfig,
|
||||
// success() {
|
||||
// uni.showModal({
|
||||
// title : '提示',
|
||||
// content : '支付成功,恭喜您成功开通',
|
||||
// showCancel:false,
|
||||
// confirmColor: '#8b64fd',
|
||||
// success : ()=> {
|
||||
// this.$Router.back()
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// fail(err) {
|
||||
// uni.showToast({
|
||||
// title: '支付被取消',
|
||||
// icon : 'none'
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// }).catch(err => {
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon : 'none'
|
||||
// })
|
||||
// })
|
||||
},
|
||||
|
||||
// 勾选协议
|
||||
|
||||
Reference in New Issue
Block a user