display(); } /** * 获取角色列表 */ public function getRoles() { $Role = new Role(); $this->ajaxReturn($Role->getRoleList([ 'operator_id' => $this->login_user['id'], 'user_type' => 2, 'page' => I('post.page'), 'limit' => I('post.limit'), 'keyword' => I('post.keyword'), ])); } /** * 修改开启关闭状态 */ public function changeStatus() { $Role = new Role(); $this->ajaxReturn($Role->changeCustomerRoleStatus([ 'id' => I('post.id'), 'operator_id' => $this->login_user['id'], 'user_type' => 2, 'source' => 0, ])); } /** * 角色删除 */ public function rolesDel() { $Role = new Role(); $this->ajaxReturn($Role->delCustomerRole([ 'id' => I('post.id'), 'operator_id' => $this->login_user['id'], 'user_type' => 2, 'source' => 0, ])); } /** * 角色添加页面 */ public function rolesAdd() { $this->display(); } /** * 获取权限列表 */ public function getAllJurList() { $Role = new Role(); $this->ajaxReturn($Role->getRole([ 'operate_type' => 1, 'operator_id' => $this->login_user['id'], 'group_id' => $this->login_user['jurisdiction_group_id'], 'next_user_type' => $this->login_user['login_type'], 'next_id' => I('post.group_id'), ])); } /** * 角色添加 */ public function rolesAddAjax() { $Role = new Role(); $this->ajaxReturn($Role->setRole([ 'operate_type' => 1, 'operator_id' => $this->login_user['id'], 'group_id' => $this->login_user['jurisdiction_group_id'], 'next_user_type' => $this->login_user['login_type'], 'next_id' => I('post.group_id'), 'role_name' => I('post.role_name'), 'status' => I('post.status'), 'checkIds' => I('post.checkIds'), ])); } /** * 获取商户菜单栏权限 */ public function getMerchantRole() { $Role = new Role(); $this->ajaxReturn($Role->getRole([ 'operate_type' => 2, 'operator_id' => $this->login_user['id'], 'next_user_type' => 3, 'next_id' => I('post.merchant_id'), ])); } /** * 保存商户菜单栏权限 */ public function setMerchantRole() { $Role = new Role(); $this->ajaxReturn($Role->setRole([ 'operate_type' => 2, 'operator_id' => $this->login_user['id'], 'next_user_type' => 3, 'next_id' => I('post.merchant_id'), 'checkIds' => I('post.checkIds'), ])); } /** * 获取商户权限操作记录 */ public function getRoleRecord() { $Role = new Role(); $this->ajaxReturn($Role->getRoleRecord([ 'operator_user_id' => I('post.operator_id'), 'operate_type' => 2, 'operator_id' => $this->login_user['id'], 'next_user_type' => 3, 'next_id' => I('post.merchant_id'), 'page' => I('post.page'), 'limit' => I('post.limit'), ])); } /** * 获取操作者列表-供选择 */ public function getOperatorList() { $Role = new Role(); $this->ajaxReturn($Role->getOperatorList([ 'user_id' => $this->login_user['id'], 'user_type' => $this->login_user['user_type'], 'first_pid' => $this->login_user['first_pid'], ])); } /** * 重置商户权限为初始状态 */ public function resetUserRole() { $Role = new Role(); $this->ajaxReturn($Role->resetUserRole([ 'operator_id' => $this->login_user['id'], 'next_id' => I('post.merchant_id'), 'next_user_type' => 3, ])); } }