Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lalasou authored Sep 28, 2023
1 parent 9553f41 commit f92723f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions scheme1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="qrcode.js"></script>
<style>
.wx{
font-size: 30px;
color: red;
}
</style>
</head>
<body>
<div>
<button><a id="login" href="#"><h1>点击登录跳转学习强国app</h1></a></button>
</div>
<div id="wx" class="wx"></div>
<div id="qrcode" style="margin-top: 10px">
<img id="img" src="#" alt="#"/>
</div>
</body>
<script>
function load() {
if (isWechat()){
document.getElementById("wx").innerText = "当前为微信环境,请点击右上角浏览器中打开"
}
let search = window.location.search
search = search.substring(1,search.length)
document.getElementById("login").setAttribute("href","dtxuexi://appclient/page/study_feeds?url="+search)
console.log(unescape(search))
let imgBase64 = jrQrcode.getQrBase64(unescape(search), {});
document.getElementById("img").setAttribute("src",imgBase64)
document.getElementById("login").click()
}
function isWechat() {
return /MicroMessenger/i.test(window.navigator.userAgent);
}
load()

</script>
</html>

0 comments on commit f92723f

Please sign in to comment.