Переглянути джерело

前台支付,微信打开引导

lizhen_gitee 2 роки тому
батько
коміт
4832dd4682

+ 3 - 1
application/index/controller/Recharge.php

@@ -19,7 +19,9 @@ class Recharge extends Frontend
     {
         $isWechat = strpos($this->request->server('HTTP_USER_AGENT'), 'MicroMessenger') !== false;
         if($isWechat)
-        {exit('不能在微信浏览器打开');}
+        {
+            return $this->view->fetch('tips');
+        }
 
         $conf_list = Db::name('paygold_webcon')->order('id asc')->select();
         $this->assign('conf_list',$conf_list);

+ 34 - 0
application/index/view/recharge/tips.html

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>请使用手机浏览器打开</title>
+    <style>
+        *{
+            padding: 0;
+            margin: 0;
+        }
+        .page{
+            width: 100vw;
+            height: 100vh;
+            background: rgba(0,0,0,.6);
+            position: relative;
+        }
+        .page .img{
+            position: absolute;
+            top: 10px;
+            right: 30px;
+            width: 300px;
+            height: 300px;
+            z-index: 10;
+        }        
+    </style>
+</head>
+<body>
+    <div class="page">
+        <img src="/assets/img/tips.png" class="img">
+    </div>
+</body>
+</html>

BIN
public/assets/img/tips.png