name = '系统通知'; $this->site = new \stdClass(); $this->getSite(); $view = \yii::$app->view; $view->params['site'] = $this->site; } public function getSite() { $url = \yii::$app->request->getHostInfo() . \yii::$app->request->url; $this->site->url = $url; if(YII_ENV_DEV){ $this->site->base_url = \yii::$app->request->getHostInfo() . \yii::$app->request->baseUrl; } else { $this->site->base_url = \yii::$app->request->getHostInfo(); } $this->site->assets_url = $url; $this->site->title = '通知'; $this->site->desc = ''; $this->site->icon = ''; $this->site->appid = ''; $this->site->timestamp = ''; $this->site->noncestr = ''; $this->site->signature = ''; $this->site->user_bridge_url = ''; $this->site->sn = ''; return $this->site; } /** 系统暂停 * @return string */ public function actionStop() { $this->layout = 'site'; \yii::$app->name = '系统通知'; $viewTpl = '@app/wx/views/site/error/stop.php'; $siteInfo = SysSetting::getClientSiteInfo(); return $this->render($viewTpl,['stop_status'=> $siteInfo['stop'], 'stop_head'=> $siteInfo['stop_head'], 'stop_content'=> $siteInfo['stop_content']]); } }