Commit 427613a2 by Licx

添加webconfig引用

parent 7cddcfdc
......@@ -15,39 +15,44 @@
<link rel="icon" href="/favicon.ico" />
<script>
function checkChromeVersion() {
var userAgent = navigator.userAgent;
var regex = /Chrome\/([0-9]+)\./;
var match = userAgent.match(regex);
var userAgent = navigator.userAgent
var regex = /Chrome\/([0-9]+)\./
var match = userAgent.match(regex)
if (match && parseInt(match[1]) < 49) {
// 假设需要版本不低于60
alert("您当前的Chrome浏览器版本过低,请考虑升级。");
alert('您当前的Chrome浏览器版本过低,请考虑升级。')
}
}
function checkIEVersion() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
var ua = window.navigator.userAgent
var msie = ua.indexOf('MSIE ')
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
// 判断IE或Edge
var version = parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)));
var version = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)))
if (version < 8) {
// 如果IE版本低于10
alert("您正在使用老旧的IE浏览器,可能无法正常访问本网站。建议升级到最新版本的浏览器。");
alert(
'您正在使用老旧的IE浏览器,可能无法正常访问本网站。建议升级到最新版本的浏览器。'
)
}
}
}
checkIEVersion();
checkChromeVersion();
checkIEVersion()
checkChromeVersion()
</script>
<title>基于病种精准管理系统</title>
<script type="text/javascript" src="./webconfig.js"></script>
</head>
<body>
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment