<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## 代碼 ``` <?php namespace app\agent\controller; use think\Controller; use think\Db; class RbacController extends Controller { /** * 角色授權提交 */ public function authorizePost() { if ($this->request->isPost()) { $roleId = $this->request->param("roleId", 0, 'intval'); if (!$roleId) { $this->error("需要授權的角色不存在!"); } if (is_array($this->request->param('menuId/a')) && count($this->request->param('menuId/a')) > 0) { //先刪除后插入 Db::name("authAccess")->where(["role_id" => $roleId, 'type' => 'admin_url'])->delete(); foreach ($_POST['menuId'] as $menuId) { $menu = Db::name("adminMenu")->where(["id" => $menuId])->field("app,controller,action")->find(); if ($menu) { $app = $menu['app']; $model = $menu['controller']; $action = $menu['action']; $name = strtolower("$app/$model/$action"); Db::name("authAccess")->insert(["role_id" => $roleId, "rule_name" => $name, 'type' => 'admin_url']); } } $this->success("授權成功!"); } else { //當沒有數據時,清除當前角色授權 Db::name("authAccess")->where(["role_id" => $roleId])->delete(); $this->error("沒有接收到數據,執行清除授權成功!"); } } } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看