Files
sentos/app/controller/api/auth/Index.php
2023-10-21 21:18:46 +08:00

26 lines
858 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\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;
}
}