Files
sentos/app/controller/auth/Index.php
2022-05-12 21:23:18 +08:00

27 lines
876 B
PHP

<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\controller\auth;
use app\controller\Base;
use app\services\auth\LoginService;
class Index extends Base{
public function login(LoginService $service){
try {
$data = $service->authLogin($this->request);
$this->data['data'] = $data;
} catch (\think\Exception $e) {
$this->data['code'] = 0;
$this->data['message'] = $e->getMessage();
}
return $this->data;
}
}