12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- namespace app\store\controller;
- use library\Controller;
- class GoodsCate extends Controller
- {
-
- protected $table = 'StoreGoodsCate';
-
- public function index()
- {
- $this->title = '商品分类管理';
- $query = $this->_query($this->table)->like('title')->equal('status');
- $query->where(['is_deleted' => '0'])->order('sort desc,id desc')->page();
- }
-
- public function add()
- {
- $this->title = '添加商品分类';
- $this->_form($this->table, 'form');
- }
-
- public function edit()
- {
- $this->title = '编辑商品分类';
- $this->_form($this->table, 'form');
- }
-
- public function forbid()
- {
- $this->_save($this->table, ['status' => '0']);
- }
-
- public function resume()
- {
- $this->_save($this->table, ['status' => '1']);
- }
-
- public function remove()
- {
- $this->_delete($this->table);
- }
- }
|