27 lines
876 B
PHP
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;
|
|
}
|
|
}
|