This commit is contained in:
molong
2022-05-24 16:10:50 +08:00
parent a37870c93b
commit d8e43f9e93
63 changed files with 2169 additions and 230 deletions

View File

@@ -9,13 +9,14 @@
namespace app\controller\auth;
use app\controller\Base;
use app\services\auth\LoginService;
use app\services\auth\AuthService;
use app\services\SocialiteService;
class Index extends Base{
public function login(LoginService $service){
public function login(AuthService $service){
try {
$data = $service->authLogin($this->request);
$data = $service->login($this->request);
$this->data['data'] = $data;
} catch (\think\Exception $e) {
$this->data['code'] = 0;
@@ -23,4 +24,14 @@ class Index extends Base{
}
return $this->data;
}
/**
* @title 第三方账号登录
*/
public function socialite(){
//实例化第三方登录服务
$service = new SocialiteService();
return $service->login();
}
}