Cannot read property 'protocol' of undefined的原因和解决办法

Cannot read property 'protocol' of undefined

原因:axios请求中的错误

1.请求地址写错了

2.没有引入http.js

3.引入http.js的时候,单词拼错了,例如,$axios.get(httpUrl.getUser) // getUsers少写个s等

原文地址:https://www.cnblogs.com/luguankun/p/10301712.html