| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace mobile\controllers;
- use common\services\xhUserService;
- use Yii;
- class TestController extends MobileendController
- {
-
- public $withoutLogin = ['logout', 'login'];
-
- //模拟退出 shish 2019.8.25
- public function actionLogout()
- {
- xhUserService::logout();
- var_dump($this->isLogin);
- }
-
- //模拟登陆 shish 2019.8.25
- public function actionLogin()
- {
- $customerId = Yii::$app->request->get('customerId');
- $customerId = $customerId ? intval($customerId) : 12536630;
- xhUserService::logout();
- $user = xhUserService::getById($customerId);
- xhUserService::loginByThird($user);
- var_dump($this->isLogin);
- echo $this->userId;
- }
-
- }
|