关于微信内支付成功后部分用户无法跳转到结果页
我们每天大概有300个支付成功的订单,但是经常能收到大概5个用户的投诉,投诉说:“支付成功后无法跳转到支付成功的界面”,有没有大神遇到过这种问题?该怎么解决? [代码]<script type=[代码][代码]"text/javascript"[代码][代码]>[代码][代码] [代码][代码]//防止微信不跳转,定时刷新支付状态[代码][代码] [代码][代码]$(document).ready([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]setInterval([代码][代码]"ajaxstatus()"[代码][代码], 3000);[代码][代码] [代码][代码]});[代码][代码] [代码][代码]//调用微信JS api 支付[代码][代码] [代码][代码]function[代码] [代码]jsApiCall()[代码][代码] [代码][代码]{[代码][代码] [代码][代码]WeixinJSBridge.invoke([代码][代码] [代码][代码]'getBrandWCPayRequest'[代码][代码],[代码][代码] [代码][代码]{$jsApiParameters},[代码][代码] [代码][代码]function[代码][代码](res){[代码][代码] [代码][代码]WeixinJSBridge.log(res.err_msg);[代码][代码] [代码][代码]if[代码][代码](res.err_msg==[代码][代码]'get_brand_wcpay_request:ok'[代码][代码]){[代码][代码] [代码][代码]$([代码][代码]"#bt1"[代码][代码]).hide();[代码][代码] [代码][代码]$([代码][代码]"#bt2"[代码][代码]).show();[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]location.href=[代码][代码]'{$pay_result}'[代码][代码]; [代码][代码]//跳转到结果页[代码][代码] [代码][代码]}, 1000);[代码][代码] [代码][代码]}[代码][代码]else[代码][代码]{[代码][代码] [代码][代码]$.get([代码][代码]"/index/newpayapp/pay_verification/oid/{$order_info.oid}"[代码][代码],[代码][代码]function[代码][代码](data,status){[代码][代码] [代码][代码]var[代码] [代码]datas = eval([代码][代码]"("[代码][代码]+data+[代码][代码]")"[代码][代码]);[代码][代码] [代码][代码]if[代码][代码](datas.res==[代码][代码]'success'[代码][代码]){[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码][代码](){[代码][代码] [代码][代码]location.href=[代码][代码]'{$pay_result}'[代码][代码];[代码][代码] [代码][代码]},1500)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}); [代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]);[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]function[代码] [代码]callpay()[代码][代码] [代码][代码]{[代码][代码] [代码][代码]if[代码] [代码]([代码][代码]typeof[代码] [代码]WeixinJSBridge == [代码][代码]"undefined"[代码][代码]){[代码][代码] [代码][代码]if[代码][代码]( document.addEventListener ){[代码][代码] [代码][代码]document.addEventListener([代码][代码]'WeixinJSBridgeReady'[代码][代码], jsApiCall, [代码][代码]false[代码][代码]);[代码][代码] [代码][代码]}[代码][代码]else[代码] [代码]if[代码] [代码](document.attachEvent){[代码][代码] [代码][代码]document.attachEvent([代码][代码]'WeixinJSBridgeReady'[代码][代码], jsApiCall);[代码][代码] [代码][代码]document.attachEvent([代码][代码]'onWeixinJSBridgeReady'[代码][代码], jsApiCall);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码]else[代码][代码]{[代码][代码] [代码][代码]jsApiCall();[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]function[代码] [代码]ajaxstatus(){[代码][代码] [代码][代码]$.get([代码][代码]"/index/newpayapp/pay_verification/oid/{$order_info.oid}"[代码][代码],[代码][代码]function[代码][代码](data,status){[代码][代码] [代码][代码]var[代码] [代码]datas = eval([代码][代码]"("[代码][代码]+data+[代码][代码]")"[代码][代码]);[代码][代码] [代码][代码]if[代码][代码](datas.res==[代码][代码]'success'[代码][代码]){[代码][代码] [代码][代码]$([代码][代码]"#btn2"[代码][代码]).show();[代码][代码] [代码][代码]$([代码][代码]"#btn1"[代码][代码]).hide(); [代码][代码]//手动点击按钮,跳转到结果页[代码][代码] [代码][代码]}[代码][代码]else[代码][代码]{[代码][代码] [代码][代码]$([代码][代码]"#btn1"[代码][代码]).show();[代码][代码] [代码][代码]$([代码][代码]"#btn2"[代码][代码]).hide();[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}[代码] [代码]function[代码] [代码]go_result(){[代码][代码] [代码][代码]window.location.href=[代码][代码]'{$pay_result}'[代码][代码];[代码][代码]}[代码][代码]</script>[代码]