更新目录结构
This commit is contained in:
26
app/controller/api/auth/Index.php
Normal file
26
app/controller/api/auth/Index.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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\api\auth;
|
||||
|
||||
use app\controller\Base;
|
||||
use app\services\wechat\OauthService;
|
||||
|
||||
class Index extends Base{
|
||||
|
||||
public function wxlogin(OauthService $service){
|
||||
try {
|
||||
$this->data['data'] = $service->oauth($this->request);
|
||||
} catch (\Exception $e) {
|
||||
$this->data['code'] = 0;
|
||||
$this->data['message'] = $e->getMessage();
|
||||
}
|
||||
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user