| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 | 
							- <?php
 
- namespace app\index\controller;
 
- use app\common\controller\Frontend;
 
- class Index extends Frontend
 
- {
 
-     protected $noNeedLogin = '*';
 
-     protected $noNeedRight = '*';
 
-     protected $layout = '';
 
-     public function index()
 
-     {
 
-         return $this->view->fetch();
 
-     }
 
-     /**
 
-      * 服务协议
 
-      * @return string
 
-      * @throws \think\Exception
 
-      */
 
-     public function service()
 
-     {
 
-         $this->view->assign('content', config("site.userAgreement"));
 
-         return $this->view->fetch();
 
-     }
 
-     /**
 
-      * 隐私政策
 
-      * @return string
 
-      * @throws \think\Exception
 
-      */
 
-     public function privacy()
 
-     {
 
-         $this->view->assign('content', config("site.privacyAgreement"));
 
-         return $this->view->fetch();
 
-     }
 
-     /**
 
-      * 判断是安卓还是ios
 
-      */
 
-     public function appJump() {
 
-         if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
 
-             header("Location: https://apps.apple.com/cn/app/%E4%BC%B4%E5%A3%B0%E8%AF%AD%E9%9F%B3/id1556551099");
 
-         }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
 
-             $host = $_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"];
 
-             header("Location: ".$host."/index/index/download");
 
-         }else{
 
-             echo '机型暂不支持!';
 
-         }
 
-     }
 
-     /**
 
-      * 下载app中转页
 
-      */
 
-     public function download() {
 
-         $this->view->assign('downurl', config("site.apkUrl"));
 
-         return $this->view->fetch();
 
-     }
 
-     //判断是否微信浏览器 -xzz1125
 
-     function is_weixin() {
 
-         if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) {
 
-             return true;
 
-         } return false;
 
-     }
 
- }
 
 
  |