|
@@ -15,6 +15,7 @@ namespace app\index\controller;
|
|
|
use app\common\model\User as UserAlias;
|
|
|
use app\index\model\User as UserModel;
|
|
|
use app\index\model\user\UserAccessLog;
|
|
|
+use app\index\service\User as UserService;
|
|
|
use think\facade\Cache;
|
|
|
use app\index\service\passport\Login as LoginService;
|
|
|
use think\facade\Session;
|
|
@@ -28,7 +29,7 @@ class Passport extends Controller
|
|
|
{
|
|
|
/**
|
|
|
* 登录接口 (需提交手机号、短信验证码、第三方用户信息)
|
|
|
- * @return \think\response\Json|\think\response\View
|
|
|
+ * @return
|
|
|
* @throws \app\common\exception\BaseException
|
|
|
* @throws \think\Exception
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
@@ -47,6 +48,11 @@ class Passport extends Controller
|
|
|
'create_time' => time()
|
|
|
]);
|
|
|
|
|
|
+ $userId = UserService::getCurrentLoginUserId();
|
|
|
+ if ($userId){
|
|
|
+ return redirect('/index/index/index.html');
|
|
|
+ }
|
|
|
+
|
|
|
return view('logIn');
|
|
|
}
|
|
|
// 执行登录
|