data-structure.md
16.2 KB
页面数据结构说明
通用
商品信息
{
id: 1,
thumb: 'path/to/goods/img',
url: '',
name: '',
salePrice: 500,
price: 1000,
tags: [
{
is_new: true //NEW
},
{
is_discount: true //SALE
},
{
is_limited: false //限量商品
},
{
is_yohood: // YOHOOD
},
{
is_advance: true //再到着
}
],
is_soon_sold_out: true //即将售罄
}
侧栏导航
{
sideNav:[
{
textCn: '',
textEn: '',
icon: '', //boys,girls,kids,life,new,guang 等图标的url地址
url: '',
//子菜单
subNav: {
list: [
{
textCn: '',
textEn: '',
back: true/false,
isSelect: true/false,
url: ''
},
...
]
}
},
...
]
}
站点头部和尾部
//header
{
pageHeader: {
//页面主题标识
boys: true,
girls: true,
kids: true,
lifeStyle: true,
//对应页面有就传,没有就不传
navBack: true,
navTitle: '',
navHome: ''
}
}
//footer已登录
{
pageFooter: true
}
筛选
{
filter: {
classify: [
{
title: '性别',
default: true/false,
name: '全部性别',
dataType: 'gender', //查询时字段名
subs: [
{
dataId: 0,
name: '全部性别',
chosed: true //是否当前选中
},
...
]
},
{
...
}
]
}
}
首页
{
headerDownload: {
img: '',
url: ''
},
homeHeader: {
bgColor: '',
searchUrl: ''
},
content: [
//banner
{
banner: {
list: [
{
url: '',
img: ''
},
...
]
}
},
//图标入口
{
iconsEnter: {
list: [
{
url: '',
img: '',
text: ''
},
...
]
}
},
//热门分类
{
hotCategory: {
img: '',
url: '',
list: [
{
img: '',
url: '',
textCn: ''
},
...
]
}
},
//热门品牌
{
hotBrands: {
img: '',
url: '',
list: [
{
name: '',
img: '',
url: ''
},
...
]
}
},
//搭配
colloaction: {
name: '潮人 ▪ 搭配',
more: '',
imgs: [
{
img: '',
url: ''
},
...
],
recos: [
{
img: '',
url: ''
},
...
]
},
//话题
topic: {
name: '潮品 ▪ 话题',
more: '',
list: [
{
url: '',
img: '',
title: '',
time: ''
},
...
]
},
//商品分类Block
goodsCategory: {
name: '经典裤装',
more: '',
banner: {
list: [
{
img: '',
url: ''
},
...
]
},
//TODO:与创意生活BLOCK的区别就是下面图片一个是5张一个是6张,是否可以合并成到此处
list: [
{
img: '',
url: '',
textCn: ''
},
...
]
},
//plus+Satr
{
plusStar: {
name: '',
url: '',
img: ''
}
},
//你可能喜欢
{
goods: [
{...}, //商品信息
...
]
}
]
}
逛
资讯(公用)
{
id: 1,
showTags: true/false, //是否显示标签
img: '',
url: '',
title: '',
text: '',
publishTime: '',
pageView: '',
//APP打开显示收藏,WAP打开显示点赞
like: {
isLiked: true,
count: 1
},
collect: {
isCollected: true,
url: ''
},
share: false,
isFashionMan: true, //标签分类:isTip、isCollocation、isFashionMan、isFashionGood、isTopic
author: {
url: '',
avatar: '',
name: ''
}
}
逛首页
{
swiper: [
{
url: '',
img: ''
},
...
],
navs: [
{
typeId: 1,
type: '最新',
focus: true
},
...
],
infos: [
[
{...}, //资讯
...
],
...
]
}
逛列表页
{
infos:
[
{
show: true,
info: [
{...}, //标签
...
]
},
...
]
}
编辑页
{
author: {
avatar: '',
name: '',
info: ''
},
infos: [
{...}, //标签
...
]
}
逛详情页
{
id: '',
author: {
id: 1,
avatar: '',
name: '',
intro: '',
url: ''
},
detail: {
title: '',
publishTime: '',
pageView: 3445,
content: [
{
text: ''
},
{
bigImage: ''
},
{
smallImage: [
{
src: ''
},
{
src: ''
}
]
},
{
//onlyOne
relatedReco: {
id: 1, //必须字段
thumb: '',
name: '',
salePrice: 123,
price: 213,
url: ''
}
//多个
relatedReco: [
{...}, //商品信息
...
]
},
{
collocation: [
{
thumb: '',
type: 'pants',
goods: [
{...}, //商品信息
...
]
},
...
]
}
]
},
relatedBrand: [
{
thumb: '',
name: '',
url: ''
},
...
],
relatedTag: [
{
name: '',
url: ''
},
...
],
relatedInfo: [
{
thumb: '',
squareThumb: true, //是否为方图
title: '',
url: '',
publishTime: ''
},
...
]
}
PLUS+STAR
//列表页
{
ps: {
sName: '',
pName: '',
star: [
{
deps: '',
//情况1:一张图
url: '',
img: '',
//情况2:多张图
imgs: [
{
url: '',
img: ''
},
...
]
}
],
plus: [
...
]
}
}
//详情页
{
ps: {
id: 1,
banner: '',
logo: '',
name: '',
isLike: '',
likeUrl: '',
intro: '',
newArrival: {
moreUrl: '',
naList: [
{...}, //商品信息
...
]
},
infos: [
{...}, //资讯
...
]
}
}
模板页
{
content: [
{
img: {
src: '',
url: ''
}
},
{
text: ''
},
{
recommendation: {
recos: [
{...}, //商品信息
...
]
}
},
{
brands: {
list: [
{
thumb: '',
name: '',
url: ''
},
...
]
}
},
{
goods: {
classify: [
{
type: 'brand',
name: '品牌'
},
...
],
newPatterns: [
{...}, //商品信息
...
]
}
}
]
}
SALE
{
headerBanner: {
list: [
{
url: '',
img: ''
},
...
]
},
saleSection: {
list: [
{
img: '',
url: ''
},
...
]
},
goodsContainer: {
name: '最新降价',
goodsNav: {
newPatterns: true,
price: true,
salesVolume: true,
screen: true
},
goods: [
{...}, //商品信息
...
]
}
}
登录、注册、找回密码
TIP:登录注册找回密码页面body有特有样式,因为数据中需要传一个isPassportPage为body添加一个class
通用头部(包含在每个页面中)
{
backUrl: '', //GO-BACK链接, 不显示则不传
showHeaderImg: true/false, //显示头部图片
headerText: '' //头部标题文字
}
区域列表
[
{
areaCode: '+86', //区号
selected: true/false,
name: '中国'
},
...
]
登录
//登录页
{
account: '', //默认填入的用户名
registerUrl: '', //免费注册地址
aliLoginUrl: '',
weiboLoginUrl: '',
qqLoginUrl: '',
internationalUrl: '',
phoneRetriveUrl: '',
emailRetriveUrl: ''
}
//国际账号登录页
{
countrys: [...], //区域列表
countryCode: '',
phoneNum: ''
}
注册
//注册页
{
countrys: [...], //区域列表
countryCode: '' //默认区号
}
//验证码
{
areaCode: '',
phoneNum: ''
}
//密码页
{
... //仅头部
}
找回密码
//邮箱找回&重置密码
{
... //仅头部
}
//邮箱找回成功
{
goEmail: '',
resendUrl: ''
}
//手机找回
{
countrys: [...],
countryCode: ''
}
//手机找回验证码
{
areaCode: '',
phoneNum: ''
}
分类
{
searchUrl: '',
class: [
{
name: 'BOY',
focus: true, //默认选中
ca: [
{
name: '上衣',
sub: [
{
name: '全部分类',
url: ''
},
...
]
},
...
]
},
...
]
}
搜索
{
hot: [
{
name: '夹克',
url: ''
},
...
],
history: [
{
name: '..',
url: ''
}
]
}
品牌
{
bannerTop: {
list: [
{
url: '',
img: ''
},
...
]
},
hotBrand: {
list: [
{
url: '',
img: '',
name: ''
},
...
]
},
brandList: [
title: '',
list: {
name: '',
url: '',
isHot: true/false,
isNew: true/false
},
...
]
}
商品列表页
{
goodList: {
search: {
default: ''
}, //是否显示搜索栏并指定初始值
brandWay: { //品牌入口
url: '',
thumb: '',
name: ''
},
brandHome: {
id: 0,
banner: ''
intro: '...'
},
new: [
{
... //商品信息
},
...
],
filter: {
.. //筛选数据结构
},
brand: '',
gender: '',
sort: '',
color: '',
size: '',
price: '',
discount: ''
}
}