promotion.js 615 B

1234567891011121314151617181920
  1. import { getGoodsList } from './goods';
  2. export function getPromotion(baseID = 0, length = 10) {
  3. return {
  4. list: getGoodsList(baseID, length).map((item) => {
  5. return {
  6. spuId: item.spuId,
  7. thumb: item.primaryImage,
  8. title: item.title,
  9. price: item.minSalePrice,
  10. originPrice: item.maxLinePrice,
  11. tags: item.spuTagList.map((tag) => ({ title: tag.title })),
  12. };
  13. }),
  14. banner: 'https://tdesign.gtimg.com/miniprogram/template/retail/promotion/banner-promotion.png',
  15. time: 1000 * 60 * 60 * 20,
  16. showBannerDesc: true,
  17. statusTag: 'running',
  18. };
  19. }