对于单页应用,ios系统获取签名的url是我们首次进入的地址,而安卓系统获取的是当前的url地址

    /router/index.js
    里边添加

    1. if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
    2. window.entryUrl = document.location.href
    3. }

    记录一下首次进入应用的url
    然后在付款页面
    /pay/aaa?order_id=xxxx
    判断,如果是苹果手机并且首次进入页面不是付款页面,就刷新这个付款页面就可以了。

    1. if (window.entryUrl.indexOf("/pay/ticket?order_no=") < 0) {
    2. window.location.href = "/pay/ticket?order_no=" + this.$route.query.order_no;
    3. }