request->getHostInfo(); $name = '花掌柜'; $bei = '闽ICP备15017325号-1'; if (strstr($host, 'hzghd') !== false) { $name = '花掌柜'; $bei = '闽ICP备15017325号-1'; } if (strstr($host, 'theflorist') !== false) { $name = '花掌柜'; $bei = '闽ICP备15017325号-2'; } if (strstr($host, 'huaml') !== false) { $name = '花美利'; $bei = '闽ICP备15017325号-3'; } if (strstr($host, 'zhhinc') !== false) { $name = '中花汇'; $bei = '闽ICP备15017325号-4'; } if (strstr($host, 'huahb.com') !== false) { $name = '花掌柜'; $bei = '闽ICP备15017325号-5'; } if (strstr($host, 'huahb.cn') !== false) { $name = '花掌柜'; $bei = '闽ICP备15017325号-6'; } if (strstr($host, 'zhiguanhua.cn') !== false) { $name = '花掌柜'; $bei = '闽ICP备15017325号-7'; } if (strstr($host, 'huadianbao.net') !== false) { $name = '花掌柜'; $bei = '闽ICP备15017325号-8'; } $this->layout = false; return $this->render('index', ['name' => $name, 'bei' => $bei]); } public function actionLogout() { xhWxOpenAdminService::logout();//不注销所有的 用户会话数据 $this->redirect(['main/login']); } public function actionCheckLogin() { $request = Yii::$app->request; $mobile = $request->post('mobile'); $password = $request->post('password'); $return = xhWxOpenAdminService::loginByMobile($mobile, $password, true);//true 自动登陆 if ($return) { util::complete('success'); } util::fail('帐号或密码错误'); } public function actionRunning() { return $this->render('running'); } public function actionBook() { return $this->render('book'); } }