|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-07-08 11:46:30
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-07-12 14:47:21
|
|
|
|
|
* @LastEditTime: 2022-07-12 14:53:15
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -35,7 +35,8 @@ const ENV = process.env;
|
|
|
|
|
return {
|
|
|
|
|
payType : 'wxpay',
|
|
|
|
|
orderInfo : {},
|
|
|
|
|
payOrderNo : this.$route.query.payOrderNo
|
|
|
|
|
payOrderNo : this.$route.query.payOrderNo,
|
|
|
|
|
openId : localStorage.getItem('payOpenId'),
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed:{
|
|
|
|
@ -73,7 +74,7 @@ const ENV = process.env;
|
|
|
|
|
},
|
|
|
|
|
pay(){
|
|
|
|
|
if(this.payType === 'wxpay'){
|
|
|
|
|
if(localStorage.getItem('payOpenId') && WeixinJSBridge){
|
|
|
|
|
if(this.openId && WeixinJSBridge){
|
|
|
|
|
this.wxJsapiPay()
|
|
|
|
|
}else{
|
|
|
|
|
this.wxH5Pay();
|
|
|
|
@ -131,6 +132,7 @@ const ENV = process.env;
|
|
|
|
|
const {error, result} = await ApiPostH5Pay({
|
|
|
|
|
payOrderNo : this.orderInfo.payOrderNo,
|
|
|
|
|
payCode,
|
|
|
|
|
channelUser : payCode === 'WX_JSAPI' ? this.openId : null,
|
|
|
|
|
appCode : this.orderInfo.prepayAliApp.prepayAppCode
|
|
|
|
|
});
|
|
|
|
|
if(error){
|
|
|
|
|