Blame view

member-miniapp/packageMall/data/products.js 3.47 KB
5c34676a   “wangming”   对会员端进行了设计
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
  const productImages = [
    require('../static/images/products/product-01.png'),
    require('../static/images/products/product-02.png'),
    require('../static/images/products/product-03.png'),
    require('../static/images/products/product-04.png'),
    require('../static/images/products/product-05.png'),
    require('../static/images/products/product-06.png'),
    require('../static/images/products/product-07.png'),
    require('../static/images/products/product-08.png'),
    require('../static/images/products/product-09.png'),
    require('../static/images/products/product-10.png'),
    require('../static/images/products/product-11.png'),
    require('../static/images/products/product-12.png'),
    require('../static/images/products/product-13.png'),
    require('../static/images/products/product-14.png'),
    require('../static/images/products/product-15.png'),
    require('../static/images/products/product-16.png')
  ]
  
  const names = [
    '鱼子奢护紧致精华',
    '雪绒舒缓洁颜蜜',
    'SPA 芳香热石礼盒',
    '胶原水光睡眠面膜',
    '肌源平衡身体乳',
    '院线级焕肤安瓶 7 支装',
    '松露焕亮精华乳',
    '微晶净澈洁颜霜',
    '玫瑰舒缓保湿喷雾',
    '琥珀精油香氛蜡片',
    '丝绒修护颈膜套组',
    '海盐疗愈身体磨砂',
    '时光密集修护晚霜',
    '云感蓬润面膜礼盒',
    '月见草安肤精华油',
    '白茶净润洗护组合'
  ]
  const coverTitles = [
    '焕亮细腻肤感',
    '温柔净澈不拔干',
    '把门店里的放松感带回家',
    '夜间补水修护',
    '轻盈保湿丝绒触感',
    '细腻透亮进阶护理',
    '像晨间护肤一样轻盈',
    '让肌肤慢下来呼吸',
    '把香气留在日常里',
    '从清洁到修护更完整'
  ]
  const badgePool = ['热销推荐', '新品上架', '门店同款', '会员偏爱', '礼赠之选', '敏感肌适用']
  const tagPool = [
    ['紧致', '修护'],
    ['舒缓', '洁面'],
    ['礼盒', '香氛'],
    ['补水', '夜间'],
    ['滋养', '润体'],
    ['焕肤', '精华'],
    ['透亮', '日常'],
    ['身体', 'SPA']
  ]
  const categoryPool = [
    ['推荐', '新品', '面部护理'],
    ['推荐', '面部护理'],
    ['推荐', '香氛好物'],
    ['推荐', '身体护理'],
    ['推荐', '新品', '身体护理'],
    ['推荐', '新品', '香氛好物']
  ]
  const descriptions = [
    '以细腻包裹感提升面部光泽,适合作为门店护理后的日常修护延续。',
    '温和洁净配方,洗后不紧绷,适合偏敏与换季阶段的肌肤状态。',
    '用热石与香气把门店里的放松体验带回家,适合礼赠与自用。',
    '夜间密集补水,肤感柔软轻盈,让第二天的状态更稳定透亮。'
  ]
  
  export const products = names.map((name, i) => {
    const price = 199 + ((i * 73) % 8) * 80 + (i % 3) * 20
    const sales = 68 + ((i * 97) % 360)
    const height = 320 + ((i * 37) % 130)
    return {
      id: i + 1,
      name,
      badge: badgePool[i % badgePool.length],
      coverTitle: coverTitles[i % coverTitles.length],
      tags: tagPool[i % tagPool.length],
      categories: categoryPool[i % categoryPool.length],
      price,
      sales,
      height,
      image: productImages[i],
      coverStyle: `height:${height}rpx;background:rgba(245,248,245,0.96);`,
      desc: descriptions[i % descriptions.length],
      detail: '延续门店护理的柔和触感,以轻奢而克制的方式完成居家修护。',
      specs: ['30ml / 50ml 可选', '适合日常护理', '建议早晚使用']
    }
  })
  
  export const findProductById = id => products.find(item => String(item.id) === String(id)) || products[0]