Authored by xuqi

Review by:@刘玥

... ... @@ -331,260 +331,355 @@
]
}
## 搜索页
## 搜索、列表、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
}
]
}
}
]
}
### 无搜索/筛选结果提示
通过**goods**字段控制页面相关元素的渲染与否,若无结果,不要传goods字段
无搜索结果必须传递搜索的*searchActionUrl*,比如:search.yohobuy.com;可选字段为*keyWord*
### 标准页面内容
{
//筛选相关
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: [
{
index: 'all',
name: '全部'
},
{
active: true, //当前选中
href: '',
name: '最新',
hasSortOrient: true, //是否有正逆序
desc: true //逆序排序(默认不传为正序)
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: ''
}
],
//重要提示:页面筛选无结果时,接下来的参数不用传;
countPerPage => 120,
pageCounts => [
{
href: '',
count: 60
},
...
],
curPage: 1,
pageCount: 30,
preHref: '', //若当前为第一页,不传此参数
nexHref: '' //若当前为最后一页,不传此参数
//重要提示END
},
//重要提示:若无搜索或者筛选结果,则不传goods,totalCount和pager也都不传字段
goods: [
{
...//good
}
],
totalCount: 333, //共多少件商品
pager: '', //右下角分页HTML
//若为搜索导致的无结果,则传递关键词字段;筛选导致的不传
keyWord: '...',
searchActionUrl: ''
//重要提示END
//最近浏览<搜索无此内容>
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,
}
]
//分类介绍
sortIntro: {
name: '',
enName: '',
desc: '',
img: ''
},
allDiscount: {
//全部折扣
updateNum: 111,
list: [
{
name: 'VVV',
href: '##',
num: 11
}
]
}
//商品列表
goods: [
//商品信息
...
]
...,//标准页面内容,见上
}
}
### new/sale
{
newSale: {
banner: {
bannerHeight: 222,
img: ''
},
title: {
name: '全部商品',
count: 2555
},
leftContent: [],
..//标准页面内容,见上
}
}
... ...
{{> layout/header}}
{{#if errorPage}}
<div class="err-page err-404 screen">
<div class="tips-404">
<p class="tip">很抱歉,您访问的页面不存在!</p>
<p class="links">
<a href="{{newProductLink}}">浏览新品</a>
&nbsp;&nbsp;
<a href="http://www.yohobuy.com/">返回首页</a>
</p>
</div>
</div>
{{/if}}
{{> layout/footer}}
\ No newline at end of file
... ...
{{> 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">
<h2>一周新品上架<span>{{updateNum}}</span></h2>
<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">
<h2>全部品类<span>{{updateNum}}</span></h2>
<ul>
{{#each list}}
<li class="product-list-nav">
<h3>
<span class="icon-triangle"></span>
{{name}}<span>{{num}}</span>
</h3>
<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}}
<h2 class="nav-pic-title">{{.}}</h2>
{{/advNavTitle}}
<ul class="pic-nav">
{{#each list}}
<li><a href="{{href}}"><img src="{{src}}" alt=""/></a></li>
{{/each}}
</ul>
{{/advNav}}
{{#advPic}}
{{# advPicTitle}}
<h2 class="nav-pic-title">{{.}}</h2>
{{/ 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,23 +60,20 @@
</div>
{{/ shopEntry}}
{{# filters}}
{{> product/filter-box}}
{{/ filters}}
{{# sortIntro}}
<div class="sort-intro clearfix">
<div class="texts pull-left">
<p class="name">{{name}}</p>
<p class="en-name">{{enName}}</p>
<p class="desc">{{description}}</p>
</div>
<img class="pull-right img" src="{{img}}">
</div>
{{/ sortIntro}}
{{# 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/latest-walk}}
</div>
{{/ brandAbout}}
</div>
... ...
{{> layout/header}}
<div class="new-sale-page product-page yoho-page">
{{# newSale}}
{{# saleBanner}}
<div class="banner-img" style="height: {{bannerHeight}}px;background:url({{img}}) no-repeat top center;"></div>
{{/ saleBanner}}
<div class="center-content clearfix">
{{> layout/path-nav}}
{{# saleTitle}}
<div class="header-title">
{{name}}
<p class="line-through"></p>
<p class="count-wrap">
<span class="count">共{{count}}个结果</span>
</p>
</div>
{{/ saleTitle}}
<div class="list-left pull-left">
{{> product/left-content}}
</div>
<div class="list-right pull-right">
{{# newMain}}
<div class="new-banner">
<a href="{{bannerHref}}">
<img src="{{banner}}">
</a>
</div>
<div class="new-brands clearfix">
<span class="iconfont pre">&#xe607;</span>
<div class="brands-wrap">
<ul class="brands">
{{# brands}}
<li>
<a href="{{href}}">
<img src="{{logo}}">
</a>
</li>
{{/ brands}}
</ul>
</div>
<span class="iconfont next">&#xe608;</span>
</div>
<div class="new-floor-title">
<span class="date">{{date}}</span>
<span class="title">{{title}}</span>
</div>
{{/ newMain}}
{{> product/standard-content}}
</div>
</div>
{{/ newSale}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> 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/latest-walk}}
{{/ search}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{#if latestWalk}}
<div class="latest-walk">
<h2>最近浏览的商品</h2>
<div class="goods clearfix">
{{# latestWalk}}
<div class="good">
<a href="{{href}}">
<img class="lazy" data-original="{{img}}">
</a>
<a class="name" href="{{href}}">{{name}}</a>
<p class="price">
{{#if salePrice}}
<span class="market-price">¥{{marketPrice}}</span>
{{/if}}
<span class="sale-price">¥{{salePrice}}</span>
</p>
</div>
{{/ latestWalk}}
</div>
</div>
{{/if}}
\ No newline at end of file
... ...
{{# 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">
<h2>
一周新品上架
<span>{{updateNum}}</span>
</h2>
<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">
<h2>
全部品类
<span>{{updateNum}}</span>
</h2>
<ul>
{{#each list}}
<li class="product-list-nav">
<h3>
<span class="icon-triangle"></span>
{{name}}
<span>{{num}}</span>
</h3>
<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}}
<h2 class="nav-pic-title">{{title}}</h2>
{{/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
... ...
<div class="no-result">
<p class="no-title">
抱歉!没有找到{{# keyWord}}与"<b class="keyword">{{.}}</b>"{{/ keyWord}}相关的商品
</p>
<div class="search-again clearfix">
<form method="GET" action="{{searchActionUrl}}">
<input id="no-result-input" name="query" type="text" placeholder="换个关键词试试">
<span id="search-again-btn">
<i class="iconfont">&#xe611;</i>
</span>
</form>
</div>
<p class="no-tip">建议您:看看输入的文字是否有误 / 减少分类条件限制 / 重新搜索</p>
</div>
\ No newline at end of file
... ...
<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">&#xe603;</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">&#xe603;</span>
{{^}}
<span class="active-icon iconfont">&#xe604;</span>
{{/if}}
{{^}}
<span class="active-icon iconfont">&#xe604;</span>
<span class="iconfont">&#xe614;</span>
{{/if}}
{{^}}
<span class="iconfont">&#xe614;</span>
<span class="iconfont">&#xe604;</span>
{{/if}}
{{^}}
<span class="iconfont">&#xe604;</span>
{{/if}}
</a>
{{/ sortType}}
</a>
{{/ sortType}}
{{# checks}}
<a class="checks{{#if checked}} checked{{/if}}" href="{{href}}">
{{#if checked}}
<span class="iconfont">&#xe612;</span>
{{^}}
<span class="iconfont">&#xe613;</span>
{{/if}}
{{name}}
</a>
{{/ checks}}
{{# checks}}
<a class="checks{{#if checked}} checked{{/if}}" href="{{href}}">
{{#if checked}}
<span class="iconfont">&#xe612;</span>
{{^}}
<span class="iconfont">&#xe613;</span>
{{/if}}
{{name}}
</a>
{{/ checks}}
<div class="pager-wrap">
<div class="page-count">
<span id="count-per-page">
{{countPerPage}}
<i class="iconfont">&#xe604;</i>
</span>
每页
<ul>
{{# pageCounts}}
<li>
<a href="{{href}}">{{count}}</a>
</li>
{{/ pageCounts}}
</ul>
</div>
{{#if ../goods}}
<div class="pager-wrap">
<div class="page-count">
<span id="count-per-page">
{{countPerPage}}
<i class="iconfont">&#xe604;</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">&#xe615;</span>
</a>
{{^}}
<span class="dis-icon iconfont">&#xe615;</span>
{{/if}}
<span>
<i>{{curPage}}</i>/{{pageCount}}
</span>
<p class="pager">
{{#if preHref}}
<a href="{{preHref}}">
<span class="iconfont">&#xe615;</span>
</a>
{{^}}
<span class="dis-icon iconfont">&#xe615;</span>
{{/if}}
{{#if nextHref}}
<a href="{{nextHref}}">
<span class="iconfont">&#xe601;</span>
</a>
{{^}}
<span class="dis-icon iconfont">&#xe601;</span>
{{/if}}
</p>
</div>
{{/if}}
</div>
{{/ opts}}
{{#if goods}}
<div class="goods-container clearfix">
{{#each goods}}
{{> product/good}}
{{/each}}
{{# hasNextPage}}
<div class="block-next-page">
<a href="{{href}}">
<img src="{{src}}" alt=""/>
</a>
</div>
{{/ hasNextPage}}
<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">&#xe601;</span>
</a>
{{^}}
<span class="dis-icon iconfont">&#xe601;</span>
{{/if}}
</p>
<div class="pager">
{{{pager}}}
</div>
</div>
</div>
\ No newline at end of file
{{^}}
{{> product/no-result}}
{{/if}}
\ No newline at end of file
... ...
... ... @@ -4,8 +4,76 @@
* @date: 2015/11/23
*/
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
require('yoho.placeholder');
require('./filter');
require('./sort-pager');
require('./product');
\ No newline at end of file
require('./product');
//最近浏览的商品Lazyload
lazyLoad($('.latest-walk .lazy'));
//无搜索结果
if ($('.no-result').length > 0) {
$('#no-result-input').placeholder();
$('#search-again-btn').click(function() {
$(this).closest('form').submit();
});
}
//NEW页面图片轮播切换
(function() {
var $brands = $('.brands');
var wrapWidth,
$firstBrand,
totalWidth,
perWidth;
if ($brands.length === 0) {
return;
}
wrapWidth = $('.brands-wrap').width();
$firstBrand = $brands.children('li:first-child');
perWidth = $firstBrand.width() + $firstBrand.css('margin-left').replace('px', '') * 1;
totalWidth = perWidth * $brands.children('li').length;
//针对NEW页面Header的brand banner切换
$('.new-brands').on('click', '.pre,.next', function() {
var $this = $(this),
left;
left = $brands.css('left');
if (left === 'auto') {
left = 0;
} else {
left = +left.replace('px', '');
}
if (($this).hasClass('pre')) {
//左边界
if (left + wrapWidth > 0) {
return;
}
$brands.css('left', left + wrapWidth + 'px');
} else {
//右边界
if (left - wrapWidth < -totalWidth) {
return;
}
$brands.css('left', left - wrapWidth + 'px');
}
});
}());
\ No newline at end of file
... ...
... ... @@ -104,17 +104,19 @@ exports.init = function(num) {
wrapperPt = $goodItemWrapper.css('paddingTop');
containerPt = $goodsContainer.css('paddingTop');
wrapperWidth = 10 + (15 + 50) * ulNum + event.targetWidth;
//wrapperWidth = 10 + (15 + 50) * ulNum + event.targetWidth;
wrapperWidth = $goodItemWrapper.width();
wrapperX = (event.targetX - 1) * (event.targetWidth + itemMr) - (parseInt(wrapperPl) + 1);
wrapperY = (event.targetY - 1) *
(event.targetHeight + itemMb) + parseInt(containerPt) - (parseInt(wrapperPt) + 1);
//todo
//event.offsetR表示当前列表距离浏览器右侧边缘的距离
diffWidth = event.offsetR - ((15 + 50) * ulNum + 25);
if (diffWidth <= 0) {
wrapperX = wrapperX + diffWidth;
wrapperX = wrapperX + diffWidth - 25;
}
$goodItemWrapper.css({
width: wrapperWidth,
... ...
/*
* @description: 404页面
* @author: chenglong.wang@yoho.cn
* @time: 2015/12/17
*/
.err-page {
width: 650px;
height: 200px;
overflow: hidden;
margin: 100px auto;
&:before {
content: '';
display: block;
width: 200px;
height: 200px;
background: image_url('404.png') center center no-repeat;
float: left;
}
.tips-404 {
float: left;
height: 200px;
padding-left: 20px;
.tip {
font-size: 24px;
color: #000;
margin-top: 55px;
}
.links {
font-size: 12px;
color: #666;
margin-top: 15px;
}
}
}
\ No newline at end of file
... ...
.pager {
font-size: 12px;
a {
height: 24px;
padding: 0 9px;
line-height: 24px;
display: inline-block;
text-align: center;
margin-right: 8px;
color: #222;
&.cur {
background-color: #222;
color: #fff;
}
}
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,8 @@
"header",
"footer",
"path-nav",
"plugin/slider";
"plugin/slider",
"pager";
body {
font-family: arial,"Microsoft YaHei";
... ... @@ -81,4 +82,4 @@ a:focus {
}
}
@import "home/index", "product/index", "guang/index", "passport/index";
@import "home/index", "product/index", "guang/index", "passport/index", "error";
... ...
... ... @@ -20,6 +20,10 @@
.attr-content {
margin-left: 90px;
.default {
padding-right: 140px;
}
}
.multi-select {
... ...
... ... @@ -143,4 +143,27 @@
.good-info {
margin-right: 10px;
}
}
/*next page*/
.block-next-page {
width: 222px;
height: 297px;
padding-top: 22px;
margin-bottom: 35px;
margin-right: 10px;
float: left;
cursor: pointer;
a {
display: block;
img {
width: 100%;
height: 100%;
display: block;
overflow: hidden;
}
}
}
\ No newline at end of file
... ...
@import "search", "list", "detail", "hot-rank", "filter-box", "sort-pager", "good";
@import "search", "list", "detail", "hot-rank", "new-sale", "filter-box", "sort-pager", "good", "latest-walk", "left-content", "no-result";
.product-page {
/*分页*/
.product-pager {
padding: 20px 0;
font-size: 12px;
color: #6a6a6a;
border-top: 2px solid #eaeceb;
.pager {
float: right;
}
}
/*分页 END*/
.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;
}
.block-next-page {
width: 235px;
height: 314px;
}
}
}
@media (max-width: 1180px) {
.product-list-page, .new-sale-page {
.list-right {
width: 810px;
}
.goods-container {
height: auto;
padding-top: 25px;
position: relative;
width: 810px + 10px;//每列增加右边距
.good-info {
width: 195px;
height: 350px;
}
.block-next-page {
width: 195px;
height: 261px;
}
}
}
}
\ No newline at end of file
... ...
.latest-walk {
overflow: hidden;
border-top: 2px solid #eaeceb;
font-size: 12px;
h2 {
padding-top: 15px;
font-size: 14px;
}
.goods {
width: 984px;
height: 241px;
margin: 30px 0;
overflow: hidden;
}
.good {
float: left;
margin-right: 14px;
}
img {
display: block;
width: 150px;
height: 201px;
}
.name {
display: block;
height: 18px;
line-height: 18px;
max-width: 150px;
margin: 5px 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.market-price {
color: #999;
margin-right: 5px;
text-decoration: line-through;
}
.sale-price {
color: #000;
font-weight: bold;
}
}
@media (max-width: 1180px) {
.latest-walk {
.goods {
width: 820px;
height: 301px;
}
.good {
margin-right: 10px;
}
img {
width: 195px;
height: 261px;
}
}
}
\ No newline at end of file
... ...
.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
... ...
.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;
... ... @@ -200,15 +86,58 @@
}
}
.goods-container {
height: auto;
padding: 25px 0 0 0;
position: relative;
width: 970px + 10px;//每列增加右边距
.sort-intro {
margin-bottom: 20px;
.texts {
width: 386px;
height: 298px;
padding: 0 50px;
border: 1px solid #eaeceb;
text-align: center;
}
.name {
font-size: 30px;
font-weight: bold;
margin-top: 60px;
}
.en-name {
font-size: 14px;
font-weight: bold;
}
.desc {
margin-top: 15px;
color: #666;
margin-top: 15px;
font-size: 12px;
line-height: 150%;
}
.img {
width: 480px;
height: 300px;
}
}
}
@media (max-width: 1180px) {
.product-list-page .sort-intro {
.texts {
width: 346px;
height: 248px;
padding: 0 30px;
}
.good-info {
width: 235px;
.name {
margin-top: 30px;
}
.img {
width: 400px;
height: 250px;
}
}
}
\ No newline at end of file
... ...
.new-sale-page {
.header-title {
position: relative;
width: 100%;
height: 42px;
margin: 20px 0;
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;
}
}
.new-banner img {
display: block;
width: 100%;
}
.new-brands {
position: relative;
width: 100%;
margin-top: 25px;
> * {
float: left;
}
.pre, .next {
position: absolute;
display: block;
width: 40px;
height: 40px;
line-height: 40px;
color: #fff;
background: #e0e0e0;
text-align: center;
top: 50%;
margin-top: -20px;
cursor: pointer;
opacity: 0.8;
filter: Alpha(opacity=80);
&:hover {
opacity: 0.9;
filter: Alpha(opacity=90);
}
}
.pre {
left: 0;
}
.next {
right: 0;
}
.brands-wrap {
position: relative;
overflow: hidden;
width: 890px;
height: 76px;
margin-left: 40px;
}
.brands {
position: absolute;
width: auto;
height: 76px;
}
.brands li {
float: left;
margin-left: 14px;
a {
display: block;
width: 164px;
height: 76px;
line-height: 76px;
vertical-align: middle;
text-align: center;
}
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
border: none;
}
}
}
.new-floor-title {
position: relative;
margin: 35px auto;
width: 300px;
height: 31px;
line-height: 31px;
font-size: 18px;
border: 1px solid #000;
.date {
position: absolute;
left: -1px;
top: -1px;
width: 155px;
height: 33px;
color: #fff;
text-align: center;
background: image-url('product/floor-title.png');
}
.title {
float: right;
margin-right: 40px;
}
}
}
@media (max-width: 1180px) {
.new-sale-page .new-brands .brands-wrap {
width: 730px;
}
}
\ No newline at end of file
... ...
.product-page .no-result {
border: 1px solid #eaeceb;
padding: 60px 0;
text-align: center;
margin-bottom: 20px;
.no-title {
font-size: 16px;
}
.keyword {
color: #ee0011;
}
.search-again {
width: 490px;
margin: 15px auto;
input {
float: left;
width: 380px;
height: 18px;
padding: 15px 5px;
border: 10px solid #343434;
color: #333;
outline: none;
}
span {
float: left;
display: block;
width: 80px;
height: 24px;
line-height: 24px;
padding: 22px 0;
background: #343434;
vertical-align: middle;
color: #fff;
}
.iconfont {
font-size: 26px;
}
}
.no-tip {
font-size: 12px;
color: #999;
}
}
\ No newline at end of file
... ...
... ... @@ -73,8 +73,7 @@
.pager {
float: left;
font-size: 14px;
line-height: 15px;
margin: 0 20px;
margin: -15px 20px 0;
.dis-icon {
color: #e6e6e6;
... ...
... ... @@ -21,6 +21,7 @@ class ErrorController extends AbstractAction
public function errorAction($exception)
{
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
... ... @@ -31,12 +32,11 @@ class ErrorController extends AbstractAction
$this->setTitle('页面不存在');
$this->setNavHeader('抱歉,页面不存在!', true, SITE_MAIN);
// 生成HTML (error.html)
$this->_view->html('error');
// 渲染模板
$this->_view->display('index', array(
'pageFooter' => true,
'showDownloadApp' => true,
'errorPage' => array(
'newProductLink' => '###'
),
'pageFooter' => true
));
}
... ...
... ... @@ -290,8 +290,6 @@ class IndexController extends AbstractAction
'href' => ''
)
),
'fivePerLine' => true,
'sixPerLineHref' => '',
'countPerPage' => '120',
'pageCounts' => array(
array(
... ... @@ -310,68 +308,77 @@ class IndexController extends AbstractAction
'curPage' => 1,
'pageCount' => 30,
'nextHref' => 'hello'
)
),
'goods' => array(
0 => array(
'tags' => array(
'isNew' => true,
'isYearEndPromotion' => true
),
// 无搜索结果字段
// 'keyWord' => '123'
// 'searchActionUrl' => ''
'goods' => array(
0 => 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
),
'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
),
1 => array(
'tags' => array(
'isNew' => true,
'isReNew' => true
1 => 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
),
'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
),
2 => array(
'tags' => array(
'isNew' => true,
'isReNew' => true
2 => 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'
),
'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'
),
3 => 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'
),
4 => array(
'tags' => array(
'isNew' => true,
'isReNew' => true
3 => 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'
),
'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'
),
5 => array(
'tags' => array(
'isNew' => true,
'isReNew' => true
4 => 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'
),
'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'
)
)
5 => 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'
)
),
'hasNextPage' => array(
'href' => '',
'src' => 'http://img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
),
'totalCount' => '2273',
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="ifont10">&gt;</span></a>'
),
);
$this->_view->display('search', $data);
}
... ... @@ -417,6 +424,12 @@ class IndexController extends AbstractAction
)
)
),
'sortIntro' => array(
'name' => '羽绒服',
'enName' => 'DOWN COAT',
'desc' => '羽绒服是冬季必不可少的服饰之一,冬天的街头充斥着各种各样的羽绒服,特别是在北方。时下羽绒服融入了毛领、收腰等时尚元素,更显潮人们的完美身材。',
'img' => 'http://img13.static.yhbimg.com/adpic/2015/12/22/06/0276abe61367884cea21b779e47141891b.jpg'
),
'filters' => array(
'checkedConditions' => array(
'conditions' => array(
... ... @@ -765,56 +778,346 @@ class IndexController extends AbstractAction
'salePrice' => '899'
)
),
'allSort' => array(
'updateNum' => 145,
'list' => array(
array(
'name' => '裙装',
'num' => '10',
'childList' => array(
'hasNextPage' => array(
'href' => '',
'src' => 'http://img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
),
'leftContent' => array(
array(
'allSort' => array(
'updateNum' => 145,
'list' => array(
array(
'name' => '全身裙装',
'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(
'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(
'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">&gt;</span></a>',
'latestWalk' => array(
array(
'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/08/24/11/018fd5cbe604b37ea35336257fcbff8114.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'Life·After Life 牛角扣夹棉连帽大衣(M51款)【吴亦凡亲身试着】',
'marketPrice' => '939',
'salePrice' => '679'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
)
)
)
);
$this->_view->display('list', $data);
}
/**
* new sale
*/
public function newSaleAction()
{
$data = array(
'productListPage' => true,
'newSale' => array(
'pathNav' => array(
array(
'href' => 'new.yohobuy.com/girls',
'name' => 'GRILS首页'
),
array(
'href' => '/?sort=1',
'name' => '新品到着'
)
),
'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(
'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' => '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(
'allDiscount' => array(
'updateNum' => 130,
'list' => array(
array(
'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'
)
... ... @@ -822,80 +1125,403 @@ class IndexController extends AbstractAction
)
)
),
'advNav' => array(
'advNavTitle' => 'AAAA',
'list' => array(
//SALE页面内容
// 'saleBanner' => array(
// 'bannerHeight' => 350,
// 'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
// ),
// 'saleTitle' => array(
// 'name' => '全部商品',
// 'count' => 540
// ),
//NEW页面内容
'newMain' => array(
'banner' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/23/07/010a459d41b99a839cba9377532f1c19b2.jpg?imageView/3/w/970/h/200',
'date' => '12月16日',
'title' => '新品到着',
'brands' => array(
array(
'href' => '',
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2012/02/28/15/02b2b5ded161ab31e2e097a327ed475052.jpg?imageView/2/w/170/h/120'
),
array(
'href' => 'http://adidas.yohobuy.com/?folder=1366',
'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
'href' => '',
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2012/11/09/09/023721f44182f775d79904010af421331e.jpg?imageView/2/w/170/h/120'
),
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(
'href' => '',
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2012/12/13/17/01408fb72646c8f3fa59d870514f08a356.jpg?imageView/2/w/170/h/120'
),
array(
'href' => 'http://adidas.yohobuy.com/?folder=1366',
'src' => 'http://img02.static.yohobuy.com/cms/2015/11/10/15/02ee7970deb68390b77cbf0685f26fc5bf.jpg'
'href' => '',
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2012/12/24/13/0265b45e37af697c5ba12d5415fb341f27.jpg?imageView/2/w/170/h/120'
),
array(
'href' => '',
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2015/08/11/15/012d09a5cae187af1f6f3ed246b9b5a4fc.jpg?imageView/2/w/170/h/120'
),
array(
'href' => 'http://adidas.yohobuy.com/?folder=1366',
'src' => 'http://img02.static.yohobuy.com/cms/2015/11/10/15/02ee7970deb68390b77cbf0685f26fc5bf.jpg'
'href' => '',
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2015/08/20/16/01047ffb3ca182871821d551af31ac2378.jpg?imageView/2/w/170/h/120'
)
)
),
'newSales' => array(
'updateNum' => 130,
'list' => array(
'filters' => array(
'checkedConditions' => array(
'conditions' => array(
array(
'href' => '',
'name' => '暗黑'
),
array(
'href' => '',
'color' => '#f00'
),
array(
'href' => '',
'name' => 'CLOT'
)
),
'clearUrl' => ''
),
'channel' => array(
array(
'name' => '12月03日',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'href' => '/?gender=1,3',
'name' => 'BOYS'
),
array(
'name' => '12月03日',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'href' => '/?gender=2,3',
'name' => 'GIRLS'
),
array(
'name' => '12月03日',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'href' => '',
'name' => 'KIDS'
),
array(
'name' => '12月03日',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'href' => '',
'name' => 'LIFESTYLE'
)
)
),
'allDiscount' => array(
'updateNum' => 130,
'list' => array(
),
'sort' => array(
array(
'id' => '1',
'name' => '上衣',
'sub' => array(
array(
'href' => '',
'name' => 'T恤'
),
array(
'href' => '',
'name' => '棉袄'
),
array(
'href' => '',
'name' => '外套'
)
)
),
array(
'name' => '1~3折',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'id' => '2',
'name' => '裤子'
),
array(
'name' => '4~6折',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'id' => '3',
'name' => '连衣裙'
),
array(
'name' => '7折',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'id' => '4',
'name' => '鞋'
)
)
)
)
);
$this->_view->display('list', $data);
),
'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">&gt;</span></a>'
)
);
$this->_view->display('new-sale', $data);
}
/*
... ...