Mini Program's token question is to help me see if there is anything wrong with this train of thought. There is still bug on the real machine.

my requirement is third-party login, not the authorized login brought by WeChat Mini Programs

1. After entering the user name and password, the user clicks to log in. The backend returns token. I have stored
2 in the cache. I globally encapsulated a post request method
3. Every time I want to communicate with the backend, I send the token back for verification
4. The backend returns a status code 40101 indicating that the login page should be prompted to log in again
when the token fails. There is no problem in the Wechat development tool test

.

but there will be problems on the real machine
questions are as follows:

clipboard.png
is there something wrong with me here?

Mar.23,2021

looks like the real machine cannot access the API, such as not in a local area network or the domain name is not resolved.

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-1e5b308-45624.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-1e5b308-45624.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?