//h5支付
htmlWechatPay(code){
OrderApi.createHTMLOrder(code).then(res => {
this.loadingShow = true
if (res.data.status == 1) {
this.loadingShow = false
let url_ = window.location.href+'&payhtml=1&orderCode='+code
window.location.replace(res.data.data+'&redirect_url='+escape(url_))
}else{
this.loadingShow = false
this.$router.replace({
path:'/user-payno',
query: {id:code}
})
}
})
}
需要注意的是
image.png
&redirect_url=后面的url需要编码,但是重点来了 经过多次试验 只能使用escape对url进行编码!!!!
网友评论