Config:invalid signature reported an error in IOS, Android succeeded.

Why does working in Android fail in IOS?

appId: process.env.APPID, // 
timestamp: timestamp, // 
nonceStr: nonceStr, // nonceStr
signature: createSignature(timestamp, nonceStr), // 
jsApiList: ["getLocation", "scanQRCode", "closeWindow"] // JS
scanQRCodeView() {
      var _this = this;
      //
      weChatReady().then(() => {
        scanQRCode()
          .then(res => {
            console.log(res, "&&&&&&&&&");
            if (res.data.projectId && res.data.spaceId) {
              console.log("");
              let samaoMatch = {
                projectId: res.data.projectId,
                spaceId: res.data.spaceId
              };
              console.log(res.data.projectId, "res.data.projectId");
              console.log(this, "UUUUUUUUUUUUUUUUUUUU");
              console.log(_this, "PPPPPPPPPPPPPPPPPPP");
              _this.$emit("scanMathc", samaoMatch);
            } else {
              Toast("");
              return; //
            }
          })
          .catch(err => {
            Toast("");
            console.error(err);
          });
      });
Apr.02,2021

because you are using vue single-page spa, in terms of single-page spa, the history of vue in iOS will always be the link address entered for the first time.
and the authorization here will have a process of obtaining openId, so there will be the problem of authorization failure in iOS.
solution:

vuexiOS
let url = /(Android)/i.test(navigator.userAgent) ? location.href.split('-sharp')[0] : process.env.BASE_URL + process.env.AUTHO_URI + '?code=' + tools.getStorage('code') + '&state=' + encodeURIComponent(tools.getStorage('state'));
Menu