午夜91福利视频,午夜成人在线观看,午夜在线视频免费观看,午夜福利短视频,精品午夜成人免费视频APP

apiChannel 欄目列表

apiChannel 欄目列表

獲取欄目列表數據。

快速開始(復制即用)

微信原生版

let that = this;

app.globalData._requestApi(
    that,
    app.globalData.config.apiIndexUrl,
    {
        apiChannel_1: `ekey=1&type=sonself&currentstyle=active&showalltext=on`
    },
    function(res) {
        that.setData({
            channel_1: res.data.apiChannel[1].data
        });
    }
);
<view wx:for="{{channel_1}}" wx:key="id">
    <text>{{item.typename}}</text>
</view>

uni-app 版

let that = this;
app.globalData._requestApi(
    that,
    app.globalData.config.apiIndexUrl,
    {
        apiChannel_1: `ekey=1&type=sonself&currentstyle=active&showalltext=on`
    },
    function(res) {
        that.channel_1 = res.data.apiChannel[1].data;
    }
);
<view v-for="item in channel_1" :key="item.id">
    <text>{{item.typename}}</text>
</view>

?? ekey=1 必須對應 apiChannel[1],數字要一致!


全部參數

基礎參數

參數說明示例
ekey必填,唯一標識,數字必須與返回的 apiChannel[數字] 對應ekey=1
typeid欄目ID(0表示頂級欄目)typeid=0
channelid模型ID  在文檔列表頁使用時可以此參數可以不用拼接urlchannelid=1
limit'起始ID,記錄數'(起始ID從0開始)表示限定的記錄范圍(如:limit='1,2' 表示從ID為1的記錄開始,取2條記錄)limit=0,10
currentstyle應用樣式class類名currentstyle=active
showalltexton或者off,等于on時效果如下,返回一個全部,等于off則不返回'全部'showalltext=on

image.png

type 可選值:

  • son - 表示下級欄目
  • self - 表示同級欄目
  • top - 表示頂級欄目
  • sonself - 表示當前下級欄目以及同級欄目
  • first - 表示當前欄目ID的最頂級欄目下的第一級全部欄目

常用場景(直接復制)

頂級欄目列表:ekey=1&typeid=1&limit=0,10
指定模型欄目:ekey=1&channelid=1&limit=0,5
帶全部選項:ekey=1&typeid=0&showalltext=on

底層字段: 查閱易優數據字典,表名 ey_arctype

(注:在沒(mei)有(you)(you)指定typeid的情況下(xia),type標記與模板的環境有(you)(you)關,如:模板生成(cheng)到欄目(mu)一,那么type='son'就表示(shi)欄目(mu)一的所有(you)(you)子欄目(mu))

文檔最后更新時間:2026-01-08 16:32:57

文檔
目錄

深色
模式(shi)

切換
寬(kuan)度