如果是手机系统, 那么redirect页面将不再自动跳转
This commit is contained in:
parent
15f0b970c8
commit
24333d23cf
@ -25,7 +25,8 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>跳转中...</h1>
|
<h1>请选择操作...</h1>
|
||||||
|
<p><a href="" id="href">点击跳转至操作页面</a></p>
|
||||||
<script nonce="rAnd0m">
|
<script nonce="rAnd0m">
|
||||||
(function() {
|
(function() {
|
||||||
var urlBase = 'xwork.kingsome.cn/workflow/confirm/<%= id %>'
|
var urlBase = 'xwork.kingsome.cn/workflow/confirm/<%= id %>'
|
||||||
@ -34,9 +35,11 @@
|
|||||||
// if current devices is mobile, redirect url1, else redirect url2
|
// if current devices is mobile, redirect url1, else redirect url2
|
||||||
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
|
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
|
||||||
url = urlMobile
|
url = urlMobile
|
||||||
|
document.getElementById('href').attr('href', url)
|
||||||
|
} else {
|
||||||
|
location.href = url
|
||||||
}
|
}
|
||||||
console.log(url)
|
|
||||||
location.href = url
|
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user