41 lines
866 B
PHP
41 lines
866 B
PHP
<?php
|
|
|
|
namespace app\controller\api;
|
|
|
|
use app\exception\RepositoryException;
|
|
use app\job\NotifySms;
|
|
use app\model\AccountFootmarks;
|
|
use app\model\HotKeyword;
|
|
use app\repository\AccountRepository;
|
|
use app\service\ExtraConfig;
|
|
use think\Collection;
|
|
use think\facade\Config as CConfig;
|
|
use think\facade\Queue;
|
|
use think\response\Json;
|
|
|
|
class Index extends Base
|
|
{
|
|
protected $noNeedLogin = [];
|
|
|
|
public function index(): Json
|
|
{
|
|
return json(['code' => 0, 'msg' => 'I am index']);
|
|
}
|
|
|
|
/**
|
|
* 测试用
|
|
*
|
|
* @return Json
|
|
* @throws RepositoryException
|
|
*/
|
|
public function test(): Json
|
|
{
|
|
$userId = $this->request->middleware('userInfo')['user_id'] ?? 0;
|
|
$user = AccountRepository::getInstance()->info($userId, []);
|
|
return json(['code' => 0, 'msg' => 'I am test ', 'data' => $user]);
|
|
}
|
|
|
|
|
|
|
|
|
|
} |