| // +------------------------------------------------+ namespace app\system\controller; use app\common\model\VipOrder; class Vip extends _Init { public function index($title = '', $type = '') { $model = new VipOrder(); $model->alias('VipOrder'); $map = []; if (!empty($title)) { $model = $model->hasWhere('user', ['nickname' => ['like', "%$title%"]]); } if ($type) { $map['VipOrder.type'] = $type; } $this->list = $model->where($map)->order('create_time desc')->paginate(); return $this->fetch(''); } public function info($id) { $this->list = VipOrder::where('uid', $id)->paginate(); return $this->fetch(''); } }