// 登录成功后签发 token $auth = \app\api\library\Auth::instance(); $auth->direct($user_id); $token = $auth->getToken();