according to the official idea, I designed my own session, to save the sessionId locally, but if I set the session of the server for a short time, it is equivalent to checking with the server whether there is a current session for every subsequent request. How to reduce the amount of code for this check here in front of WeChat Mini Programs. I don"t know how to write
is equivalent to doing a check operation before each wx.request to see if there is any session, in the current server. If there is such a normal request, if not, you have to log in again. I have serious code duplication now