user = $this->getUser(); // VIP用户信息 $this->vip = VipUserModel::detail($this->user['user_id']); } /** * 团队列表 */ public function lists() { // 判断用户是否是VIP if (!$this->vip || $this->vip['is_delete']) { return $this->renderError('您不是VIP用户'); } // 获取团队成员列表 $model = new VipRefereeModel(); $team_list = $model->getList($this->user['user_id']); return $this->renderSuccess('', compact('team_list')); } /** * 团队统计信息 */ public function statistics() { // 判断用户是否是VIP if (!$this->vip || $this->vip['is_delete']) { return $this->renderError('您不是VIP用户'); } // 获取团队统计信息 $statistics = VipRefereeModel::getStatistics($this->user['user_id']); return $this->renderSuccess('', compact('statistics')); } }