Vue is in hash mode. Does Wechat jssdk need to re-verify permissions as long as the anchor link changes?

now Wechat"s official account is being developed, using router"s hash mode for vue, routing. In the process of developing vue, there is always a problem of signature failure in jssdk permission verification. Is it necessary to re-obtain a signature for verification every time the path changes, such as the link change in the following figure


Wechat JS-SDK signature algorithm it is mentioned that the latter part of -sharp is not included.

signature generation rules are as follows: the fields participating in the signature include noncestr (random string) and valid jsapi_ticket, timestamp (timestamp), url (the URL, of the current web page does not contain-sharp and its following parts). After sorting all the parameters to be signed according to the ASCII code of the field name from smallest to largest (dictionary order), use the format of the URL key-value pair (that is, key1=value1&key2=value2. Concatenated into the string string1 It is important to note that all parameter names are lowercase characters. The string1 is encrypted by sha1. The field name and field value are all original values, and no URL escape is performed.

there is a verification tool available, which is mentioned here:

Note: for URL without only domain names and no path, browsers will automatically add / as path,. If you open http://qq.com, the URL you get is http://qq.com/).
Menu