会员级别与会员权益修改
This commit is contained in:
@@ -32,4 +32,28 @@ class Rights extends Backend
|
||||
$this->view->assign('join_config', $this->join_config_model->getSimpleByStatus());
|
||||
$this->searchFields = ['title'];
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
$level_id = $this->request->get('level_id');
|
||||
if (false === $this->request->isAjax()) {
|
||||
return $this->view->fetch();
|
||||
}
|
||||
//如果发送的来源是 Selectpage,则转发到 Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
|
||||
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
||||
$list = $this->model
|
||||
->where(function($query) use($level_id) {
|
||||
$query->where('level_id', $level_id);
|
||||
})
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
$result = ['total' => $list->total(), 'rows' => $list->items()];
|
||||
return json($result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user