123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <script src="./js/JQ.js"></script>
- <script src="./js/copy.js"></script>
- <style>
- .div {
- width: 100%;
- height: 100%;
- position: relative;
- }
- .top {
- width: 100%;
- height: 100%;
- }
- .bottom {
- position: fixed;
- width: 100%;
- bottom: 0;
- left: 0;
- right: 0;
- }
- img {
- width: 100%;
- height: 100%;
- }
- .logo {
- margin-top: -200px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .logo_icon {
- width: 300px;
- height: 300px;
- }
- .logo_font {
- margin-top: 20px;
- font-size: 60px;
- color: #333;
- font-weight: 300;
- }
- .button1 {
- left: 50%;
- margin-left: -350px;
- z-index: 2;
- position: fixed;
- bottom: 500px;
- width: 700px;
- height: 125px;
- display: flex;
- justify-content: center;
- }
- .button {
- left: 50%;
- margin-left: -350px;
- display: flex;
- justify-content: center;
- z-index: 2;
- position: fixed;
- bottom: 320px;
- width: 700px;
- height: 125px;
- }
- .weixin-tip {
- display: none;
- position: fixed;
- left: 0;
- top: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.8);
- filter: alpha(opacity=80);
- height: 100%;
- width: 100%;
- z-index: 100;
- }
- .weixin-tip p {
- text-align: center;
- margin-top: 10%;
- padding: 0 5%;
- }
- * {
- padding: 0;
- margin: 0;
- box-sizing: border-box
- }
- #hide {
- opacity: 0;
- }
- </style>
- </head>
- <body>
- <div class="div">
- <div class="top">
- <img src="./image/top.png" alt="">
- </div>
- <div class="logo">
- <img class="logo_icon" src="./image/logo1.png" alt="">
- <div class="logo_font">
- 宏根蒂
- </div>
- </div>
- <a class="button1" id="url" href="">
- <img class="button1" src="./image/anzhuo.png" alt="">
- </a>
- <!-- <a class="button" href="#">
- <img class="button" src="./image/apple.png" alt="">
- </a> -->
- <div class="bottom">
- <img src="./image/bottom.png" alt="">
- </div>
- </div>
- <!-- <div class="weixin-tip">
- <p>
- <img src="./image/live_weixin.png" alt="微信打开" />
- </p>
- </div> -->
- <input type="text" id="hide" style="opacity: 0;height: 19px;">
- </body>
- <script type="text/javascript">
- function downapp() {
- $.ajax({
- type: "get",
- url: "http://hgd.liuniu946.com/api/version",
- data: {},
- dataType: "json",
- success: function(data) {
- // document.getElementById('url').href = 'http://hgd.liuniu946.com' + data.data.apk
- window.location.href = data.data.url
- // console.log()
- }
- });
- }
- var url = location.search;
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("=");
- var invitation = strs[1];
- console.log(invitation);
- document.getElementById('hide').value = invitation;
- }
- function copyToClip(content) {
- console.log(111);
- if (navigator.clipboard && window.isSecureContext) {
- console.log(222);
- navigator.clipboard.writeText(content).then(
- // 复制成功callback
- function() {
- if (tips == null) {
- console.log('复制成功')
- } else {}
- },
- // 复制失败callback
- function() {
- console.log("复制失败");
- },
- )
- }
- }
- $('.button1').click(function() {
- $('#hide').val(); //把要复制的内容给到这里
- $('#hide').select();
- try {
- var state = document.execCommand('copy');
- } catch (err) {
- var state = false;
- }
- if (state) {
- //复制成功
- // $(this).hide()
- // $(this).next().show()
- } else {
- //复制失败
- }
- })
- $(window).on("load", function() {
- var winHeight = $(window).height();
- function is_weixin() {
- var ua = navigator.userAgent.toLowerCase();
- if (ua.match(/MicroMessenger/i) == "micromessenger") {
- return true;
- } else {
- return false;
- }
- }
- var isWeixin = is_weixin();
- if (isWeixin) {
- $(".weixin-tip").css("height", winHeight);
- $(".weixin-tip").show();
- }
- $.ajax({
- type: "get",
- url: "http://hgd.liuniu946.com/api/version",
- data: {},
- dataType: "json",
- success: function(data) {
- document.getElementById('url').href = data.data.url
- }
- });
- })
- </script>
- </html>
|