赣州市洪水风险预警系统二维版本
xiebin
2023-03-02 b39483c96ae572121d3c619c0b9d37634e682cc4
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
//处理IE8以前版本不支持console.log()方法
if (!window["console"]) {
    window["console"] = {
        log: function () {
        }
    }
}
 
//检测用户的浏览器版本
function checkBrowder () {
    if (navigator.userAgent.indexOf("Opera") != -1) {
        alert('Opera')
    }
    else if (navigator.userAgent.indexOf("MSIE") != -1) {
        var ieversion = checkIEVersion()
        if (ieversion < 9) {
            alert('为了使您得到更好的用户体验,建议您使用IE9.0及以上版本的IE、火狐(Firefox)浏览器或Chrome浏览器。')
        }
    }
    else if (navigator.userAgent.indexOf("Firefox") != -1) {
    }
    else if (navigator.userAgent.indexOf("Netscape") != -1) {
    }
    else if (navigator.userAgent.indexOf("Chrome") != -1) {
        console.log("Chrome")
    }
    else if (navigator.userAgent.indexOf("Safari") != -1) {
    }
    else {
        if (isIE11()) {
 
        }
        else {
            alert('无法识别您的浏览器类型,为了使您得到更好的用户体验,建议您使用IE9.0及以上版本的IE、火狐(Firefox)浏览器或Chrome浏览器。')
        }
    }
}
 
function checkIEVersion () {
    var ua = navigator.userAgent
    var b = ua.indexOf("MSIE ")
    if (b < 0) {
        return 0
    }
    var v = parseFloat(ua.substring(b + 5, ua.indexOf(";", b)))
    return v
}
 
function isIE11 () {
    return ("ActiveXObject" in window)
}
 
checkBrowder()
String.prototype.trim = function () {
 
    return this.replace(/(^\s*)|(\s*$)/g, '')
}
var getIndexUrl = function (app) {
    var indexPath = location.protocol + "//" + location.host + app
    return indexPath
}
 
function uuid () {
    var s = []
    var hexDigits = "0123456789abcdef"
    for (var i = 0; i < 36; i++) {
        s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1)
    }
    s[14] = "4"  // bits 12-15 of the time_hi_and_version field to 0010
    s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1)  // bits 6-7 of the clock_seq_hi_and_reserved to 01
    s[8] = s[13] = s[18] = s[23] = "-"
 
    var uuid = s.join("")
    return uuid
}
// fuwuqi
// var baseUrl = getIndexUrl("/gzsw3D/hsyj");
var baseUrl = getIndexUrl("/hsyj")
// var baseUrl = getIndexUrl("/")
 
console.log(baseUrl)
dojoConfig = {
    parseOnLoad: false,
    async: true,
    packages: [
        // Any references to a "demo" resource should load modules locally, *not* from CDN
        {
            name: "base",
            location: baseUrl + "/core"
        },
        {
            name: "manager",
            location: baseUrl + "/core/manager"
        },
        {
            name: "widgets",
            location: baseUrl + "/widgets"
        },
        {
            name: "esrichina",
            location: baseUrl + "/core/esrichina"
        },
        {
            name: "controls",
            location: baseUrl + "/controls"
        }, {
            name: "jslibs",
            location: baseUrl + "/jslibs"
        },
        {
            name: "utils",
            location: baseUrl + "/core/utils"
        },
        {
            name: "assets",
            location: baseUrl + "/assets"
        },
        {
            name: "agsjs",
            location: baseUrl + "/agsjs"
        },
        {
            name: "echarts",
            location: baseUrl + "/echarts"
        }
    ]
}