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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                本章節介紹使用框架時,如何進行路由權限的處理。 **注意:框架中針對路由做了處理,如果要跳轉的這個路由存在子路由,那么將自動跳轉至該子路由下。如果嵌套多層,將依次遞歸下去,直至處理完畢。** <br/> ``` import JBoot from 'jboot-env'; //引入框架 import 'jboot-env/dist/loading.css'; //引入loading樣式 const routerTable = [ { name: 'index', path: 'index', component: require('./index.vue'), meta: {permissionCode: 'index', title: '首頁', ...} //permissionCode就是權限編碼,要全局唯一!存在此值時,才會調用校驗方法! }, ... ]; const responsePermissionCodes = ['index', 'list']; //初始化框架 const jboot = new JBoot(function(options) { //此處進行一些配置 options.http(httpConfig => { httpConfig .table(routerTable) //配置路由表 .check(function (permissionCode, to, callback){ //permissionCode:為路由meta信息中聲明的值。to:為將要去往哪個頁面。 //1.callback的值false類型時,則代表無頁面權限,將跳轉至401頁面。 //2.callback的值為string類型時,則會跳轉到路由表中,name為該值的頁面。 //3.callback不傳值時,則默認跳轉至to屬性代表的頁面。 //如果服務端返回的權限code結果集中,包含本次要訪問的頁面權限code,則允許訪問。 if(responsePermissionCodes.includes(permissionCode)){ callback(); }else{ callback('/login'); //如果沒權限,則跳轉至login頁面。 } }); }).build(); //必須在末尾添加.build。.build之后則默認框架配置完成。 }); ```
                  <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>

                              哎呀哎呀视频在线观看