Micro-channel payment completion vue page does not jump issue

Problems encountered after vue call micro-channel pay callback is successful, the page does not jump the route.

The solution is to use window.location.href

 

/ ** 
* @method pay the cost method
* @param data: the payment objects returned back, (micro details channel number pay public API to submit the payment H5);
* /
onBridgeReady (the params) {
var VM = the this;
WeixinJSBridge.invoke (
' getBrandWCPayRequest ', the params,
function (RES) {
// return the front end is determined using the above embodiment, the micro-channel groups seriously Tip: res.err_msg user will pay the ok after a successful return, but it does not guarantee absolutely reliable.
// IF (localStorage. the getItem ( 'activityId') == '. 4') {
// Alert (the JSON.stringify (RES));
//}
var TEMP = res.err_msg;
IF (temp.indexOf ( 'OK')> -. 1) {
router.push the this $ // ( '/ Payshare');.
window.location.href = "https://www.lnart.com/vipidea-subscribe/index.html#/payShare"
} the else {
Alert ( "payment failure")
}
// if(res.err_msg == "get_brand_wcpay_request:ok" ){
// this.$router.push('/payShare');
// this.addaddress();
// window.location.href = "https://www.lnart.com/vipidea-subscribe/index.html#/payShare"
// }else{
// this.$message({
// message: '支付失败',
// type: 'warning'
// });
// }
}
);
},
 

 

Guess you like

Origin www.cnblogs.com/wupeng88/p/11780338.html
Recommended