1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
| // 判断是否为内网网访问
| var isWeb = location.hostname.indexOf("192.168")>-1;
| //是否为生产环境
| const webUrl = location.href.indexOf("/web") > -1 ? "/web" : "";
| var host = isWeb?location.hostname:"";
|
| var port = isWeb? location.port:"";
| var url = "http://"+host+":"+port+webUrl;
| console.log(host);
| const config = {
| //本地html文件路径
| htmUlr:url,
| // FileJS
| jsUrl:url+'data/fileTree.js'
|
|
| }
| console.log(config.htmUlr);
|
|