15954078560 3 anni fa
parent
commit
32c2d6a58c

+ 8 - 0
application/index/controller/Index.php

@@ -38,7 +38,15 @@ class Index extends Frontend
             $this->error('邀请码不存在');
         }
 
+        $is_wechat = strpos($this->request->server('HTTP_USER_AGENT'), 'MicroMessenger') !== false;
+        if($is_wechat) {
+            $is_wechat = 1;
+        } else {
+            $is_wechat = 0;
+        }
+
         $this->view->assign('code', $code);
+        $this->view->assign('is_wechat', $is_wechat);
 
         return $this->view->fetch();
     }

+ 39 - 0
application/index/view/index/invite.html

@@ -122,10 +122,34 @@
             height: 100vh;
             background-color: #1D1A1B;
         }
+        .mengban{
+            width: 100%;
+            height: 100%;
+            background: rgba(0,0,0,0.1);
+            position: absolute;
+            top: 0;
+            left: 0;
+            display: none;
+            z-index: -100;
+        }
+        .tip img{
+            position: absolute;
+            top: 10px;
+            right: 30px;
+            width: 150px;
+            height: 130px;
+            z-index: -200;
+            display: none;
+        }
     </style>
 </head>
 
 <body>
+    <div class="mengban" id="mengban">
+    </div>
+    <div class="tip">
+        <img src="__CDN__/assets/invite/imgs/tips.png" id="tip">
+    </div>
     <div class="page">
         <div class="people-panel">
             <img src="__CDN__/assets/invite/imgs/people.png" class="people-img"/>
@@ -144,9 +168,24 @@
             </div>
         </div>
     </div>
+    <input type="hidden" id="is_wechat" value="{$is_wechat}">
 </body>
 </html>
 <script>
+
+    window.onload = function () {
+        var is_wxchat = document.getElementById('is_wechat').value;
+        var mengban = document.getElementById("mengban");
+        var tip = document.getElementById("tip");
+        if (is_wxchat != 0) {
+            // console.log(2212);
+            mengban.style.zIndex="9999";
+            mengban.style.display="block";
+            tip.style.zIndex="10";
+            tip.style.display="block";
+        }
+    };
+
 var clipboard = new ClipboardJS('.copy');
 clipboard.on('success', function(e) {
     // console.log(e.text);

BIN
public/assets/invite/imgs/tips.png