WeChat Mini Programs maintains the problem of expiration of 3rd_session

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

Mar.04,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7be473-1f5db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7be473-1f5db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?