Authored by xuqi

good detail data structure

... ... @@ -683,6 +683,265 @@
}
}
### 热销排行
{
hotrankPage: true, //引用hotrank.js
hotrank: [
{
slide: {
//大图列表
list: [
{
'href': '',
'img': ''
},
...
]
}
},
{
popular: { //人气单品
name: '', //楼层标题
list: [
{
href: '', //链接
img: '', //图片
title: '', //商品名称
price: '', //商品原价
sPrice: '', //商品现价
rank: '' //排行
}
...
]
}
}
{
hotBrands: { //同上logo品牌 ajax数据
name: '' //楼层标题
}
},
{
hotWeek: { //一周热卖
name: '' //楼层标题
nav: [ //一周热卖导航
{
textCn' => 'TOP100', //导航名称
'url' => '',
'sid' => 1 //对应ajax发送id
}
],
list: [ //同上面商品数据
{
...
}
...
]
}
}
]
}
### 商品详情页
{
detail: {
banner: {
bgColor: '',
bgImg: '',
homeUrl: '',
logo: '',
coled: true
},
pathNav: [...],
goodInfo: {
skn: '',
tags: [
{
isNew: true
},
{
isReNew: true
},
{
isSale: true
},
{
isNewFestival: true
},
{
isLimit: true
},
{
isYearEndPromotion: true
},
{
isYearMidPromotion: true
},
{
isFew: true
}
],
img: '',
name: '',
brandUrl: '',
brandName: '',
marketPrice: 999,
salePrice: 777,
activity: [
{
url: '',
activityImg: ''
},
{
type: '加价购',
des: ''
},
...
],
colors: [
{
focus: true,
disable: true,
title: '',
src: '',
thumbs: [
{
url: '',
img: '', //左侧缩略图
shower: '' //缩略图的大图显示
},
...
],
size: [
{
skn: '',
title: '',
name: ''
num: 20
}
]
}
],
coled: true,
goCartUrl: '' //去购物车结算
},
description: {
basic: [
{
key: '材质',
value: 'xxx'
},
...
],
comfort: [
{
name: '硬度',
minDes: '软',
blocks: [
{
cur: true
},
//n个等级
...
],
maxDes: ''
},
...
]
},
material: {
detail: [
{
img: '',
name: '',
enName: '',
text: ''
},
...
],
wash: [
{
img: '',
name: ''
},
...
]
},
size: {
thead: [
{
width: '130',
name: ''
},
...
],
tbody: [
[
... //每行数据
],
...
],
sizeImg: ''
},
reference: [
thead: [
{
width: '',
name: ''
},
...
],
tbody: [
[
'header-img-url', .., ..
],
...
]
],
details: '', //html
consultComment: {
consultNum: 0,
commentNum: 2,
comments: [
{
avatar: '',
userName: '',
color: '',
size: '',
date: '',
comment: ''
},
...
],
hasMoreComments: true,
commentUrl: '',
consults: [
{
avatar: '',
question: '',
date: '',
answer: ''
}
],
hasMoreConsults: true
},
recentView: [
{
url: '',
img: '',
name: '',
marketPrice: '',
salePrice: ''
},
...
]
}
}
## 逛
### 【公用】资讯
... ... @@ -930,64 +1189,4 @@
coverHref' => '/passport', //右侧封面跳转链接
coverImg' => '##', //右侧封面地址
}
}
## Product
### 热销排行
{
hotrankPage: true, //引用hotrank.js
hotrank: [
{
slide: {
//大图列表
list: [
{
'href': '',
'img': ''
},
...
]
}
},
{
popular: { //人气单品
name: '', //楼层标题
list: [
{
href: '', //链接
img: '', //图片
title: '', //商品名称
price: '', //商品原价
sPrice: '', //商品现价
rank: '' //排行
}
...
]
}
}
{
hotBrands: { //同上logo品牌 ajax数据
name: '' //楼层标题
}
},
{
hotWeek: { //一周热卖
name: '' //楼层标题
nav: [ //一周热卖导航
{
textCn' => 'TOP100', //导航名称
'url' => '',
'sid' => 1 //对应ajax发送id
}
],
list: [ //同上面商品数据
{
...
}
...
]
}
}
]
}
\ No newline at end of file
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
<div class="brand-banner" style="background:{{bgColor}}{{#if bgImg}} url({{bgImg}}){{/if}}">
<div class="center-content clearfix">
<a class="pull-left" href="{{homeUrl}}">
<img src="{{logo}}" alt="{{alt}}">
<img src="{{logo}}">
</a>
<div class="opt pull-right">
... ... @@ -97,9 +97,9 @@
<ul class="activity">
{{#each activity}}
<li>
{{#if sizeImg}}
{{#if activityImg}}
<a class="img-link" href="{{url}}">
<img src="{{sizeImg}}">
<img src="{{activityImg}}">
</a>
{{^}}
<span class="ac-type">{{type}}</span>
... ...
... ... @@ -51,7 +51,7 @@ class ItemController extends AbstractAction
'activity' => array(
array(
'url' => '',
'sizeImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
'activityImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
),
array(
'type' => '加价购',
... ...