-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
126 lines (115 loc) · 4.75 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- 不要缓存 -->
<meta http-equiv="pragram" content="no-cache">
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="expires" content="0">
<link rel="icon" type="image/x-icon" href="./static/base/img/headerLogo.jpg" />
<link rel="stylesheet" href="./static/base/css/tip.css">
<!-- title在下面配置 -->
<title></title>
</head>
<body>
<div id="tip">
<div id="tip_div">
<img src="./static/base/img/login_logo.JPG" width="280" alt="玉兰B2B" />
<br>
<div id="tip_bg">
<p id="tip_word">
亲爱的用户您好,您使用的IE浏览器版本过低,请自行下载IE最新版本或者使用其它浏览器
</p>
</div>
<span id="tip_span">本系统支持IE10+,以及其它主流浏览器</span>
</div>
</div>
<div id="app">
</div>
<!-- built files will be auto injected -->
<script>
var vm;
//供应商系统与订单系统显示文本
var sysTitle = {
order: {
webTitle: '玉兰B2B订单管理系统',
},
supply: {
webTitle: '玉兰供应商管理系统',
}
}
var titleSetting = sysTitle.order;//订单系统
//var titleSetting = sysTitle.supply;//供应商系统
var webTitle = titleSetting.webTitle;
document.title = webTitle;//网页标签的title
//后台地址统一配置
var urlArr = {
local: {
baseUrl: 'http://localhost:49438/',//订单
fileCenterUrl: "http://61.145.202.7:1001/",//下载中心测试
orderBaseUrl: "http://14.29.223.114:10250/yulan-order",//java后台正式
},
test: {
baseUrl: 'http://47.107.56.156:568/',
fileCenterUrl: "http://47.107.56.156:1001/",
//orderBaseUrl: "http://120.79.140.75:567/yulan-order",
orderBaseUrl: "http://14.29.223.114:10250/yulan-order",//java后台正式
},
formal: {
baseUrl: 'http://14.29.223.114:568/',
fileCenterUrl: "http://61.145.202.7:1001/",
orderBaseUrl: "http://14.29.223.114:10250/yulan-order",
}
}
//var urlSetting = urlArr.local;//本地
//var urlSetting = urlArr.test;//测试
var urlSetting = urlArr.formal;//正式
var baseUrl = urlSetting.baseUrl;
var fileCenterUrl = urlSetting.fileCenterUrl;
var orderBaseUrl = urlSetting.orderBaseUrl;
var wangqianUrl = 'http://14.29.221.4:10250';
function browserType() {
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器
// var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
var isIE = window.ActiveXObject || "ActiveXObject" in window
// var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器
var isEdge = userAgent.indexOf("Edge") > -1; //判断是否IE的Edge浏览器
var isFF = userAgent.indexOf("Firefox") > -1; //判断是否Firefox浏览器
var isSafari = userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1; //判断是否Safari浏览器
var isChrome = userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1 && !isEdge; //判断Chrome浏览器
if (isIE) {
var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
reIE.test(userAgent);
var fIEVersion = parseFloat(RegExp["$1"]);
if (userAgent.indexOf('MSIE 6.0') != -1) { return "IE6"; }
else if (fIEVersion == 7) { return "IE7"; }
else if (fIEVersion == 8) { return "IE8"; }
else if (fIEVersion == 9) { return "IE9"; }
else if (fIEVersion == 10) { return "IE10"; }
else if (userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)) { return "IE11"; }
else { return "IE0" }//IE版本过低
}//isIE end
if (isFF) { return "FF"; }
if (isOpera) { return "Opera"; }
if (isSafari) { return "Safari"; }
if (isChrome) { return "Chrome"; }
if (isEdge) { return "Edge"; }
}
window.onload = function () {
var result = browserType()
if (result === 'IE6' || result === 'IE7' || result === 'IE8' || result === 'IE9' || result === 'IE0') {
document.getElementById('tip').style.display = 'block'
document.getElementById('app').style.display = 'none'
document.getElementById('app').innerHTML = ''
}
else {
document.getElementById('tip').innerHTML = ''
}
}
</script>
</body>
</html>