Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
f10206c918cea5be6e6e9fc9300afd385b870f07
1 parent
ab7a93b2
product rework
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1134 additions
and
604 deletions
docs/web-data-structure.md
template/www.yohobuy.com/actions/product/index/list.phtml
template/www.yohobuy.com/actions/product/index/new-sale.phtml
template/www.yohobuy.com/actions/product/index/search.phtml
template/www.yohobuy.com/partials/product/left-content.phtml
template/www.yohobuy.com/partials/product/pager.phtml
template/www.yohobuy.com/partials/product/sort-pager.phtml → template/www.yohobuy.com/partials/product/standard-content.phtml
web-static/sass/product/_index.scss
web-static/sass/product/_left-content.scss
web-static/sass/product/_list.scss
web-static/sass/product/_new-sale.scss
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
docs/web-data-structure.md
View file @
f10206c
...
...
@@ -233,260 +233,340 @@
]
}
## 搜索页
## 搜索、列表、NEW/SALE共用
### 左侧导航相关
{
search: {
//路径导航
pathNav: [...],
//筛选相关
filters: {
checkedConditions: {
clearUrl: '', //清空筛选链接
conditions: [
//正常情况下文字显示
leftContent:
[
{
allSort: {
//全部品类
updateNum: 2, //更新总数
list:
[
{
name: 'AA', //一级分类
num: 12 //一级分类更新数目
childList:
[
{
name: 'AAA', //二级分类
href: '##', //二级分类跳转链接
num: 12 //二级分类更新数目
}
]
}
]
}
},
{
picLink: {
//图片导航
title: 'AA', //图片导航标题
list:
[
{
href: '',
name: '暗黑'
},
//特殊情况下颜色显示
src: '' // 图片地址
}
]
}
},
{
newSales: {
//一周新品上架
updateNum: 123,
list:
[
{
name: 'AAA',
href: '',
'color': '#f00'
},
...
num: 12,
}
]
},
//-- 筛选项数据Start(需要显示就传,不显示不传) --
channel: [
}
},
{
allDiscount: {
//全部折扣
updateNum: 111,
list:
[
{
name: 'VVV',
href: '##',
num: 11
}
]
}
}
]
}
### 标准页面内容
{
//筛选相关
filters: {
checkedConditions: {
clearUrl: '', //清空筛选链接
conditions:
[
//正常情况下文字显示
{
href: '',
name: '
Boys
'
name: '
暗黑
'
},
...
],
sort: [
//特殊情况下颜色显示
{
name: '上衣',
sub: [
{
href: '',
name: 'T恤'
},
...
]
href: '',
'color': '#f00'
},
...
],
brand: {
default: [
{
href: '',
name: ''
},
...
],
//索引:index为索引键值(字母转化为小写)
brandIndex: [
{
index: 'all',
name: '全部'
},
{
index: '0-9',
name: '0 ~ 9'
},
{
index: 'a',
name: 'A'
},
...
],
brandShow: [
{
id: 1,
href: '',
index:'0-9', //与brandIndex中索引一致
name: '5cm',
key: '5cm' //key为品牌关键字,用于搜索和索引,保持小写
},
{
id: 2,
href: '',
index: 'k',
name: 'KTZ',
key: 'ktz'
},
...
],
price: [
{
href: '',
name: '0-239'
},
...
],
color: [
{
href: '',
name: '黑色',
rgb: '#000' //此处若为彩色和银色,需要传图片路径字符串:url('path/to/img')
},
...
],
size: [
]
},
//-- 筛选项数据Start(需要显示就传,不显示不传) --
channel:
[
{
href: '',
name: 'Boys'
},
...
],
sort:
[
{
name: '上衣',
sub:
[
{
href: '',
name: ''
},
...
],
seniorChose: [
{
attr: 'style', //查找的键值
name: '风格',
showMulti: true, //是否显示多选按钮
sub: [
{
id: '',
href: '',
name: ''
},
...
]
name: 'T恤'
},
...
]
}
},
//操作Banner相关
opts: {
sortType: [
},
...
],
brand: {
default:
[
{
href: '',
name: '
默认
'
name: ''
},
...
],
//索引:index为索引键值(字母转化为小写)
brandIndex:
[
{
active: true, //当前选中
href: '',
name: '最新',
hasSortOrient: true, //是否有正逆序
desc: true //逆序排序(默认不传为正序)
index: 'all',
name: '全部'
},
{
index: '0-9',
name: '0 ~ 9'
},
{
index: 'a',
name: 'A'
},
...
],
brandShow:
[
{
id: 1,
href: '',
name: '价格',
hasSortOrient: true
index:'0-9', //与brandIndex中索引一致
name: '5cm',
key: '5cm' //key为品牌关键字,用于搜索和索引,保持小写
},
{
id: 2,
href: '',
name: '折扣',
hasSortOrient: true
}
index: 'k',
name: 'KTZ',
key: 'ktz'
},
...
],
checks
: [
price
:
[
{
name: '新品',
checked: true,
href: ''
href: '',
name: '0-239'
},
...
],
color:
[
{
name: '打折',
href: ''
href: '',
name: '黑色',
rgb: '#000' //此处若为彩色和银色,需要传图片路径字符串:url('path/to/img')
},
{
name: '限量',
href: ''
}
...
],
fivePerLine: true,
sixPerLineHref: '',
//or
sixPerLine: true,
fivePerLineHref: '',
countPerPage => 120,
pageCounts => [
size:
[
{
href: '',
count: 60
name: ''
},
...
],
curPage: 1,
pageCount: 30,
preHref: '', //若当前为第一页,不传此参数
nexHref: '' //若当前为最后一页,不传此参数
},
// 商品导航列表
allSort: {
//全部品类
updateNum: 2, //更新总数
list: [
seniorChose:
[
{
name: 'AA', //一级分类
num: 12 //一级分类更新数目
childList: [
attr: 'style', //查找的键值
name: '风格',
showMulti: true, //是否显示多选按钮
sub:
[
{
name: 'AAA', //二级分类
href: '##', //二级分类跳转链接
num: 12 //二级分类更新数目
}
id: '',
href: '',
name: ''
},
...
]
}
},
...
]
}
},
//操作Banner相关
opts: {
sortType: [
{
href: '',
name: '默认'
},
{
active: true, //当前选中
href: '',
name: '最新',
hasSortOrient: true, //是否有正逆序
desc: true //逆序排序(默认不传为正序)
},
{
href: '',
name: '价格',
hasSortOrient: true
},
{
href: '',
name: '折扣',
hasSortOrient: true
}
],
checks: [
{
name: '新品',
checked: true,
href: ''
},
{
name: '打折',
href: ''
},
{
name: '限量',
href: ''
}
],
fivePerLine: true,
sixPerLineHref: '',
//or
sixPerLine: true,
fivePerLineHref: '',
countPerPage => 120,
pageCounts => [
{
href: '',
count: 60
},
...
],
curPage: 1,
pageCount: 30,
preHref: '', //若当前为第一页,不传此参数
nexHref: '' //若当前为最后一页,不传此参数
},
goods: [
{
...//good
}
],
totalCount: 333, //共多少件商品
pager: '', //右下角分页HTML
//最近浏览<搜索无此内容>
latestWalk: [
{
href: '',
img: '',
salePrice: '',
marketPrice: ''
},
advNav: {
//图片导航
advNavTitle: 'AA', 图片导航标题
list: [
{
href: '',
src: '' // 图片地址
}
]
...
]
}
### 搜索页
{
search: {
//路径导航
pathNav: [...],
..//标准页面内容,见上
}
}
### 商品列表页
{
list: {
//若为品牌首页则需要
brandBanner: {
bannerHeight: 100, //banner高度
banner: '',
bannerHome: '',
bannerIntro: '', //品牌介绍页
coled: true //品牌是否收藏
},
advPic: {
//图片banner
advPicTitle: 'AA', 图片banner标题
list: [
pathNav: [],
brandAbout: '', //品牌介绍页传HTML文本,非品牌介绍页则不传
leftContent: [], //...
//品牌入口
shopEntry: {
home: '',
logo: '',
shopName: '',
sort: [
{
href: '',
src: '' // 图片地址
}
name: '上衣'
},
...
]
},
newSales: {
//一周新品上架
updateNum: 123,
list: [
{
name: 'AAA',
href: '',
num: 12,
}
]
...,//标准页面内容,见上
}
}
### new/sale
{
newSale: {
banner: {
bannerHeight: 222,
img: ''
},
allDiscount: {
//全部折扣
updateNum: 111,
list: [
{
name: 'VVV',
href: '##',
num: 11
}
]
}
//商品列表
goods: [
//商品信息
...
]
title: {
name: '全部商品',
count: 2555
},
leftContent: [],
..//标准页面内容,见上
}
}
...
...
template/www.yohobuy.com/actions/product/index/list.phtml
View file @
f10206c
{
{>
layout/header
}
}
<div
class=
"product-list-page yoho-page"
>
<div
class=
"product-list-page
product-page
yoho-page"
>
{
{#
list
}
}
{
{#
brandBanner
}
}
<div
class=
"brand-banner"
>
...
...
@@ -31,73 +31,7 @@
</div>
{
{^
}
}
<div
class=
"list-left pull-left"
>
{
{#
allDiscount
}
}
<div
class=
"sort-container"
>
<ul
class=
"sort-child-list new-sale"
>
<li><a
href=
"{{href}}"
>全部折扣</a><span>
{
{updateNum
}
}</span></li>
{
{#each
list
}
}
<li><a
href=
"{{href}}"
>
{
{name
}
}</a><span>
{
{num
}
}</span></li>
{
{/each
}
}
</ul>
</div>
{
{/
allDiscount
}
}
{
{#
newSales
}
}
<div
class=
"sort-container"
>
<h
2
>一周新品上架<span>
{
{updateNum
}
}</span></h
2
>
<ul
class=
"sort-child-list new-sale"
>
{
{#each
list
}
}
<li><a
href=
"{{href}}"
>
{
{name
}
}</a><span>
{
{num
}
}</span></li>
{
{/each
}
}
</ul>
</div>
{
{/
newSales
}
}
{
{#
allSort
}
}
<div
class=
"sort-container"
>
<h
2
>全部品类<span>
{
{updateNum
}
}</span></h
2
>
<ul>
{
{#each
list
}
}
<li
class=
"product-list-nav"
>
<h
3
>
<span
class=
"icon-triangle"
></span>
{
{name
}
}<span>
{
{num
}
}</span>
</h
3
>
<ul
class=
"sort-child-list"
>
{
{#each
childList
}
}
<li>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
{
{num
}
}</span>
</li>
{
{/each
}
}
</ul>
</li>
{
{/each
}
}
</ul>
</div>
{
{/
allSort
}
}
{
{#
advNav
}
}
{
{#
advNavTitle
}
}
<h
2
class=
"nav-pic-title"
>
{
{.
}
}</h
2
>
{
{/advNavTitle
}
}
<ul
class=
"pic-nav"
>
{
{#each
list
}
}
<li><a
href=
"{{href}}"
><img
src=
"{{src}}"
alt=
""
/></a></li>
{
{/each
}
}
</ul>
{
{/advNav
}
}
{
{#advPic
}
}
{
{#
advPicTitle
}
}
<h
2
class=
"nav-pic-title"
>
{
{.
}
}</h
2
>
{
{/
advPicTitle
}
}
<ul
class=
"pic-nav"
>
{
{#each
list
}
}
<li><a
href=
"{{href}}"
><img
src=
"{{src}}"
alt=
""
/></a></li>
{
{/each
}
}
</ul>
{
{/advPic
}
}
{
{>
product/left-content
}
}
</div>
<div
class=
"list-right pull-right"
>
{
{#
shopEntry
}
}
...
...
@@ -126,24 +60,8 @@
</div>
{
{/
shopEntry
}
}
{
{#
filters
}
}
{
{>
product/filter-box
}
}
{
{/
filters
}
}
{
{#
opts
}
}
{
{>
product/sort-pager
}
}
{
{/
opts
}
}
{
{>
product/standard-content
}
}
<div
class=
"goods-container clearfix"
>
{
{#each
goods
}
}
{
{>
product/good
}
}
{
{/each
}
}
<div
class=
"good-item-wrapper"
>
<div
class=
"good-info-main"
></div>
<div
class=
"good-select-color"
></div>
</div>
</div>
{
{>
product/pager
}
}
{
{>
product/latest-walk
}
}
</div>
{
{/
brandAbout
}
}
...
...
template/www.yohobuy.com/actions/product/index/new-sale.phtml
0 → 100644
View file @
f10206c
{
{>
layout/header
}
}
<div
class=
"new-sale-page product-page yoho-page"
>
{
{#
newSale
}
}
{
{#
banner
}
}
<div
class=
"banner-img"
style=
"height: {{bannerHeight}}px;background:url({{img}}) no-repeat top center;"
></div>
{
{/
banner
}
}
<div
class=
"center-content clearfix"
>
{
{#
title
}
}
<div
class=
"header-title"
>
{
{name
}
}
<p
class=
"line-through"
></p>
<p
class=
"count-wrap"
>
<span
class=
"count"
>共
{
{count
}
}个结果</span>
</p>
</div>
{
{/
title
}
}
<div
class=
"list-left pull-left"
>
{
{>
product/left-content
}
}
</div>
<div
class=
"list-right pull-right"
>
{
{>
product/standard-content
}
}
</div>
</div>
{
{/
newSale
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/actions/product/index/search.phtml
View file @
f10206c
{
{>
layout/header
}
}
<div
class=
"product-search-page yoho-page center-content"
>
<div
class=
"product-search-page
product-page
yoho-page center-content"
>
{
{#
search
}
}
{
{>
layout/path-nav
}
}
{
{#
filters
}
}
{
{>
product/filter-box
}
}
{
{/
filters
}
}
{
{>
product/standard-content
}
}
{
{#
opts
}
}
{
{>
product/sort-pager
}
}
{
{/
opts
}
}
<div
class=
"goods-container clearfix"
>
{
{#each
goods
}
}
{
{>
product/good
}
}
{
{/each
}
}
<div
class=
"good-item-wrapper"
>
<div
class=
"good-info-main"
></div>
<div
class=
"good-select-color"
></div>
</div>
</div>
{
{>
product/pager
}
}
{
{>
product/latest-walk
}
}
{
{/
search
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/product/left-content.phtml
0 → 100644
View file @
f10206c
{
{#
leftContent
}
}
{
{!--
全部折扣
--
}
}
{
{#
allDiscount
}
}
<div
class=
"sort-container"
>
<ul
class=
"sort-child-list new-sale"
>
<li>
<a
href=
"{{href}}"
>全部折扣</a>
<span>
{
{updateNum
}
}</span>
</li>
{
{#each
list
}
}
<li>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
{
{num
}
}</span>
</li>
{
{/each
}
}
</ul>
</div>
{
{/
allDiscount
}
}
{
{!--
新品上架
--
}
}
{
{#
newSales
}
}
<div
class=
"sort-container"
>
<h
2
>
一周新品上架
<span>
{
{updateNum
}
}</span>
</h
2
>
<ul
class=
"sort-child-list new-sale"
>
{
{#each
list
}
}
<li>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
{
{num
}
}</span>
</li>
{
{/each
}
}
</ul>
</div>
{
{/
newSales
}
}
{
{!--
全部品类--
}
}
{
{#
allSort
}
}
<div
class=
"sort-container"
>
<h
2
>
全部品类
<span>
{
{updateNum
}
}</span>
</h
2
>
<ul>
{
{#each
list
}
}
<li
class=
"product-list-nav"
>
<h
3
>
<span
class=
"icon-triangle"
></span>
{
{name
}
}
<span>
{
{num
}
}</span>
</h
3
>
<ul
class=
"sort-child-list"
>
{
{#each
childList
}
}
<li>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
{
{num
}
}</span>
</li>
{
{/each
}
}
</ul>
</li>
{
{/each
}
}
</ul>
</div>
{
{/
allSort
}
}
{
{!--
图片链接
--
}
}
{
{#
picLink
}
}
{
{#if
title
}
}
<h
2
class=
"nav-pic-title"
>
{
{title
}
}</h
2
>
{
{/if
}
}
<ul
class=
"pic-nav"
>
{
{#each
list
}
}
<li>
<a
href=
"{{href}}"
>
<img
src=
"{{src}}"
>
</a>
</li>
{
{/each
}
}
</ul>
{
{/
picLink
}
}
{
{/
leftContent
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/product/pager.phtml
deleted
100644 → 0
View file @
ab7a93b
<div class="product-pager clearfix">
<span class="total">{{opts.curPage}} - {{opts.pageCount}} / 共{{totalCount}}件商品</span>
<div class="pager">
{{{pager}}}
</div>
</div>
\ No newline at end of file
template/www.yohobuy.com/partials/product/s
ort-pager
.phtml → template/www.yohobuy.com/partials/product/s
tandard-content
.phtml
View file @
f10206c
<div class="sort-pager">
{{# sortType}}
<a class="sort-type{{#if active}} active{{/if}}" href="{{href}}">
{{name}}
{{#if hasSortOrient}}
{{#if active}}
{{#if desc}}
<span class="active-icon iconfont"></span>
{
{!--
搜索页、列表页、NEW/SALE页标准内容--
}
}
{
{#
filters
}
}
{
{>
product/filter-box
}
}
{
{/
filters
}
}
{
{#
opts
}
}
<div
class=
"sort-pager"
>
{
{#
sortType
}
}
<a
class=
"sort-type{{#if active}} active{{/if}}"
href=
"{{href}}"
>
{
{name
}
}
{
{#if
hasSortOrient
}
}
{
{#if
active
}
}
{
{#if
desc
}
}
<span
class=
"active-icon iconfont"
>
603
;</span>
{
{^
}
}
<span
class=
"active-icon iconfont"
>
604
;</span>
{
{/if
}
}
{
{^
}
}
<span class="
active-icon iconfont">๠
4;</span>
<span
class=
"
iconfont"
>
61
4
;</span>
{
{/if
}
}
{
{^
}
}
<span class="iconfont"></span>
<span
class=
"iconfont"
>
604
;</span>
{
{/if
}
}
</a>
{
{/
sortType
}
}
{
{#
checks
}
}
<a
class=
"checks{{#if checked}} checked{{/if}}"
href=
"{{href}}"
>
{
{#if
checked
}
}
<span
class=
"iconfont"
>
612
;</span>
{
{^
}
}
<span
class=
"iconfont"
>
613
;</span>
{
{/if
}
}
{
{name
}
}
</a>
{
{/
checks
}
}
<div
class=
"pager-wrap"
>
<div
class=
"page-count"
>
<span
id=
"count-per-page"
>
{
{countPerPage
}
}
<i
class=
"iconfont"
>
604
;</i>
</span>
每页
<ul>
{
{#
pageCounts
}
}
<li>
<a
href=
"{{href}}"
>
{
{count
}
}</a>
</li>
{
{/
pageCounts
}
}
</ul>
</div>
<p
class=
"pager"
>
{
{#if
preHref
}
}
<a
href=
"{{preHref}}"
>
<span
class=
"iconfont"
>
615
;</span>
</a>
{
{^
}
}
<span
class=
"dis-icon iconfont"
>
615
;</span>
{
{/if
}
}
{{^}}
<span class="iconfont"></span>
{{/if}}
</a>
{{/ sortType}}
{{# checks}}
<a class="checks{{#if checked}} checked{{/if}}" href="{{href}}">
{{#if checked}}
<span class="iconfont"></span>
{{^}}
<span class="iconfont"></span>
{{/if}}
{{name}}
</a>
{{/ checks}}
<span>
<i>
{
{curPage
}
}</i>/
{
{pageCount
}
}
</span>
<div class="pager-wrap">
<div class="page-count">
<span id="count-per-page">
{{countPerPage}}
<i class="iconfont"></i>
</span>
每页
<ul>
{{# pageCounts}}
<li>
<a href="{{href}}">{{count}}</a>
</li>
{{/ pageCounts}}
</ul>
{
{#if
nextHref
}
}
<a
href=
"{{nextHref}}"
>
<span
class=
"iconfont"
>
601
;</span>
</a>
{
{^
}
}
<span
class=
"dis-icon iconfont"
>
601
;</span>
{
{/if
}
}
</p>
</div>
</div>
{
{/
opts
}
}
<p class="pager">
{{#if preHref}}
<a href="{{preHref}}">
<span class="iconfont"></span>
</a>
{{^}}
<span class="dis-icon iconfont"></span>
{{/if}}
<div
class=
"goods-container clearfix"
>
{
{#each
goods
}
}
{
{>
product/good
}
}
{
{/each
}
}
<div
class=
"good-item-wrapper"
>
<div
class=
"good-info-main"
></div>
<div
class=
"good-select-color"
></div>
</div>
</div>
<span>
<i>{{curPage}}</i>/{{pageCount}}
</span>
<div
class=
"product-pager clearfix"
>
<span
class=
"total"
>
{
{opts.curPage
}
}
-
{
{opts.pageCount
}
}
/
共
{
{totalCount
}
}件商品</span>
{{#if nextHref}}
<a href="{{nextHref}}">
<span class="iconfont"></span>
</a>
{{^}}
<span class="dis-icon iconfont"></span>
{{/if}}
</p>
<div
class=
"pager"
>
{
{{pager
}
}}
</div>
</div>
\ No newline at end of file
...
...
web-static/sass/product/_index.scss
View file @
f10206c
@import
"search"
,
"list"
,
"
filter-box"
,
"sort-pager"
,
"good"
,
"latest-walk
"
;
@import
"search"
,
"list"
,
"
new-sale"
,
"filter-box"
,
"sort-pager"
,
"good"
,
"latest-walk"
,
"left-content
"
;
.product-pager
{
padding
:
20px
0
;
font-size
:
12px
;
color
:
#6a6a6a
;
border-top
:
2px
solid
#eaeceb
;
.product-page
{
.product-pager
{
padding
:
20px
0
;
font-size
:
12px
;
color
:
#6a6a6a
;
border-top
:
2px
solid
#eaeceb
;
.pager
{
float
:
right
;
.pager
{
float
:
right
;
}
}
.list-left
{
width
:
160px
;
}
.list-right
{
width
:
970px
;
}
}
.product-list-page
,
.new-sale-page
{
.goods-container
{
height
:
auto
;
padding-top
:
25px
;
position
:
relative
;
width
:
970px
+
10px
;
//每列增加右边距
.good-info
{
width
:
235px
;
}
}
}
\ No newline at end of file
...
...
web-static/sass/product/_left-content.scss
0 → 100644
View file @
f10206c
.product-page
{
.sort-container
{
width
:
100%
;
font-size
:
12px
;
border-bottom
:
1px
solid
#ebebeb
;
padding-bottom
:
10px
;
margin-bottom
:
10px
;
h2
{
height
:
28px
;
line-height
:
28px
;
color
:
#222
;
font-weight
:
bold
;
position
:
relative
;
span
{
color
:
#bbb
;
padding-left
:
5px
;
}
}
.product-list-nav
{
h3
{
height
:
28px
;
line-height
:
28px
;
color
:
#222
;
font-weight
:
bold
;
position
:
relative
;
text-indent
:
10px
;
cursor
:
pointer
;
span
{
color
:
#bbb
;
padding-left
:
5px
;
&
.icon-triangle
{
display
:
inline-block
;
padding-left
:
0
;
width
:
0
;
height
:
0
;
border-top
:
6px
solid
#fff
;
border-left
:
6px
solid
#000
;
border-bottom
:
6px
solid
#fff
;
position
:
absolute
;
top
:
50%
;
margin-top
:
-6px
;
left
:
0
;
@include
transition
(
transform
.3s
)
}
}
}
&
.active
{
h3
{
span
{
&
.icon-triangle
{
@include
rotate
(
90deg
)
}
}
}
/*ul.sort-child-list {
display: block;
}*/
}
}
ul
.sort-child-list
{
display
:
none
;
&
.new-sale
{
display
:
block
;
}
li
{
color
:
#bbb
;
span
{
padding-left
:
5px
;
}
}
a
{
color
:
#666
;
padding-left
:
10px
;
height
:
22px
;
line-height
:
22px
;
}
}
}
.nav-pic-title
{
height
:
35px
;
line-height
:
35px
;
color
:
#000
;
font-weight
:
bold
;
border-bottom
:
1px
solid
#ebebeb
;
font-size
:
12px
;
}
.pic-nav
{
display
:
block
;
li
,
img
{
display
:
block
;
width
:
100%
;
overflow
:
hidden
;
}
}
}
\ No newline at end of file
...
...
web-static/sass/product/_list.scss
View file @
f10206c
.product-list-page
{
.list-left
{
width
:
160px
;
.sort-container
{
width
:
100%
;
font-size
:
12px
;
border-bottom
:
1px
solid
#ebebeb
;
padding-bottom
:
10px
;
margin-bottom
:
10px
;
h2
{
height
:
28px
;
line-height
:
28px
;
color
:
#222
;
font-weight
:
bold
;
position
:
relative
;
span
{
color
:
#bbb
;
padding-left
:
5px
;
}
}
.product-list-nav
{
h3
{
height
:
28px
;
line-height
:
28px
;
color
:
#222
;
font-weight
:
bold
;
position
:
relative
;
text-indent
:
10px
;
cursor
:
pointer
;
span
{
color
:
#bbb
;
padding-left
:
5px
;
&
.icon-triangle
{
display
:
inline-block
;
padding-left
:
0
;
width
:
0
;
height
:
0
;
border-top
:
6px
solid
#fff
;
border-left
:
6px
solid
#000
;
border-bottom
:
6px
solid
#fff
;
position
:
absolute
;
top
:
50%
;
margin-top
:
-6px
;
left
:
0
;
@include
transition
(
transform
.3s
)
}
}
}
&
.active
{
h3
{
span
{
&
.icon-triangle
{
@include
rotate
(
90deg
)
}
}
}
/*ul.sort-child-list {
display: block;
}*/
}
}
ul
.sort-child-list
{
display
:
none
;
&
.new-sale
{
display
:
block
;
}
li
{
color
:
#bbb
;
span
{
padding-left
:
5px
;
}
}
a
{
color
:
#666
;
padding-left
:
10px
;
height
:
22px
;
line-height
:
22px
;
}
}
}
.nav-pic-title
{
height
:
35px
;
line-height
:
35px
;
color
:
#000
;
font-weight
:
bold
;
border-bottom
:
1px
solid
#ebebeb
;
font-size
:
12px
;
}
.pic-nav
{
display
:
block
;
li
,
img
{
display
:
block
;
width
:
100%
;
overflow
:
hidden
;
}
}
}
.list-right
{
width
:
970px
;
}
.brand-banner
{
position
:
relative
;
...
...
@@ -199,16 +85,4 @@
}
}
}
.goods-container
{
height
:
auto
;
padding
:
25px
0
0
0
;
position
:
relative
;
width
:
970px
+
10px
;
//每列增加右边距
.good-info
{
width
:
235px
;
}
}
}
\ No newline at end of file
...
...
web-static/sass/product/_new-sale.scss
0 → 100644
View file @
f10206c
.new-sale-page
{
.header-title
{
position
:
relative
;
width
:
100%
;
height
:
42px
;
margin-top
:
20px
;
text-align
:
center
;
font-size
:
20px
;
.count-wrap
{
position
:
relative
;
}
.count
{
background
:
#fff
;
padding
:
0
5px
;
color
:
#999
;
font-size
:
12px
;
margin-top
:
6px
;
}
.line-through
{
position
:
absolute
;
bottom
:
9px
;
left
:
0
;
right
:
0
;
height
:
1px
;
border-top
:
1px
dotted
#999
;
}
}
}
\ No newline at end of file
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
f10206c
...
...
@@ -767,56 +767,139 @@ class IndexController extends AbstractAction
'salePrice'
=>
'899'
)
),
'allSort'
=>
array
(
'updateNum'
=>
145
,
'list'
=>
array
(
array
(
'name'
=>
'裙装'
,
'num'
=>
'10'
,
'childList'
=>
array
(
'leftContent'
=>
array
(
array
(
'allSort'
=>
array
(
'updateNum'
=>
145
,
'list'
=>
array
(
array
(
'name'
=>
'裙装'
,
'num'
=>
'10'
,
'childList'
=>
array
(
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
)
)
),
array
(
'name'
=>
'裙装BBB'
,
'num'
=>
'10'
,
'childList'
=>
array
(
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
)
)
)
)
)
),
array
(
'picLink'
=>
array
(
'title'
=>
'AAAA'
,
'list'
=>
array
(
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
),
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
)
)
)
),
array
(
'advPic'
=>
array
(
'advPicTitle'
=>
false
,
'list'
=>
array
(
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img02.static.yohobuy.com/cms/2015/11/10/15/02ee7970deb68390b77cbf0685f26fc5bf.jpg'
),
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img02.static.yohobuy.com/cms/2015/11/10/15/02ee7970deb68390b77cbf0685f26fc5bf.jpg'
)
)
)
),
array
(
'newSales'
=>
array
(
'updateNum'
=>
130
,
'list'
=>
array
(
array
(
'name'
=>
'12月03日'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'
全身裙装
'
,
'name'
=>
'
12月03日
'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'
全身裙装
'
,
'name'
=>
'
12月03日
'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'
全身裙装
'
,
'name'
=>
'
12月03日
'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
)
)
),
array
(
'name'
=>
'裙装BBB'
,
'num'
=>
'10'
,
'childList'
=>
array
(
array
(
'name'
=>
'全身裙装'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
)
),
array
(
'allDiscount'
=>
array
(
'updateNum'
=>
130
,
'list'
=>
array
(
array
(
'name'
=>
'
全身裙装
'
,
'name'
=>
'
1~3折
'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'
全身裙装
'
,
'name'
=>
'
4~6折
'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'
全身裙装
'
,
'name'
=>
'
7折
'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
)
...
...
@@ -824,77 +907,6 @@ class IndexController extends AbstractAction
)
)
),
'advNav'
=>
array
(
'advNavTitle'
=>
'AAAA'
,
'list'
=>
array
(
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
),
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
)
)
),
'advPic'
=>
array
(
'advPicTitle'
=>
false
,
'list'
=>
array
(
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img02.static.yohobuy.com/cms/2015/11/10/15/02ee7970deb68390b77cbf0685f26fc5bf.jpg'
),
array
(
'href'
=>
'http://adidas.yohobuy.com/?folder=1366'
,
'src'
=>
'http://img02.static.yohobuy.com/cms/2015/11/10/15/02ee7970deb68390b77cbf0685f26fc5bf.jpg'
)
)
),
'newSales'
=>
array
(
'updateNum'
=>
130
,
'list'
=>
array
(
array
(
'name'
=>
'12月03日'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'12月03日'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'12月03日'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'12月03日'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
)
)
),
'allDiscount'
=>
array
(
'updateNum'
=>
130
,
'list'
=>
array
(
array
(
'name'
=>
'1~3折'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'4~6折'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
),
array
(
'name'
=>
'7折'
,
'href'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'num'
=>
'5'
)
)
),
'totalCount'
=>
'2259'
,
'pager'
=>
'<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">></span></a>'
,
'latestWalk'
=>
array
(
...
...
@@ -935,12 +947,382 @@ class IndexController extends AbstractAction
'salePrice'
=>
'209'
)
)
)
);
$this
->
_view
->
display
(
'list'
,
$data
);
}
/**
* new sale
*/
public
function
newSaleAction
()
{
$data
=
array
(
'newSale'
=>
array
(
'banner'
=>
array
(
'bannerHeight'
=>
350
,
'img'
=>
'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
'title'
=>
array
(
'name'
=>
'全部商品'
,
'count'
=>
540
)
),
'filters'
=>
array
(
'checkedConditions'
=>
array
(
'conditions'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'暗黑'
),
array
(
'href'
=>
''
,
'color'
=>
'#f00'
),
array
(
'href'
=>
''
,
'name'
=>
'CLOT'
)
),
'clearUrl'
=>
''
),
'channel'
=>
array
(
array
(
'href'
=>
'/?gender=1,3'
,
'name'
=>
'BOYS'
),
array
(
'href'
=>
'/?gender=2,3'
,
'name'
=>
'GIRLS'
),
array
(
'href'
=>
''
,
'name'
=>
'KIDS'
),
array
(
'href'
=>
''
,
'name'
=>
'LIFESTYLE'
)
),
'sort'
=>
array
(
array
(
'id'
=>
'1'
,
'name'
=>
'上衣'
,
'sub'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'T恤'
),
array
(
'href'
=>
''
,
'name'
=>
'棉袄'
),
array
(
'href'
=>
''
,
'name'
=>
'外套'
)
)
),
array
(
'id'
=>
'2'
,
'name'
=>
'裤子'
),
array
(
'id'
=>
'3'
,
'name'
=>
'连衣裙'
),
array
(
'id'
=>
'4'
,
'name'
=>
'鞋'
)
),
'brand'
=>
array
(
'default'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'CLOT'
),
array
(
'href'
=>
''
,
'name'
=>
'ABLE JEANS'
),
array
(
'href'
=>
''
,
'name'
=>
'Eight Guys'
),
array
(
'href'
=>
''
,
'name'
=>
'FAIRWHALE JEANS'
),
array
(
'href'
=>
''
,
'name'
=>
'鬼洗'
),
array
(
'href'
=>
''
,
'name'
=>
'金银帝国Imperial Taels'
),
array
(
'href'
=>
''
,
'name'
=>
'F.L.Y.D'
),
array
(
'href'
=>
''
,
'name'
=>
'Tapenade特芙娜'
),
array
(
'href'
=>
''
,
'name'
=>
'Adidas Originals'
)
),
'brandIndex'
=>
array
(
array
(
'index'
=>
'all'
,
'name'
=>
'全部'
),
array
(
'index'
=>
'0-9'
,
'name'
=>
'0 ~ 9'
),
array
(
'index'
=>
'a'
,
'name'
=>
'A'
)
),
'brandsShow'
=>
array
(
array
(
'id'
=>
'1'
,
'href'
=>
''
,
'index'
=>
'0-9'
,
'name'
=>
'5cm'
,
'key'
=>
'5cm'
),
array
(
'id'
=>
'2'
,
'href'
=>
''
,
'index'
=>
'k'
,
'name'
=>
'KTZ'
,
'key'
=>
'ktz'
),
array
(
'id'
=>
'3'
,
'href'
=>
''
,
'index'
=>
't'
,
'name'
=>
'Tapenade特芙娜'
,
'key'
=>
'tapenade特芙娜'
),
array
(
'id'
=>
'4'
,
'href'
=>
''
,
'index'
=>
'j'
,
'name'
=>
'金银帝国Imperial Taels'
,
'key'
=>
'金银帝国imperial taels'
),
array
(
'id'
=>
'5'
,
'href'
=>
''
,
'index'
=>
'a'
,
'name'
=>
'ABLE JEANS'
,
'key'
=>
'able jeans'
)
)
),
'price'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'0-239'
),
array
(
'href'
=>
''
,
'name'
=>
'240-329'
)
),
'color'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'黑色'
,
'rgb'
=>
'#000'
),
array
(
'href'
=>
''
,
'name'
=>
'红色'
,
'rgb'
=>
'#f00'
)
),
'size'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'S'
),
array
(
'href'
=>
''
,
'name'
=>
'L'
)
),
'seniorChose'
=>
array
(
array
(
'attr'
=>
'style'
,
'name'
=>
'风格'
,
'showMulti'
=>
true
,
'sub'
=>
array
(
array
(
'id'
=>
'1'
,
'href'
=>
''
,
'name'
=>
'街头'
),
array
(
'id'
=>
'2'
,
'href'
=>
''
,
'name'
=>
'简约'
)
)
),
array
(
'attr'
=>
'weather'
,
'name'
=>
'适用季节'
,
'sub'
=>
array
(
array
(
'id'
=>
'1'
,
'href'
=>
''
,
'name'
=>
'春天'
),
array
(
'id'
=>
'2'
,
'href'
=>
''
,
'name'
=>
'夏天'
)
)
)
)
),
'opts'
=>
array
(
'sortType'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'默认'
),
array
(
'active'
=>
true
,
'href'
=>
''
,
'name'
=>
'最新'
,
'hasSortOrient'
=>
true
,
'desc'
=>
true
),
array
(
'href'
=>
''
,
'name'
=>
'价格'
,
'hasSortOrient'
=>
true
),
array
(
'href'
=>
''
,
'name'
=>
'折扣'
,
'hasSortOrient'
=>
true
)
),
'checks'
=>
array
(
array
(
'name'
=>
'新品'
,
'checked'
=>
true
,
'href'
=>
''
),
array
(
'name'
=>
'打折'
,
'href'
=>
''
),
array
(
'name'
=>
'限量'
,
'checked'
=>
true
,
'href'
=>
''
)
),
'fivePerLine'
=>
true
,
'sixPerLineHref'
=>
''
,
'countPerPage'
=>
'120'
,
'pageCounts'
=>
array
(
array
(
'href'
=>
''
,
'count'
=>
60
),
array
(
'href'
=>
''
,
'count'
=>
100
),
array
(
'href'
=>
''
,
'count'
=>
120
)
),
'curPage'
=>
1
,
'pageCount'
=>
30
,
'nextHref'
=>
'hello'
),
'goods'
=>
array
(
array
(
'tags'
=>
array
(
'isNew'
=>
true
,
'isYearEndPromotion'
=>
true
),
'url'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'thumb'
=>
'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'adidas Originals FORUM 中帮拼色休闲板鞋'
,
'salePrice'
=>
'899'
,
'isFew'
=>
true
),
array
(
'tags'
=>
array
(
'isNew'
=>
true
,
'isReNew'
=>
true
),
'url'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'thumb'
=>
'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'adidas Originals FORUM 中帮拼色休闲板鞋'
,
'salePrice'
=>
'899'
,
'showColBtn'
=>
true
),
array
(
'tags'
=>
array
(
'isNew'
=>
true
,
'isReNew'
=>
true
),
'url'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'thumb'
=>
'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'adidas Originals FORUM 中帮拼色休闲板鞋'
,
'salePrice'
=>
'899'
),
array
(
'url'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'thumb'
=>
'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'adidas Originals FORUM 中帮拼色休闲板鞋'
,
'salePrice'
=>
'899'
),
array
(
'tags'
=>
array
(
'isNew'
=>
true
,
'isReNew'
=>
true
),
'url'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'thumb'
=>
'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'adidas Originals FORUM 中帮拼色休闲板鞋'
,
'salePrice'
=>
'899'
),
array
(
'tags'
=>
array
(
'isNew'
=>
true
,
'isReNew'
=>
true
),
'url'
=>
'http://adidas.yohobuy.com/?gender=1,3'
,
'thumb'
=>
'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'adidas Originals FORUM 中帮拼色休闲板鞋'
,
'salePrice'
=>
'899'
)
),
'totalCount'
=>
'2259'
,
'pager'
=>
'<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">></span></a>'
);
$this
->
_view
->
display
(
'new-sale'
,
$data
);
}
/*
* 获取商品颜色
*/
...
...
Please
register
or
login
to post a comment