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->redirect('http://www.baidu.com'); $this->view->assign('downurl', config("site.apkUrl")); return $this->view->fetch(); } public function appdownload() { $this->redirect('http://www.baidu.com'); /*$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; } }