view->fetch(); } /** * 获取网站配置信息 */ public function info() { $params = $this->request->request("params"); //内容 $this->view->assign('info',config("site.".$params)); return $this->view->fetch(); } //邀请页面 public function invite() { $code = input('code', '', 'trim'); if (!$code) { $this->error('邀请码不存在'); } $count = Db::name('user')->where(['invite_no' => $code])->count(); if (!$count) { $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(); } }