| | |
| | | import axios from 'axios'; |
| | | |
| | | // 生产环境和开发环境切换请求地址 |
| | | let baseURL = 'http://localhost:8100/bl/'; |
| | | let baseURL = 'http://localhost:8101/bl_plus/'; |
| | | if (process.env.NODE_ENV === 'production') { |
| | | baseURL = location.protocol + '//' + location.host + '/bl/'; |
| | | baseURL = location.protocol + '//' + location.host + '/bl_plus/'; |
| | | } |
| | | |
| | | // create an axios instance |
| | |
| | | * You can also judge the status by HTTP Status Code |
| | | */ |
| | | response => { |
| | | if (response.config && response.config.fullRes) { |
| | | return response; |
| | | } |
| | | return response.data; |
| | | }, |
| | | error => { |