Skip to content

Commit b7d8e03

Browse files
author
wangyaqi
committed
使用窗口大小判断替换UA判断导向
1 parent 2e09d97 commit b7d8e03

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎template.h5.html‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
<%= htmlWebpackPlugin.options.title %>
99
</title>
1010
<script>
11-
var UA = window.navigator.userAgent.toLowerCase();
12-
var isAndroid = UA.indexOf('android') > 0;
13-
var isIOS = /iphone|ipad|ipod|ios/.test(UA);
14-
if (!(isAndroid || isIOS)) {
11+
if (document.documentElement.clientWidth > 1024) {
1512
// 正式发布的时候使用,开发期间不启用。
1613
// window.location.href = '/h5/pcguide.html';
1714
}

0 commit comments

Comments
 (0)