Quellcode durchsuchen

ios下载链接跳转

朱海文 vor 4 Jahren
Ursprung
Commit
d80786751b
2 geänderte Dateien mit 22 neuen Zeilen und 14 gelöschten Zeilen
  1. 9 14
      public/ios-mobile.html
  2. 13 0
      src/views/iOS.vue

+ 9 - 14
public/ios-mobile.html

@ -50,25 +50,20 @@
50 50
        </div>
51 51
        <img class="conbg" src="/img/bg-img-ios.png" alt="">
52 52
        <!-- <a href="https://s3.cn-northwest-1.amazonaws.com.cn/s3.jianos.com/Zero.apk" download=""> -->
53
            <div class="btn" onclick="download()"></div>
53
            <div class="btn" onclick="jump()"></div>
54 54
        <!-- </a> -->
55 55
    </div>
56 56
    <script>
57 57
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
58
        function download() {
59
            var ua = window.navigator.userAgent.toLowerCase(); 
60
            if (ua.match(/MicroMessenger/i) == 'micromessenger') { 
61
                //是微信环境,弹出遮罩
62
                document.getElementById('ios-mask').style.display='block';
63
                return true; 
64
            } else { 
65
                //不是微信环境,直接下载,后再加下载地址
66
                
67
                return false; 
68
            }
58
        function jump() {
59
          window.location.href = 'itms-apps://itunes.apple.com/app/id1531655695';
69 60
        }
70
        function closeMask(){
71
            document.getElementById('ios-mask').style.display='none';
61
        var ua = window.navigator.userAgent.toLowerCase();
62
        if (ua.match(/MicroMessenger/i) == 'micromessenger') {
63
          //是微信环境,弹出遮罩
64
          document.getElementById('ios-mask').style.display='block';
65
        } else {
66
          document.getElementById('ios-mask').style.display='none';
72 67
        }
73 68
    </script>
74 69
</body>

+ 13 - 0
src/views/iOS.vue

@ -0,0 +1,13 @@
1
<template>
2
  <div>
3
4
  </div>
5
</template>
6
7
<style scoped>
8
9
</style>
10
<script>
11
12
</script>
13