调整区块链电商App兼容优化

This commit is contained in:
唐明明
2021-10-15 15:58:04 +08:00
parent 5c5e110a27
commit 440ce824d8
39 changed files with 7742 additions and 9194 deletions

View File

@@ -232,90 +232,13 @@
});
return;
}
if (can.on_line) {
// #ifdef H5
this.wxPayH5Config()
// #endif
//#ifdef APP-PLUS
this.wxPayAppConfig()
//#endif
if (can.on_line) {
console.log("微信pay")
} else {
this.canClick()
}
return;
},
// 微信支付鉴权H5
wxPayH5Config() {
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.wechatH5Pay(payId.id, jweixin);
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 微信支付 H5
wechatH5Pay(id, wx) {
vipWechatPay(id, {
type:'mp',
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'
})
})
},
// 支付创建订单APP
wxPayAppConfig(){
let data = {year:1}