Authored by xuqi

购物车数据结构

... ... @@ -767,4 +767,111 @@
price: '',
discount: ''
}
}
## 购物车
{
shoppingCart: {
cartNav: true, //显示预售和普通switch导航
commonGoodsCount: 2,
presellGoodsCount: 2, //普通商品和预售商品数目,显示在导航中
showLoginInfo: true, //是否显示登录提示
commonCart: {
goods: [
//购物车商品(见下),
...
],
freebieOrAdvanceBuy: true, //是否显示赠品和加价购
freebie: {
url: '',
count: 2
},
advanceBuy: {
url: '',
count: 1
},
price: 322,
activityPrice: 223, //活动价
count: 8,
sumPrice: 400
},
preSellCart: {
//同普通购物车
...
}
}
}
### 选择尺码、数目、颜色面板
{
thumb: '',
name: '',
price: '',
salePrice: '',
colors: [
{
id: 1,
chosed: true,
name: '黄色'
},
...
],
sizes: [
{
id: 2,
chosed: true,
name: 'X'
},
...
],
num: 2
}
### 购物车商品
{
id: 1,
thumb: '',
name: '',
color: '黄色',
size: 'L',
appearDate: '12月', //上市期
price: 200,
count: 2,
soldOut: true, //售罄
lowStocks: true, //库存不足
}
### 赠品和加价购
{
shoppingCart: {
gift: [
//赠品(见下)
],
//or
advance: [
{
title: '',
goods: [
//加价购商品(见下)
]
}
]
}
}
### 赠品和加价购商品
{
id: 1,
thumb: '',
name: '',
color: '黄色',
size: 'L', //颜色和尺寸需要显示就传,不显示不传
price: 562,
count: 3
}
\ No newline at end of file
... ...