You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<title>独角鲸同步数据平台系统</title>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
</body>
|
|
</html>
|
|
<script>
|
|
var phoneWidth = parseInt(window.screen.width);
|
|
var phoneHeight = parseInt(window.screen.height);
|
|
var phoneScale = phoneWidth / 1400; //除以的值按手机的物理分辨率
|
|
var ua = navigator.userAgent;
|
|
if (/Android (\d+\.\d+)/.test(ua)) {
|
|
var version = parseFloat(RegExp.$1); // andriod 2.3
|
|
if (version > 2.3) {
|
|
document.write(
|
|
'<meta name="viewport" content="width=device-width,initial-scale=' +
|
|
phoneScale +
|
|
",minimum-scale=" +
|
|
phoneScale +
|
|
',user-scalable=yes">'
|
|
); // andriod 2.3以上
|
|
} else {
|
|
document.write(
|
|
'<meta name="viewport" content="width=device-width,user-scalable=yes">'
|
|
);
|
|
}
|
|
// 其他系统
|
|
} else {
|
|
document.write(
|
|
'<meta name="viewport" content="width=device-width, initial-scale=' +
|
|
phoneScale +
|
|
",minimum-scale=" +
|
|
phoneScale +
|
|
',user-scalable=yes">'
|
|
);
|
|
}
|
|
</script>
|
|
|