Loading…

Obtain JS-SDK usage permission signature

```javascript WXAPI.jssdkSign(url) ``` + url current url address, which can be obtained through location.href You can refer to the following tutorial: [https://www.yuque.com/apifm/doc/dtpdvw](https://www.yuque.com/apifm/doc/dtpdvw) Note: Sometimes it is found that the Android phone has no problem, but the Apple phone will have a signature error (usually in single-page applications such as Vue, the jump page does not reload the page but uses local routing) The reason is: **In the iOS system, the authorized address must use the address when it is first opened. Addresses changed midway will not be recognized.** So please be sure to use the URL address that you opened the webpage for the first time for encryption. ```json { "code": 0, "data": { "appid": "wx54714e318e3b405c", "noncestr": "027148581682335548857852224894", "sign": "198526b8225b63db03d5e5f9761592c8701d4066", "timestamp": 1685238732 }, "msg": "success" } ```