Axios connection using Vue is partially normal, partially abnormal, server status code 200, server side console also does not report an error. But the page request is an error. If you use iPhone, the same error occurs when you switch to Huawei Android phone. Android phone does not know how to debug, but Safari browser of macOS can debug iPhone browser, but you do not know the cause. Just report an error, the server is not any problem. The error code is 200.




That is to say, my PC version of the browser zoom to mobile browser everything is fine, the real machine error, if it is SSL certificate and other interception, but in fact, some requests error and some requests do not error, generally error is the server to return a certain data page will be reported.

Switch to other PCS on the LAN to visit, many pages are normal, part of the page asynchronous request is not normal, all HTTP requests are unified in an AXIos tool package. Why do some report errors and others don’t? That’s weird.

But in my project development of the machine everything is normal! For example, regional data loading, the data is the data of the whole Yunnan Province, the request on my local machine is normal, but the network request is incorrect when accessed by other LAN browsers, and the console displays incomplete Encoding?

But the encoding is utF-8 exactly the same as the other requests and returns. My machine can also load normally, more bizarre is, packaged into production mode deployment to Ali cloud server is all normal, LAN cross-computer access is abnormal, not all abnormal, is so part of the interface is abnormal.




The code used is a default AXIOS wrapper from the Ant Design Vue Pro admin template. The code is as follows:




Java advanced Learning Materials, BAT interview questions, and Effective Java (3rd edition) are available in 2019. You can also add group: 712263501 to receive massive learning materials for learning.