The project is divided into three parts.
The links corresponding to the buttons before modification are/parent,/teacher and/master respectively. Judge whether the user has an identity, and then decide whether to enter the home page or login page.
The links corresponding to the modified buttons are/parent/home page,/teacher/home page,/owner/home page. Whether the user has an identity, go to the home page first, and then judge whether the user has an identity to stay on the home page or login page.
After modifying the button link, an unknown user reported the wrong signature on the home page, and found that the home page called WeChat configuration once, and the login page called it again (every time there was a request for signature verification, and wx.config was configured). The login page returned a home page call request, resulting in a signature error.
Then, if there is a user identity, configure wx.config on the home page; Without user identity, wait for the page to jump from the home page to the login page, and configure wx.config on the login page.
Important: No matter how the page jumps, WeChat configuration is only configured once, that is, wx.config only needs to be configured once.