123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php
- namespace app\store\controller;
- use library\Controller;
- class ConsultCate extends Controller
- {
-
- protected $table = 'StoreConsultCate';
-
- 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);
- }
- }
|