-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"build": "astro build", | ||
"build": "cp -r public dist", | ||
"preview": "astro preview", | ||
"prepare": "simple-git-hooks", | ||
"ts-check": "tsc --noEmit && astro check --noEmit", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
me.unco.site | ||
demo.unco.site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1" /> | ||
<title>打开小程序</title> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
border: none; | ||
} | ||
|
||
body, | ||
html { | ||
height: 100%; | ||
} | ||
|
||
.container { | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.btn { | ||
padding: 10px 20px; | ||
background: #07c160; | ||
font-size: 17px; | ||
color: #fff; | ||
border-radius: 5px; | ||
} | ||
|
||
.displayNo { | ||
display: none; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div id="jump-btn" class="btn displayNo" onclick="openWeapp()">打开小程序</div> | ||
<div id="tip" class="tip displayNo">请在手机上打开网页链接</div> | ||
</div> | ||
<script src="https://hm.baidu.com/hm.js?d1054cae0cbf68aac88c08c4cfef1396"></script> | ||
<script> | ||
var btnElem = document.getElementById('jump-btn') | ||
var tipElem = document.getElementById('tip') | ||
if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|IEMobile)/i)) { | ||
btnElem.classList.remove('displayNo') | ||
} else { | ||
tipElem.classList.remove('displayNo') | ||
} | ||
var uRLScheme = 'weixin://dl/business/?ticket=l259dfcade2d3996caf26803cf90b0dfe' | ||
function openWeapp() { | ||
location.href = uRLScheme | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |