1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| import axios from 'axios';
| import { setInterceptors } from './config';
|
|
|
|
| const url = 'http://localhost:8081/';
| // 部署
| // const url = 'http://114.215.109.124:8803/';
|
| //飞羽监管
| const $http = axios.create({
| baseURL: url,
| timeout: 10000
| });
|
| /* Python后台 */
|
| const url_py = 'http://127.0.0.1:8089/'
| const $http_py = axios.create({
| baseURL: url_py,
| timeout: 10000
| });
| //添加拦截器
| setInterceptors($http,$http_py);
|
| export { $http,$http_py};
|
|