@adtkcn/hb-cli
Version:
用于uniapp的打包工具,可切换环境变量、可多配置,切换证书,更改版本,wifi调试
132 lines (120 loc) • 3.31 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>局域网app下载</title>
<style>
html,
body {
height: 100%;
background-color: #ccc;
}
.qrcodeContainer {
width: 260px;
margin: auto;
padding-top: 50px;
}
#qrcode {
display: inline-block;
height: 260px;
width: 260px;
overflow: hidden;
padding: 10px;
box-sizing: border-box;
background-color: #fff;
}
#qrcode img {
width: 100%;
}
.tips {
text-align: center;
font-size: 18px;
}
.btns {
display: flex;
max-width: 500px;
margin: 20px auto 0;
}
.btn {
flex: 1;
font-size: 14px;
cursor: pointer;
width: 200px;
padding: 10px;
border: 1px solid #000;
border-radius: 5px;
margin: 0 5px;
text-align: center;
color: #000;
text-decoration: none;
}
.ad {
text-align: center;
padding-top: 50px;
}
.ad .ad_link{
text-decoration: none;
color: #ff4f22;
font-size: 14px;
margin: 5px;
}
</style>
</head>
<body>
<div class="qrcodeContainer">
<div id="qrcode"></div>
</div>
<div class="tips">
<div>扫码二维码下载App</div>
<div>手机需与电脑在同一局域网</div>
</div>
<div class="btns">
<div class="btn" id="dir">打开文件所在目录</div>
<a class="btn" href="/download"> 下载 </a>
</div>
<div class="ad">
<div>
<a
class="ad_link"
href="https://www.aliyun.com/minisite/goods?userCode=jnyrjc6i"
>
【阿里云】你能得到75折优惠,而我能得到5%的佣金
</a>
</div>
<div>
<a
class="ad_link"
href="https://cloud.tencent.com/act/cps/redirect?redirect=1079&cps_key=9084b7493fb6e3826a5c26322c534cf7&from=console"
>
【腾讯云】轻量新用户上云福利,2核2G4M 低至 65元/年 , 超大容量云硬盘
0.5折起!
</a>
</div>
</div>
<!-- <script src="./url.min.js"></script> -->
<script src="qrcode.min.js"></script>
<script>
var qrcodeText = location.origin + "/download"; // + "/download?link=" + encodeURIComponent(url("?link"));
var dir = document.getElementById("dir");
dir.onclick = function () {
fetch("/open")
.then(function (response) {
return response.json();
})
.then(function (myJson) {
console.log(myJson);
});
};
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: qrcodeText,
width: 240,
height: 240,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.L,
});
</script>
</body>
</html>