<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                正常我們顯示一個文字是這樣的: ``` <a class="btn btn-sm btn-info" href="#" >資源管理</a> ``` 如果我們判斷這個菜單是否有這個權限,用這種方法: ``` <if condition="cmf_auth_check(cmf_get_current_admin_id(),'user/AdminAsset/index')"> <a class="btn btn-sm btn-info" href="#" >資源管理</a> </if> ``` >函數 `cmf_auth_check` ``` /** * 檢查權限 * @param $userId int 要檢查權限的用戶 ID * @param $name string|array 需要驗證的規則列表,支持逗號分隔的權限規則或索引數組 * @param $relation string 如果為 'or' 表示滿足任一條規則即通過驗證;如果為 'and'則表示需滿足所有規則才能通過驗證 * @return boolean 通過驗證返回true;失敗返回false */ function cmf_auth_check($userId, $name = null, $relation = 'or') { if (empty($userId)) { return false; } if ($userId == 1) { return true; } $authObj = new \cmf\lib\Auth(); if (empty($name)) { $request = request(); $module = $request->module(); $controller = $request->controller(); $action = $request->action(); $name = strtolower($module . "/" . $controller . "/" . $action); } return $authObj->check($userId, $name, $relation); }
                  <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>

                              哎呀哎呀视频在线观看