After switching to axios, I found that the cookie was not automatically carried in the request sent (jQuery would bring it itself), like this
Because the backend needs to use cookies I have made some judgments, but I have never found a way to automatically (manually do) carry cookies in axios. Ask the experienced driver to lead the way. (ps: I saw someone talking about the axios.defaults.withCredentials = true configuration before, but it didn’t work after trying it)
I found the reason. It's not that axios doesn't work, but the cookie path problem. As follows:
The previous cookie has been saved as early as /m, but there is no /m when requesting
So there is no cookie in the header of the request. If you want to use the cookie, you must write it at the same level. Set the path when writing the cookie, and the problem will be solved.