MCPcopy Create free account
hub / github.com/Semporia/Scripts / getGoodList

Function getGoodList

jd_try.js:198–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

196}
197
198async function getGoodList() {
199 if (args.cidsList.length === 0) args.cidsList.push("全部商品")
200 if (args.typeList.length === 0) args.typeList.push("全部试用")
201 for (let cidsKey of args.cidsList) {
202 for (let typeKey of args.typeList) {
203 if (!cidsMap.hasOwnProperty(cidsKey) || !typeMap.hasOwnProperty(typeKey)) continue
204 console.log(`⏰ 获取 ${cidsKey} ${typeKey} 商品列表`)
205 $.totalPages = 1
206 for (let page = 1; page <= $.totalPages; page++) {
207 await getGoodListByCond(cidsMap[cidsKey], page, args.pageSize, typeMap[typeKey], '0')
208 }
209 }
210 }
211}
212
213async function filterGoodList() {
214 console.log(`⏰ 过滤商品列表,当前共有${allGoodList.length}个商品`)

Callers 1

jd_try.jsFile · 0.70

Calls 2

getGoodListByCondFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected