123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>开心0元购</title>
- <style>
- * {
- padding: 0;
- margin: 0;
- box-sizing: border-box;
- }
- body {
- width: 7.5rem;
- }
- .container {
- position: relative;
- }
- .conbg {
- width: 100%;
- display: block;
- }
- .btn {
- position: absolute;
- top: 11.3rem;
- left: calc(50% + 0.15rem);
- transform: translateX(-50%);
- width: 3.1rem;
- height: 0.85rem;
- }
- #adr-mask {
- background-color: rgba(0, 0, 0, .8);
- width: 100%;
- height: 100%;
- z-index: 99999;
- left: 0px;
- top: 0px;
- position: fixed;
- overflow: hidden;
- text-align: center;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div id="adr-mask" style="display: none;">
- <img src="/img/arrow.png" style="margin: 1rem 0 0 2.5rem;">
- <p style="color: #ffffff;font-size: 23px;margin:.5rem 0 .9rem 0;">请在浏览器中打开</p>
- <img src="/img/know.png" onclick="closeMask()" style="CURSOR: pointer">
- </div>
- <img class="conbg" src="/img/bg-img.png" alt="">
-
- <div class="btn" onclick="download()"></div>
-
- </div>
- <script>
- var downUrl = "https://s3.cn-northwest-1.amazonaws.com.cn/s3.jianos.com/Zero.apk";
- function requestApi(callback) {
- var url = 'https://apifreego.jianos.com/app_update';
- var xhr = new XMLHttpRequest();
- xhr.open('get', url, true);
- xhr.setRequestHeader("content-type", "application/json");
- xhr.onload = () => {
-
- if (xhr.status == 200) {
- var result = JSON.parse(xhr.response);
-
- if (result && result.data && result.data.src) {
- downUrl = result.data.src;
-
-
- }
- }
- }
- xhr.onerror = () => {
- console.log('xhr.onerror = ', xhr)
- }
- xhr.send();
- }
- requestApi();
- document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
- function download() {
- var ua = window.navigator.userAgent.toLowerCase();
- if (ua.match(/MicroMessenger/i) == 'micromessenger') {
-
- document.getElementById('adr-mask').style.display = 'block';
- return true;
- } else {
-
-
- window.location.href = downUrl;
- return false;
- }
- }
- function closeMask() {
- document.getElementById('adr-mask').style.display = 'none';
- }
- </script>
- </body>
- </html>
|