product.md
8.65 KB
商品相关数据结构
商品详情页
{
detail: {
banner: {
brandId: '',
bgColor: '',
bgImg: '',
brandName: '',
homeUrl: '',
logo: '',
coled: true/false
},
pathNav: ...
goodsInfo: {
skn: '',
productId: '',
tags: [
{
isNew: true
},
{
isReNew: true
},
...
],
img: '',
colors: [
{
focus: true,
disable: true,
name: '黑色',
total: 1, //当前颜色包含的所有尺码的数目
thumbs: [
{
url: '',
img: '',
shower: ''
},
...
],
title: '',
src: '',
size: [
{
sku: '',
title: '',
num: 10, //Number
name: 'XL'
},
...
]
},
...
],
name: '',
saleTip: '跳楼大甩卖',
virtualGoods: true, //虚拟商品,虚拟商品的num全部置为1
brandUrl: '',
brandName: '',
marketPrice: 1099,
hasOtherPrice: true, //非市场价出售的情况
//促销价
salePrice: 999,
//预售价
presalePrice: 1111,
arrivalDate: '3月',
//先行价
advancePrice: 123,
vipPrice: {
unLogin: 'url/to/login/page', //情况1:未登录
normalUser: true, //情况2:普通会员
//情况3:会员
prices: [
{
name: '银卡会员',
cur: true,
price: 200
},
...
],
vipSchedualUrl: '', //登录情况下查看vip进度
},
activity: [
{
activityImg: '',
url: ''
},
{
type: '加价购',
des: ''
},
...
],
//潮流尖货限购码
fashionTopGoods: {
getLimitedCode: true, //获取限购码
getLimitedCodeDis: true, //获取限购码不可点
hadLimitedCode: true, //已获取限购码
limitedCodeSoldOut: true, //限购码已抢光
},
//按钮
//1.立即购买按钮
buyNow: true,
buyNowDis: tue,//立即购买按钮状态<潮流尖货>
//2.即将开售
openSoon: true,
openSoonDis: true, //即将开售按钮状态<潮流尖货>
//3.非卖品
notForSale: true,
//4.添加到购物车
addToCart: true,
//与按钮互斥:售罄
soldOut: true, //当前颜色下所有尺码均已售罄则为true
isCollect: true, //是否已收藏商品
goCartUrl: '',
//分享
shareImg: '',
shareDesc: '',
weixinUrl: ''
},
sizeTitleJson: '',
description: {
basic: [
{
key: '',
value: '',
dColor: true
},
...
],
comfort: [
{
name: '',
minDes: '',
blocks: [
{
cur: true
},
{
},
...
],
maxDes: ''
},
...
]
},
material: {
materialDetail: [
{
img: '',
name: '',
enName: '',
text: ''
},
...
],
wash: [
{
img: '',
name: ''
},
...
]
},
size: {
thead: [
'吊牌尺码',
...
],
tbody: [
[
'X', ''...
],
...
],
sizeImg: ''
},
reference: {
thead: [
//第一列为头像
{
name: ''
},
//模特
{
modelCol: true,
name: '模特'
}
'',
...,
{
remarkCol: true,
name: '备注'
}
],
tbody: [
[
'path/to/avatar', '',...
],
...
]
},
modelCards: [
{
url: '',
size: ''
},
...
],
fittingReport: {
//试穿报告情况1
thead: ['xx', 'xx'],
tbody: [
['xx', 'xx']
]
//试穿报告情况2
frImg: ''
},
details: '富文本.商品热点按照对应HTML结构传',
consultComment: {
comments: [
{
avatar: '',
userName: '',
color: '',
size: '',
date: '',
comment: ''
},
...
],
hasMoreComments: true,
commentUrl: '',
consults: [
{
avatar: '',
question: '',
date: '',
answer: ''
},
...
],
hasMoreConsults: true
},
latestWalk: 5
}
}
商品详情页热点区域HTML结构规范
说明:
- 需要加热点的区域用
hot-point-wrap
包裹 - 热点区域需要传尺寸和位置
- class="pointer"中写热点需序号1,2,3...
- class="hp-good"中就是商品信息:跳转链接,图片,以及以富文本形式表现的右侧内容(除查看按钮,查看按钮单独样式控制)
<div class="hot-point-wrap">
<div class="hot-point" style="width:100px;height:100px;top:211px;left:450px;">
<span class="pointer">1</span>
<div class="hp-good">
<a href="">
<img class="pic" src="">
</a>
<div class="info">
<strong>Life·After Life 牛角扣夹棉连帽大衣(M51款)【吴亦凡亲身试着】</strong>
<br>
<del>原价:344</del>
<br>
现价:¥333
<a class="check-btn" href="">查看</a>
</div>
</div>
</div>
</div>