今天遇到一个bug,上网查了原来是我的地址少了个/
Failed to load http://data.geekpark.net/api/v1/industrial-tag: Response for preflight is invalid (redirect)
Company.vue?cea2:229 Error: Network Error
at createError (createError.js?8e8c:16)
at XMLHttpRequest.handleError (xhr.js?21f6:87)
复制代码
There maybe several possible reasons you are getting this error. ● As @toomuchdesign mentioned a possible reason why is because you might need to make a request through https instead of http. ● Try appending a / to the url. 'http://localhost:8080/user/login/' instead of 'http://localhost:8080/user/login'. As it could be redirecting from a preflight/OPTIONSrequest.