apiList.js 1.21 KB
/*
 * @Author: your name
 * @Date: 2021-11-11 11:47:02
 * @LastEditTime: 2021-11-11 12:13:31
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /fanxing_new/src/api/apiList.js
 */
import map from "./map";
import login from "./login";
import task from "./task";
import show from "./show";
import search from "./search";
import device from "./device";
import resource from "./resource";
import codes from "./codes";
import ops from "./ops";
// import {config} from '../../public/js/config.js'
import baseurl from './baseUrl'
let wsIP = "";
let flvIP = "";
switch (process.env.NODE_ENV) {
  case "development":
    wsIP = window.config.https?"192.168.9.227":"192.168.9.233:20080"; // 测试环境url
    flvIP = window.config.https?"192.168.9.233":"192.168.9.233";
    break;
  case "pre":
    wsIP = ""; // 预上线环境url
    break;
  case "production":
    wsIP = location.host; // 生产环境url
    // flvIP = "192.168.9.245" + ":8080"
    flvIP = location.hostname 
    break;
}
export default {
  map,
  login,
  task,
  show,
  search,
  device,
  resource,
  codes,
  ops,
  wsIP,
  flvIP,
  baseurl
};