riku
2023-10-31 2d3d56ff801b73afdb779267004d740f9beafe57
src/api/index.js
@@ -0,0 +1,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 };