code: public function editAuth(Request $request)
      {
          $group_id = $request->param('group_id');
          if (empty($group_id)) {
              return $this->error('群组ID为空');
          }
          
          $group_logic = MemberGroupLogic::instance();
          if ($request->isPost()) {
              
              $group_menus = $request->param('group_menus/a');
              if (empty($group_menus) || count($group_menus) == 0) {
                  return $this->error('权限菜单为空');
              }
              
              // 保存权限
              $data = [
                  'group_menus' => implode(',', $group_menus)
              ];
              $group_logic->model->saveById($data, $group_id);
              
              return $this->success('保存权限成功', Url::build('memberGroup/index'));
          } else {
              
              $this->site_title = '编辑权限';
              $this->assign('group_id', $group_id);
              
              // 群组菜单
              $group_menus = $group_logic->getGroupMenu($group_id);
              $this->assign('group_menus', $group_menus);
              
              // 菜单树
              $menu_tree = MenuLogic::instance()->getMenuTree();
              $this->assign('menu_tree', $menu_tree);
              
              return $this->fetch();
          }
      }
docs: 编辑权限
  
  @param Request $request
  @return mixed