auth->getUser();//登录用户 if($user)$user_id = $user['id']; if(!$user_id) $this->error(__('请登录')); $this->success('请求成功',$user); } }