scheme更快速跳转
This commit is contained in:
parent
bb0b34d99a
commit
ebe945e176
|
@ -6,8 +6,9 @@
|
|||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<a id="login" href="#"><h1>点击登录跳转学习强国app</h1></a>
|
||||
<button><a id="login" href="#"><h1>点击登录跳转学习强国app</h1></a></button>
|
||||
</div>
|
||||
<div id="wx"></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
@ -15,7 +16,18 @@
|
|||
let search = window.location.search
|
||||
search = search.substring(1,search.length)
|
||||
document.getElementById("login").setAttribute("href","dtxuexi://appclient/page/study_feeds?url="+search)
|
||||
document.getElementById("login").click()
|
||||
}
|
||||
function isWeixin () {
|
||||
let user= navigator.userAgent.toLowerCase();
|
||||
if(user.match(/MicroMessenger/i)==="micromessenger") {
|
||||
console.log('微信')
|
||||
document.getElementById("wx").innerText = "检测到微信环境,请单击右上角选择浏览器打开跳转"
|
||||
} else {
|
||||
console.log('非微信')
|
||||
}
|
||||
}
|
||||
isWeixin()
|
||||
load()
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue