From 092148e6f69877bb4a638e9c0ae585e036c7b9c1 Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Fri, 5 Mar 2021 13:48:22 +0800 Subject: [PATCH] 赤峰测试环境 农行支付 --- src/components/orderPay.vue | 10 ++++++---- src/components/payResult.vue | 39 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/components/orderPay.vue b/src/components/orderPay.vue index bd16828..87d9ab5 100644 --- a/src/components/orderPay.vue +++ b/src/components/orderPay.vue @@ -164,7 +164,7 @@ export default { tokenId:_token, //商户传过来的tokenId paySystem:"", //商户传过来的paySystem, 没有则传空字符串 payType:"1111", //商户传过来的payType,没有则传'1111' - webviewURL:"", //商户传过来的回跳地址 + webviewURL:"https://wxgzh.renniting.cn/wechatwuxi/Chifeng/TEST/sweeping_payment/codepay/index.html#/payResult", //商户传过来的回跳地址 remark:"其他参数", //扩展备用 showProgress:'NO', backBehavior:'back' @@ -179,7 +179,7 @@ export default { } }else{ - alert('请重新扫码') + alert('支付失败') } @@ -211,10 +211,10 @@ export default { if (res.code == 0) { me.vxPay(res.data, this.orderId) } else if (res.code == 40163) { //code been used, hints[重复code问题] - alert(res.message) + alert('请重新扫码') console.log(res.message); } else { - alert(res.message) + alert('请重新扫码') } }) @@ -260,6 +260,7 @@ export default { }) }, onBridgeReady(params) { + let me = this console.log('调用微信支付WeixinJSBridge') WeixinJSBridge.invoke( 'getBrandWCPayRequest', params, @@ -280,6 +281,7 @@ export default { } else { console.log('失败') alert('支付失败') + me.$router.go(-2); } } ) diff --git a/src/components/payResult.vue b/src/components/payResult.vue index e4db686..b7a56ce 100644 --- a/src/components/payResult.vue +++ b/src/components/payResult.vue @@ -4,6 +4,8 @@
{{payMsg}}
+ +
关闭
@@ -19,15 +21,25 @@ export default { return { resultBG: '', payMsg: '支付成功', - orderId:'' + orderId:'', + isShow:false } }, created(){ // console.log(this.$route.query.ID) this.resultBG = oKBg - this.orderId = localStorage.getItem("OrderNum") - this.queryBankOrderState() + + if(window.navigator.userAgent.indexOf('Bankabc/Portal') > -1) { + // alert('当前页面在新容器'); + this.isShow = true + } else { + // alert('当前页面在旧容器'); + + } + + // this.orderId = localStorage.getItem("OrderNum") + // this.queryBankOrderState() // alert(window.location.href) // alert(this.$router.query.ID) }, @@ -51,6 +63,16 @@ export default { } }) + }, + closePage:function () { + if(window.navigator.userAgent.indexOf('Bankabc/Portal') > -1) { + // alert('当前页面在新容器'); + AlipayJSBridge.call('abcExitWebAndBackToHome'); + } else { + // alert('当前页面在旧容器'); + // 旧支付方式 + + } } } @@ -70,6 +92,17 @@ export default { background-position: center 0; background-size: 100% 100%; } + .close{ + width: 80%; + margin: 20px auto; + height: 40px; + line-height: 40px; + color: #fff; + text-align: center; + background: #0564cc; + border-radius: 5px; + cursor: pointer; + } -- libgit2 0.21.4