Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
1da2019d4369c1a553766996691cf5bcb9a1abda
1 parent
20e95bb5
good detail data structure
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
264 additions
and
65 deletions
docs/web-data-structure.md
template/www.yohobuy.com/actions/product/item/index.phtml
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Item.php
docs/web-data-structure.md
View file @
1da2019
...
...
@@ -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
...
...
template/www.yohobuy.com/actions/product/item/index.phtml
View file @
1da2019
...
...
@@ -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
size
Img
}
}
{
{#if
activity
Img
}
}
<a
class=
"img-link"
href=
"{{url}}"
>
<img
src=
"{{
size
Img}}"
>
<img
src=
"{{
activity
Img}}"
>
</a>
{
{^
}
}
<span
class=
"ac-type"
>
{
{type
}
}</span>
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Item.php
View file @
1da2019
...
...
@@ -51,7 +51,7 @@ class ItemController extends AbstractAction
'activity'
=>
array
(
array
(
'url'
=>
''
,
'
size
Img'
=>
'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
'
activity
Img'
=>
'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
),
array
(
'type'
=>
'加价购'
,
...
...
Please
register
or
login
to post a comment