This commit is contained in:
linfso 2025-06-20 10:40:59 +08:00
parent ff710d5f07
commit f9fcb8ee66

View File

@ -3,6 +3,8 @@
<!-- <OnlinePayJsApi v-if="isWx"></OnlinePayJsApi> -->
<!-- <OnlinePayQr v-else></OnlinePayQr> -->
<!-- <div v-if="!isWx">请在微信浏览器中打开此页面进行支付</div> -->
<div v-if="resultVisible">{{ errorMessage }}</div>
<div>
<el-form id="payPage" v-if="settleBillItem!=null" ref="form" :model="form" size="mini" label-width="80px">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
@ -148,9 +150,9 @@ export default {
};
},
created() {
const params = new URLSearchParams(window.location.search);
let code=params.get('code');
let state=params.get('code');
let code=this.$route.query.code;
let state=this.$route.query.state;
console.log("====>created==code=state=>",code,state);
if (code) {
this.requestPayment(code,state);
}else{
@ -273,12 +275,13 @@ export default {
state: state
})
.then(response => {
console.log("===>requestPayment==response=>",response.data);
this.loadingVisible = false;
if (response.data.code === 200) {
this.wechatPaymentParams = response.data.data;
if (response.code === 200) {
this.wechatPaymentParams = response.data;
this.invokeWechatPayment();
} else {
this.showPaymentResult(false, response.data.message || '获取支付参数失败');
this.showPaymentResult(false, response.message || '获取支付参数失败');
}
})
.catch(error => {