| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 | 
							- <?php
 
- namespace app\index\controller;
 
- use app\common\controller\Frontend;
 
- use think\Db;
 
- class Index extends Frontend
 
- {
 
-     protected $noNeedLogin = '*';
 
-     protected $noNeedRight = '*';
 
-     protected $layout = '';
 
-     public function index()
 
-     {
 
-         return $this->view->fetch();
 
-     }
 
-     public function wxsharedownload(){
 
-         $this->view->assign('downurl', config("site.apkurl"));
 
-         return $this->view->fetch();
 
-     }
 
-     /**
 
-      * app下载页
 
-      * 判断是安卓还是ios
 
-      */
 
-     public function appdownload() {
 
-         /*$this->view->assign('downurl', config("site.apkurl"));
 
-         return $this->view->fetch();*/
 
-         if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
 
-             header("Location: ".config('site.ios_downurl'));
 
-         }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
 
-             //$host = $_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"];
 
-             //header("Location: ".$host."/index/index/download");
 
-             $this->view->assign('downurl', config("site.android_apkUrl"));
 
-             return $this->view->fetch();
 
-         }else{
 
-             $this->view->assign('downurl', config("site.android_apkUrl"));
 
-             return $this->view->fetch();
 
-         }
 
-     }
 
-     //基础文章网页
 
-     public function basedata(){
 
-         $key = input('key','');
 
-         if(!$key){
 
-             exit;
 
-         }
 
-         $content = Db::name('basedata')->where('key',$key)->find();
 
-         $this->assign('content',$content['content']);
 
-         return $this->fetch();
 
-     }
 
-     //系统公告
 
-     public function messagesys(){
 
-         $id = input('id','');
 
-         if(!$id){
 
-             exit;
 
-         }
 
-         $content = Db::name('message_sys')->where('id',$id)->find();
 
-         $this->assign('content',$content['info']);
 
-         return $this->fetch('basedata');
 
-     }
 
- }
 
 
  |