|
@@ -44,11 +44,7 @@ class MemberLev extends Controller
|
|
|
*/
|
|
|
protected function _index_page_filter(&$data)
|
|
|
{
|
|
|
- foreach ($data as $k=>&$v){
|
|
|
- $v['children'] = Db::table('store_goods_cate')->where(['pid'=>$v['id'],'is_deleted'=>0])
|
|
|
- ->order('status desc ,sort desc , id desc')
|
|
|
- ->select();
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -66,7 +62,6 @@ class MemberLev extends Controller
|
|
|
public function add()
|
|
|
{
|
|
|
$this->title = '添加等级';
|
|
|
- $this->all_cate = Db::table('store_goods_cate')->field('id,title')->where('is_deleted',0)->select();
|
|
|
$this->_form($this->table, 'form');
|
|
|
}
|
|
|
|
|
@@ -88,30 +83,6 @@ class MemberLev extends Controller
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 禁用
|
|
|
- * @auth true
|
|
|
- * @menu true
|
|
|
- * @throws \think\Exception
|
|
|
- * @throws \think\exception\PDOException
|
|
|
- */
|
|
|
- public function forbidden()
|
|
|
- {
|
|
|
- $this->_save($this->table, ['status' => '0']);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 启用
|
|
|
- * @auth true
|
|
|
- * @menu true
|
|
|
- * @throws \think\Exception
|
|
|
- * @throws \think\exception\PDOException
|
|
|
- */
|
|
|
- public function enable()
|
|
|
- {
|
|
|
- $this->_save($this->table, ['status' => 1]);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 删除
|
|
|
* @auth true
|
|
|
* @menu true
|
|
@@ -132,14 +103,7 @@ class MemberLev extends Controller
|
|
|
*/
|
|
|
protected function _form_filter(&$data)
|
|
|
{
|
|
|
- if ($this->request->isPost()) {
|
|
|
- if(!isset($data['id'])){
|
|
|
|
|
|
- }
|
|
|
- }else{
|
|
|
- $this->pid = input('pid',0);
|
|
|
- $this->pname = Db::table('store_goods_cate')->where(['id'=>$this->pid])->value('title');
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
}
|