摘要: axios.interceptors.request.use(function (config) { // 在发送请求之前做些什么 return config; }, function (error) { // 对请求错误做些什么 return Promise.reject(error); }); 阅读全文
posted @ 2019-07-17 20:39 一只大鹅 阅读(258) 评论(0) 推荐(0) 编辑
摘要: axios.defaults.baseURL='http://localhost:8888/api/private/*' 阅读全文
posted @ 2019-07-17 20:28 一只大鹅 阅读(561) 评论(0) 推荐(0) 编辑
摘要: vue.prototype.$http = axios 使用 this.$http 阅读全文
posted @ 2019-07-17 20:25 一只大鹅 阅读(587) 评论(0) 推荐(0) 编辑