1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: http://demo.thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\store\controller;
- use library\Controller;
- /**
- * 会员信息管理
- * Class Member
- * @package app\store\controller
- */
- class Member extends Controller
- {
- /**
- * 绑定数据表
- * @var string
- */
- protected $table = 'StoreMember';
- /**
- * 会员信息管理
- * @auth true
- * @menu true
- * @throws \think\Exception
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- * @throws \think\exception\PDOException
- */
- public function index()
- {
- $this->title = '会员信息管理';
- $query = $this->_query($this->table)->where('is_deleted',0)->like('nickname,phone');
- $query->dateBetween('create_at')->order('id desc')->page();
- }
- /**
- * 数据列表处理
- * @param array $data
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- */
- protected function _index_page_filter(&$data)
- {
- foreach ($data as $k=>&$v){
- }
- }
- //删除货主
- public function remove()
- {
- $this->_save($this->table, ['is_deleted' => '1']);
- }
- //禁用货主
- public function forbid()
- {
- $this->_save($this->table, ['status' => '0']);
- }
- //启用货主
- public function resume()
- {
- $this->_save($this->table, ['status' => '1']);
- }
- }
|