riku
2023-10-31 1f96f089eb3546c682313d29513be04ac72e2de5
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
28
29
30
31
32
33
import axios from 'axios';
import { setInterceptors } from "./config";
 
const url = 'http://47.100.191.150:9031/';
// const url = 'http://192.168.1.9:8080/';
const imgUrl = 'http://47.100.191.150:9031/images/';
 
//飞羽监管
const $clue = axios.create({
  baseURL: url,
  timeout: 10000
  // headers: addHeaders()
});
 
// function getHeaders() {
//   const token = 'e6dc8bb9e1ff0ce973fb92b4af2e4c3f';
 
//   const date = new Date();
//   const timestamp = parseInt(date.getTime() / 1000) - 200;
 
//   const sign = md5(timestamp + token);
 
//   return {
//     'JA-TIMESTAMP': timestamp,
//     'JA-SIGN': sign,
//     'JA-TOKEN': token
//   };
// }
 
//添加拦截器
setInterceptors($clue)
 
export { $clue, imgUrl };