<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                本節說明欄目的最終方法get_sort 我們之前講的一系列fun函數調用欄目的方法都是基于`get_sort`這個公共方法而來 我們來看下這個函數的具體參數 ![](https://img.kancloud.cn/17/60/1760d973e755a8ef79e76697e4edbcb2_700x72.png) 這個方法有四個參數: id:也就是欄目id,經常見到的fid就是此id `field:`字段,欄目對應的相關字段,包括自定義字段,以及第三項相同的`father、son`等特殊的類型參數, ????????????還有一個特殊的參數` 'config' `傳遞這個參數,可以獲取到所有配置 type:調用參數,比如`father,son,brother`等,之前的fun函數就是基于這個參數包裝而來 `sys_type`:模塊關鍵字,如cms、shop等 基于這四個參數,可以摘取不同的欄目數據,從而實現不同的效果 比如調用所有欄目,也就是id=0并傳遞一個config的時候,我們得到的結果即是所有欄目,和所有配置 ![](https://img.kancloud.cn/46/6f/466fc9b4102c4e72d7d5ab39b1f0aced_685x186.png) 顯示: ![](https://img.kancloud.cn/5a/84/5a84d8bf803dafe284fb68fb2b96b62c_421x518.png) 如果我們需要調用某個欄目的具體字段,那么就直接使用這個方法,冒號加方法,不需要在做volist循環 比如 ![](https://img.kancloud.cn/53/9e/539e2d91855fa73d195bc5d68042abbc_434x126.png) 顯示: ![](https://img.kancloud.cn/63/c7/63c7dcec9b6a2be974db6dc07c36baeb_258x116.png) 用到`farther、son、brother`這些參數的時候,直接使用fun包裝好的方法即可。 其他的基于四個參數,可以自由組合,大家需要自己測試才能體會,總之欄目的處理就是依賴這個公共函數而來 還有一個輔助方法:`sort_config` ![](https://img.kancloud.cn/8a/f8/8af80e3676fad108d60e992961843826_681x58.png) 這個一般是在子循環中取欄目的配置字段,比較好用 第一個參數 `sys_type`? 和上面一樣,模塊關鍵字 第二個參數 `pid`? 父欄目`id`,一般不設置,或者設置0,如果設置了,就只能取這個設置的pid父id下在子欄目數據 第三個參數獲取具體字段,一般默認取欄目名即可,取其他字段數據,就設置對應的字段名,設置`true`則取全部字段 可能大家對第二個參數不是很清楚,一般設置0就是取頂級欄目,而設置具體數字則取這個數子下的子欄目數據 這里舉個例子,取某pid下的子欄目數據 ![](https://img.kancloud.cn/d4/26/d426c4603174d9bc42b358e4be974c2a_514x406.png) 我們設置一個pid為9,取他下面的子欄目數據 ![](https://img.kancloud.cn/54/89/5489f9c9a62ba3058e50f40e730e34cf_670x163.png) 顯示: ![](https://img.kancloud.cn/13/af/13affcea2220e570e53e2745b8be0443_255x171.png) 所以這個一般用在子循環里比較多,根據數組key來取某個欄目下的子欄目數據配置
                  <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>

                              哎呀哎呀视频在线观看