riku
2025-04-25 4a836815f12e8ba717702cc8ed431e1b4f96134c
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import axios from 'axios';
import { setInterceptors } from "./config";
 
const debug = false;
 
// let url1 = 'http://47.100.191.150:9031/';
// let url1_file = 'http://47.100.191.150:9031';
let url1 = 'https://fyami.com.cn:448/';
let url1_file = 'https://fyami.com.cn:448/';
let url2 = 'http://47.100.191.150:9005/';
let url2_file = 'http://47.100.191.150:9005/';
 
if (debug) {
  url1 = 'http://192.168.0.110:8084/';
  url1_file = 'http://192.168.0.110:8084/';
  // url2 = 'http://192.168.0.110:9001/';
  // url2_file = 'http://192.168.0.138:8080/';
}
 
//飞羽监管
const $clue = axios.create({
  baseURL: url1,
  timeout: 20000
  // headers: addHeaders()
});
$clue.imgUrl = `${url1_file}images/`;
 
//飞羽监管
const $fysp = axios.create({
  baseURL: url2,
  timeout: 20000
});
$fysp.imgUrl = `${url2_file}images/`;
$fysp.downloadUrl = `${url2_file}files/`;
 
// 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)
setInterceptors($fysp)
 
export { $clue, $fysp };