display(); } /** * 店长列表 */ public function managerList() { $param['merchant_id'] = $this->merchant_id; $param['keyword'] = I('post.keyword'); $param['store_id'] = I('post.store_id'); $param['page'] = I('post.page') ? I('post.page') : 1; $param['limit'] = I('post.limit') ? I('post.limit') : 10; $ManagerClass = new Manager(); $result = $ManagerClass->getManagerList($param); $this->ajaxReturn($result); } /** * 添加店长 */ public function addManager() { $param = I("post."); $param['merchant_id'] = $this->merchant_id; $ManagerClass = new Manager(); $result = $ManagerClass->addStoreManager($param); if ($result['status'] == 1) { //操作日志记录 $source = 0; //请求来源: 0pc系统 1小助手 $type = 3; //平台:1合伙人端 2代理商端 3商户端 4门店端 $request_data = json_encode($param); //请求参数 json数据 $desc = '门店店长新增'; //操作行为描述 action_log($source, $type, $request_data, $desc); } $this->ajaxReturn($result); } /** * 修改店长信息 */ public function editManager() { $param['merchant_id'] = $this->merchant_id; $param['id'] = I('post.id'); $param['real_name'] = I('post.name'); // 名字 $param['mobile_phone'] = I('post.mobile'); // 手机号码 $param['pwd'] = I('post.password'); // 密码 $ManagerClass = new Manager(); $result = $ManagerClass->editStoreManager($param); if ($result['status'] == 1) { //操作日志记录 $source = 0; //请求来源: 0pc系统 1小助手 $type = 3; //平台:1合伙人端 2代理商端 3商户端 4门店端 $request_data = json_encode($_POST); //请求参数 json数据 $desc = '门店店长信息编辑'; //操作行为描述 action_log($source, $type, $request_data, $desc); } $this->ajaxReturn($result); } public function delManager() { $id = I('post.id'); $ManagerClass = new Manager(); $result = $ManagerClass->delStoreManager($id); if ($result['status'] == 1) { //操作日志记录 $source = 0; //请求来源: 0pc系统 1小助手 $type = 3; //平台:1合伙人端 2代理商端 3商户端 4门店端 $request_data = json_encode($_POST); //请求参数 json数据 $desc = '门店店长删除'; //操作行为描述 action_log($source, $type, $request_data, $desc); } $this->ajaxReturn($result); } }