微信安卓内,vue使用replace(url)不跳转或跳转到内置浏览器

上代码

let locationHref = ''
              if(this.orderType == 'refuel'){
                locationHref = `/bdh5std/common.html?fromPage=channelPay&gasOrderNo=${this.orderNo}&orderNo=${this.orderNo}&orderType=${this.orderType}&mobile=${this.mobile}&memberId=${this.memberId}&boToken=${this.token}&pcode=${this.pcode}&frontUrl=${this.frontUrl}#/pay`;
              }
              if(this.orderType == 'recharge'){
                locationHref = `/bdh5std/common.html?fromPage=channelPay&productName=${productName}&orderNo=${this.orderNo}&orderType=${this.orderType}&mobile=${this.mobile}&memberId=${this.memberId}&boToken=${this.token}&pcode=${this.pcode}&frontUrl=${this.frontUrl}#/pay`;
              }
              window.location.replace(locationHref);

在微信内打开,使用ios是可以正常跳转,但是在android内没有跳转

发现的原因是 frontUrl 参数用 127.0.0.1 和 localhost ,使用域名或者本地ip的方式就可以了

Guess you like

Origin blog.csdn.net/weixin_40918145/article/details/121262614