瀏覽代碼

添加下载H5页面

DESKTOP-SVI9JE1\muzen 2 年之前
父節點
當前提交
c032c23037
共有 1 個文件被更改,包括 123 次插入124 次删除
  1. 123 124
      fore/ohplay/cn_run.htm

+ 123 - 124
fore/ohplay/cn_run.htm

@@ -12,28 +12,6 @@
     <!-- <link rel="shortcut icon" href="./static/css/favicon.ico"> -->
     <!--<link rel="stylesheet" type="text/css" href="./static/css/headerComponent.css">-->
     <!--<link rel="stylesheet" type="text/css" href="./static/css/ohplay.css">-->
-    <script type="text/javascript">
-        const detectDeviceType = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Mobile" : "Desktop";
-        // Example 
-        if (detectDeviceType() === 'Desktop') {
-            window.location = "http://download.radio1964.com/readme?";
-        } else {
-            const userAgent = navigator.userAgent;
-            function handleDownLoadMWProIOS(url) {
-                var isiOS = !!userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
-                if (isiOS) {
-                    window.open(url, '_blank')
-                }
-            }
-
-            function handleDownLoadMWProAndroid(url) {
-                var isAndroid = userAgent.indexOf('Android') > -1 || userAgent.indexOf('Adr') > -1;
-                if (isAndroid) {
-                    window.open(url, '_blank')
-                }
-            }
-        }
-    </script>
     <!--<script type="text/javascript">-->
     <!--    if (window.innerWidth <= 1080) {-->
     <!--        (function (doc, win) {-->
@@ -106,7 +84,7 @@
     <!--    }-->
     <!--    @media (max-device-width: 1081px) {-->
     <!--        .nav-lang:hover {-->
-    <!--            height: 0.8rem;-->
+    <!--            height: 0.8em;-->
     <!--        }-->
     <!--    }-->
 
@@ -139,23 +117,23 @@
     <!--    }-->
     <!--    .appTips .quak{-->
     <!--    	position: absolute;-->
-    <!--        width: 2rem;-->
-    <!--        top: 0.5rem;-->
-    <!--        right: 0.5rem;-->
+    <!--        width: 2em;-->
+    <!--        top: 0.5em;-->
+    <!--        right: 0.5em;-->
     <!--    }-->
     <!--    .appTips .brower{-->
-    <!--        right: 1.5rem;-->
-    <!--        top: 1.5rem;-->
-    <!--        width: 1.5rem;-->
+    <!--        right: 1.5em;-->
+    <!--        top: 1.5em;-->
+    <!--        width: 1.5em;-->
     <!--    }-->
     <!--    .appTips .tipText{-->
     <!--        position: absolute;-->
-    <!--        right: 2.8rem;-->
-    <!--        top: 2rem;-->
+    <!--        right: 2.8em;-->
+    <!--        top: 2em;-->
 
     <!--    }-->
     <!--    .appTips .tipText p {-->
-    <!--        line-height: 0.3rem;-->
+    <!--        line-height: 0.3em;-->
     <!--        font-size: 16px;-->
     <!--    }-->
     <!--    .appTips .tipsp{-->
@@ -188,6 +166,12 @@
     <!--        window.location.href = 'http://airsmart-photo1.oss-cn-shanghai.aliyuncs.com/download_online/release/oh_play.apk';-->
     <!--    }-->
     <!--</script>-->
+    <script>
+        const detectDeviceType = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Mobile" : "Desktop";
+        if (detectDeviceType() === 'Desktop') {
+            window.location = "http://download.radio1964.com/readme?";
+        }
+    </script>
 </head>
 
 <body>
@@ -203,16 +187,14 @@
                 <img class="right" src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/banner-3.png" />
             </div>
             <div class="button">
-                <button class="btn green"
-                    onclick="handleDownLoadMWProIOS(`https://apps.apple.com/cn/app/ohplay%E7%8C%AB%E7%8E%8B%E5%A6%99%E6%92%ADpro/id1402502317`)">
+                <a id="ios" class="btn green" href="https://apps.apple.com/cn/app/com.muzen.radioplayer/id1402502317">
                     <img class="button-icon"
-                        src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/iPhone.png" />iPhone下载
-                </button>
-                <button class="btn green"
-                    onclick="handleDownLoadMWProAndroid(`https://a.app.qq.com/o/simple.jsp?pkgname=com.muzen.radioplayer`)">
+                        src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/iPhone.png" />iPhone下载</a>
+                <a id="Android" class="btn green"
+                    href="https://a.app.qq.com/o/simple.jsp?pkgname=com.muzen.radioplayer">
                     <img class="button-icon"
                         src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/Android.png" />Android下载
-                </button>
+                </a>
             </div>
         </div>
         <div class="box">
@@ -227,19 +209,34 @@
                 <img class="right" src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/banner-6.png" />
             </div>
             <div class="button">
-                <button class="btn purple"
-                    onclick="handleDownLoadMWProIOS(`https://apps.apple.com/cn/app/id6449812627`)">
+                <a id="ios" class="btn purple" href="https://apps.apple.com/cn/app/com.Muzen.MuzenLife/id6449812627">
                     <img class="button-icon"
                         src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/iPhone.png" />iPhone下载
-                </button>
-                <button class="btn purple"
-                    onclick="handleDownLoadMWProAndroid(`https://music-play.oss-cn-shenzhen.aliyuncs.com/backOss/file/c1e949bd4b314c07bb0097f1180c689e.apk`)">
-                    <img class="button-icon"
+                </a>
+                <a id="Android" class="btn purple"
+                    href="https://music-play.oss-cn-shenzhen.aliyuncs.com/backOss/file/c1e949bd4b314c07bb0097f1180c689e.apk">
+                    <img class="button-icon" quer
                         src="https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/Android.png" />Android下载
-                </button>
+                </a>
             </div>
         </div>
     </div>
+    <script>
+        const userAgent = navigator.userAgent;
+        var isiOS = !!userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+        var isAndroid = userAgent.indexOf('Android') > -1 || userAgent.indexOf('Adr') > -1;
+        var iOSElement = document.querySelectorAll("#ios")
+        var AndElement = document.querySelectorAll("#Android")
+        if (isiOS) {
+            for (var i = 0; i < AndElement.length; i++) {
+                AndElement[i].style.pointerEvents = "none"
+            }
+        } else {
+            for (var i = 0; i < iOSElement.length; i++) {
+                iOSElement[i].style.pointerEvents = "none"
+            }
+        }
+    </script>
 </body>
 
 <style>
@@ -256,98 +253,100 @@
         height: 100%;
     }
 
+    a {
+        text-decoration: none;
+    }
+
     .bg {
         width: 100%;
         height: 100%;
         background: url('https://music-play.oss-cn-shenzhen.aliyuncs.com/ohplay_images/download-bg.png');
         background-repeat: no-repeat;
         background-size: 100%;
+    }
 
-        .box {
-            position: relative;
-        }
-
-        .header {
-            padding-top: 2.5rem;
-            margin-bottom: 2rem;
-            text-align: center;
+    .box {
+        position: relative;
+    }
 
-            .icon {
-                width: 5rem;
-                height: 5rem;
-                margin-bottom: 0.5rem;
-            }
-        }
+    .header {
+        padding-top: 2.5rem;
+        margin-bottom: 2rem;
+        text-align: center;
+    }
 
-        .header h3 {
-            font-size: 20px;
-            color: #353535;
-        }
+    .icon {
+        width: 5rem;
+        height: 5rem;
+        margin-bottom: 0.5rem;
+    }
 
-        .header h4 {
-            font-size: 13px;
-            color: #777777;
-        }
+    .header h3 {
+        font-size: 20px;
+        color: #353535;
+    }
 
+    .header h4 {
+        font-size: 13px;
+        color: #777777;
+    }
 
+    .banner {
+        margin-left: -2.375rem;
+        display: flex;
+        align-items: center;
+        overflow: hidden;
+        margin-bottom: 3.75rem;
+    }
 
-        .banner {
-            margin-left: -2.375rem;
-            display: flex;
-            align-items: center;
-            overflow: hidden;
-            margin-bottom: 3.75rem;
-        }
+    .banner img {
+        border-radius: 16px;
+    }
 
-        .banner img {
-            border-radius: 16px;
-        }
+    .banner .left,
+    .banner .right {
+        width: 8.75rem;
+        height: 15.5rem;
+    }
 
-        .banner .left,
-        .banner .right {
-            width: 8.75rem;
-            height: 15.5rem;
-        }
+    .banner .center {
+        width: 10rem;
+        height: 17.75rem;
+        margin: 0 12px;
+    }
 
-        .banner .center {
-            width: 10rem;
-            height: 17.75rem;
-            margin: 0 12px;
-        }
+    .button {
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+    }
 
-        .button {
-            display: flex;
-            flex-direction: column;
-            justify-content: center;
-            align-items: center;
-
-            .btn {
-                border: none;
-                border-radius: 32px;
-                width: 15.9rem;
-                height: 2.75rem;
-                font-size: 14px;
-                color: #FFF;
-                display: flex;
-                justify-content: center;
-                align-items: center;
-                margin-bottom: 1.5rem;
-            }
+    .btn {
+        border: none;
+        border-radius: 32px;
+        width: 15.9rem;
+        height: 2.75rem;
+        font-size: 14px;
+        color: #FFF;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-bottom: 1.5rem;
+    }
 
-            .green {
-                background: linear-gradient(180deg, #A4D099 0%, #78B06A 100%);
-            }
+    .green {
+        background: linear-gradient(180deg, #A4D099 0%, #78B06A 100%);
+    }
 
-            .purple {
-                background: linear-gradient(180deg, #BC58EE 0%, #7C47A3 100%);
-            }
+    .purple {
+        background: linear-gradient(180deg, #BC58EE 0%, #7C47A3 100%);
+    }
 
-            .button-icon {
-                width: 2rem;
-                height: 2rem;
-                margin-right: 10px;
-            }
-        }
+    .button-icon {
+        width: 2rem;
+        height: 2rem;
+        margin-right: 10px;
     }
 </style>
 <!--<body>-->
@@ -467,19 +466,19 @@
 <!--        position: relative;-->
 <!--        z-index: 1000;-->
 <!--        color: rgba(220, 190, 160, 1);-->
-<!--        font-size: 0.12rem !important;-->
-<!--        margin-bottom: 0.30rem;-->
+<!--        font-size: 0.12em !important;-->
+<!--        margin-bottom: 0.30em;-->
 <!--        display: flex;-->
 <!--        justify-content: center;-->
 <!--        align-items: center;-->
-<!--        border-radius: 0.20rem;-->
-<!--        bottom: 0.6rem;-->
+<!--        border-radius: 0.20em;-->
+<!--        bottom: 0.6em;-->
 <!--        font-weight: bold;-->
 <!--        cursor: pointer;-->
 <!--    }-->
 <!--    .section-app div img {-->
-<!--        width: 1.55rem;-->
-<!--        height: 0.45rem;-->
+<!--        width: 1.55em;-->
+<!--        height: 0.45em;-->
 <!--    }-->
 <!--</style>-->