apiDiscount 限時(shí)折扣
單次限時(shí)折扣活動(dòng)標(biāo)簽
功能:獲取單次限時(shí)折扣活動(dòng)數(shù)據(jù)
快速開始(復(fù)制即用)
微信原生版
let that = this;
app.globalData._requestApi(
that,
app.globalData.config.apiIndexUrl,
{
apiDiscount_1: `ekey=1&activeid=1&limit=6`
},
function(res) {
that.setData({
discount_1: res.data.apiDiscount[1]
});
}
);uni-app 版
let that = this;
app.globalData._requestApi(
that,
app.globalData.config.apiIndexUrl,
{
apiDiscount_1: `ekey=1&activeid=1&limit=6`
},
function(res) {
that.discount_1 = res.data.apiDiscount[1];
}
);?? ekey=1 必須對(duì)應(yīng) apiDiscount[1],數(shù)字要一致!
全部參數(shù)
| 參數(shù) | 說明 | 示例 |
|---|---|---|
ekey | 必填,唯一標(biāo)識(shí),數(shù)字必須與返回的 apiDiscount[數(shù)字] 對(duì)應(yīng) | ekey=1 |
activeid | 指定限時(shí)活動(dòng)ID | activeid=1 |
limit | 返回商品數(shù)據(jù)數(shù)量,不傳默認(rèn)為6 | limit=6 |
常用場(chǎng)景(直接復(fù)制)
獲取活動(dòng)1的商品列表:ekey=1&activeid=1&limit=6 獲取活動(dòng)2的商品列表:ekey=2&activeid=2&limit=10
文檔最后更新時(shí)間:2026-01-13 09:48:56
未解決你的問題?請(qǐng)到「問答社區(qū)」反饋你遇到的問題
