Invalid signature error will be reported in ios, but it will be fine in Android, and it will be fine in WeChat developer tools
I tried to do wx.ready in create beforecreate mounted but always reported invalid signature. After closing this alert, the WeChat interface can be used. If encodeURIcomponent directly reports an error when calling the background interface, the background interface log parameters will also be in the style after encoding when the front end is not encoded. Please tell me what causes this.
Regarding WeChat signature errors, please refer to the official documentation, analyze the specific problems in detail, and check carefully according to the steps.
Then regarding initializing WeChat, if a single component is used, it is declared in
mounted
, or it can be declared globally inmain.js
.Paste the general code I extracted: