()
| 196 | } |
| 197 | |
| 198 | async 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 | |
| 213 | async function filterGoodList() { |
| 214 | console.log(`⏰ 过滤商品列表,当前共有${allGoodList.length}个商品`) |
no test coverage detected