renderSuccess([ 'user_id' => $model->login($this->request->post()), 'token' => $model->getToken() ]); } /** * 当前用户详情 * @return array * @throws \app\common\exception\BaseException * @throws \think\exception\DbException */ public function detail() { // 当前用户信息 $userInfo = $this->getUser(); return $this->renderSuccess(compact('userInfo')); } }