apiList.js
956 Bytes
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
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:20070":"192.168.9.233:20080"; // 测试环境url
flvIP = window.config.https?"192.168.9.233:8080":"192.168.9.233:8080";
break;
case "pre":
wsIP = ""; // 预上线环境url
break;
case "production":
wsIP = location.host; // 生产环境url
// flvIP = "192.168.9.245" + ":8080"
flvIP = location.hostname + ":38080"
break;
}
export default {
map,
login,
task,
show,
search,
device,
resource,
codes,
ops,
wsIP,
flvIP,
baseurl
};