user = $this->getUser(); // VIP专区用户信息 $this->vipUser = VipUserModel::detail($this->user['user_id']); } /** * VIP专区订单列表 */ public function lists($type = -1) { if (!$this->vipUser) { return $this->renderError('您还不是VIP用户'); } $model = new VipOrderModel; return $this->renderSuccess('', [ 'list' => $model->getList($this->vipUser['user_id'], (int)$type, $this->postData()), ]); } /** * VIP专区订单统计 */ public function statistics() { if (!$this->vipUser) { return $this->renderError('您还不是VIP用户'); } $statistics = VipOrderModel::getStatistics($this->vipUser['user_id']); return $this->renderSuccess('', $statistics); } }