| | |
| | | Vue.use(qs); |
| | | Vue.use(api); |
| | | |
| | | const javaApi = 'http://192.168.110.167:8001/' |
| | | const javaApi = 'http://localhost:8001' |
| | | |
| | | // const javaApi = 'http://127.0.0.1:8001/' |
| | | |
| | | |
| | | |
| | | axios.defaults.baseURL = javaApi |
| | | axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' |
| | |
| | | // console.log(config.data) |
| | | } |
| | | |
| | | |
| | | return config |
| | | }, function(error) { |
| | | return Promise.reject(error) |
| | | }) |
| | | |
| | | axios.interceptors.response.use(res => { |
| | | if(res.config.responseType === 'blob'){ |
| | | return res; |
| | | } |
| | | return res.data |
| | | }, async function(err) { |
| | | if (JSON.stringify(err).indexOf('timeout of') > -1) { |