会员级别与会员权益修改
This commit is contained in:
@@ -32,4 +32,28 @@ class Rights extends Backend
|
|||||||
$this->view->assign('join_config', $this->join_config_model->getSimpleByStatus());
|
$this->view->assign('join_config', $this->join_config_model->getSimpleByStatus());
|
||||||
$this->searchFields = ['title'];
|
$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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input type="hidden" name="row[level_id]" value="{$Think.get.level_id}">
|
||||||
<button type="submit" class="btn btn-primary btn-embossed disabled">确认</button>
|
<button type="submit" class="btn btn-primary btn-embossed disabled">确认</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input type="hidden" name="row[level_id]" value="{$Think.get.level_id|htmlentities}">
|
||||||
<button type="submit" class="btn btn-primary btn-embossed disabled">确认</button>
|
<button type="submit" class="btn btn-primary btn-embossed disabled">确认</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<div class="tab-pane fade active in" id="one">
|
<div class="tab-pane fade active in" id="one">
|
||||||
<div class="widget-body no-padding">
|
<div class="widget-body no-padding">
|
||||||
<div id="toolbar" class="toolbar">
|
<div id="toolbar" class="toolbar">
|
||||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" data-level_id="{$Think.get.level_id}"><i class="fa fa-refresh"></i> </a>
|
||||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('wdsxh/member/rights/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('wdsxh/member/rights/add')?'':'hide'}" title="{:__('Add')}" data-level_id="{$Think.get.level_id}"><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('wdsxh/member/rights/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('wdsxh/member/rights/edit')?'':'hide'}" title="{:__('Edit')}" data-level_id="{$Think.get.level_id}"><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||||
</div>
|
</div>
|
||||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||||
data-operate-edit="{:$auth->check('wdsxh/member/rights/edit')}"
|
data-operate-edit="{:$auth->check('wdsxh/member/rights/edit')}"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
// 绑定点击事件
|
// 绑定点击事件
|
||||||
jumpBtn.onclick = (function(id) {
|
jumpBtn.onclick = (function(id) {
|
||||||
return function() {
|
return function() {
|
||||||
window.location.href = 'rights?id=' + id;
|
window.location.href = 'rights?level_id=' + id;
|
||||||
};
|
};
|
||||||
})(rowData.id);
|
})(rowData.id);
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ define(["jquery", "bootstrap", "backend", "table", "form"], function (
|
|||||||
Table.api.init({
|
Table.api.init({
|
||||||
extend: {
|
extend: {
|
||||||
index_url: "wdsxh/member/rights/index" + location.search,
|
index_url: "wdsxh/member/rights/index" + location.search,
|
||||||
add_url: "wdsxh/member/rights/add",
|
add_url: "wdsxh/member/rights/add" + location.search,
|
||||||
edit_url: "wdsxh/member/rights/edit",
|
edit_url: "wdsxh/member/rights/edit" + location.search,
|
||||||
del_url: "wdsxh/member/rights/del",
|
del_url: "wdsxh/member/rights/del",
|
||||||
table: "wdsxh_member_rights",
|
table: "wdsxh_member_rights",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user