Showing 39 changed files with 3874 additions and 657 deletions

Too many changes to show.

To preserve performance only 39 of 39+ files are displayed.

... ... @@ -331,295 +331,362 @@
]
}
## 搜索页
## 搜索、列表、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: [
{
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: ''
}
],
//重要提示:页面筛选无结果时,接下来的参数不用传;
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: [
//商品信息
...
]
...,//标准页面内容,见上
}
}
## Passport
### 【公用】左侧YohoFamily LOGO
### new/sale
{
coverHref: '', //跳转链接,需要有跳转就传,不需要就不传
coverImg: '' //图片地址
}
### 登录页
newSale: {
banner: {
bannerHeight: 222,
img: ''
},
{
passport: {
coverHref: '', //跳转链接,需要有跳转就传,不需要就不传
coverImg: '' //图片地址
title: {
name: '全部商品',
count: 2555
},
countryCode: '86', //无+
countryName: '中国',
leftContent: [],
countryList: [
{
code: '',
name: ''
},
...
]
..//标准页面内容,见上
}
}
## 逛
### 【公用】资讯
{
id: '',
classification: '最新',
... ... @@ -813,7 +880,36 @@
}
}
## 注册页
## Passport
### 【公用】左侧YohoFamily LOGO
{
coverHref: '', //跳转链接,需要有跳转就传,不需要就不传
coverImg: '' //图片地址
}
### 登录页
{
passport: {
coverHref: '', //跳转链接,需要有跳转就传,不需要就不传
coverImg: '' //图片地址
countryCode: '86', //无+
countryName: '中国',
countryList: [
{
code: '',
name: ''
},
...
]
}
}
### 注册页
{
registerPage: true, //用于加载js
... ... @@ -894,7 +990,4 @@
}
}
]
}
一键海淘
值得买
我的收藏
}
\ No newline at end of file
... ...
{{> 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
... ...
{{> layout/header}}
<div class="product-detail-page yoho-page">
{{# detail}}
{{# banner}}
<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}}">
</a>
<div class="opt pull-right">
<a class="home" href="{{homeUrl}}">
<span class="iconfont">&#xe617;</span>
</a>
<span id="brand-favour" class="brand-fav">
<i class="iconfont{{#if coled}} coled{{/if}}">&#xe616;</i>
</span>
</div>
</div>
</div>
{{/ banner}}
<div class="center-content">
{{> layout/path-nav}}
{{# goodInfo}}
<div class="main clearfix" data-skn="{{skn}}">
<div class="pull-left imgs clearfix">
<div class="pull-left img">
<div class="tags clearfix">
{{# tags}}
{{# isNew}}
<span class="good-tag new-tag">NEW</span>
{{/ isNew}}
{{# isReNew}}
<span class="good-tag renew-tag">再到着</span>
{{/ isReNew}}
{{# isSale}}
<span class="good-tag sale-tag">SALE</span>
{{/ isSale}}
{{# isNewFestival}}
<span class="good-tag new-festival-tag">新品节</span>
{{/ isNewFestival}}
{{# isLimit}}
<span class="good-tag limit-tag">限量商品</span>
{{/ isLimit}}
{{# isYearEndPromotion}}
<span class="good-tag yep-tag">年终大促</span>
{{/ isYearEndPromotion}}
{{# isYearMidPromotion}}
<span class="good-tag ymp-tag">年中热促</span>
{{/ isYearMidPromotion}}
{{# isFew}}
<p class="good-tag few-tag">即将售罄</p>
{{/ isFew}}
{{/ tags}}
</div>
<img id="img-show" class="img-show" src="{{img}}">
</div>
<div id="thumbs" class="pull-right thumbs">
{{# colors}}
<div class="thumb-wrap{{#unless focus}} hide{{/unless}}">
{{#if focus}}
{{# thumbs}}
<a href="{{url}}">
<img class="thumb" src="{{img}}" data-shower="{{shower}}">
</a>
{{/ thumbs}}
{{^}}
{{# thumbs}}
<a href="{{url}}">
<img class="thumb lazy" data-original="{{img}}" data-shower="{{shower}}">
</a>
{{/ thumbs}}
{{/if}}
</div>
{{/ colors}}
</div>
</div>
<div class="pull-right infos">
<p class="name">
{{name}}
</p>
<a class="brand-name" href="{{brandUrl}}">{{brandName}}</a>
<p class="market-price {{#if salePrice}}with-sale{{/unless}}">
<span class="title">市场价:</span>
<span class="price">¥{{marketPrice}}</span>
</p>
{{#if salePrice}}
<p class="sale-price">
<span class="title">促销价:</span>
<span class="price">¥{{salePrice}}</span>
</p>
{{/if}}
{{#if activity}}
<ul class="activity">
{{#each activity}}
<li>
{{#if sizeImg}}
<a class="img-link" href="{{url}}">
<img src="{{sizeImg}}">
</a>
{{^}}
<span class="ac-type">{{type}}</span>
<span class="ac-des">【{{des}}】</span>
{{/if}}
</li>
{{/each}}
</ul>
{{/if}}
<div class="trade-content">
<div id="type-chose" class="type-chose">
<div class="chose-color row clearfix">
<span class="title pull-left">选颜色:</span>
<ul class="colors pull-left clearfix">
{{#each colors}}
<li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left" title="{{title}}">
<img src="{{src}}">
</li>
{{/each}}
</ul>
</div>
<div class="chose-size row clearfix">
<span class="title pull-left">选尺码:</span>
<div id="sizes" class="size-wrapper pull-left clearfix">
{{#each colors}}
<ul class="size {{#unless focus}}hide{{/unless}} clearfix">
{{#each size}}
<li {{#unless num}}class="disable"{{/unless}} data-title="{{title}}" data-sku="{{sku}}" data-num="{{num}}">{{name}}</li>
{{/each}}
</ul>
{{/each}}
<span class="size-ruler"></span>
<span class="size-warn warn-tip hide">
<i class="iconfont">&#xe62c;</i>
请选择尺码
</span>
<p class="color-size-tip hide"></p>
</div>
</div>
<div class="chose-count row clearfix">
<span class="title pull-left">选数量:</span>
<div class="num-wraper pull-left clearfix">
<span id="num" class="num pull-left">1</span>
<span class="minus-plus pull-left">
<i id="plus-num" class="plus iconfont">&#xe610;</i>
<i id="minus-num" class="minus iconfont">&#xe600;</i>
</span>
<span id="num-warn" class="num-warn warn-tip hide">
<i class="iconfont">&#xe62c;</i>
库存不足
</span>
</div>
</div>
<p class="row">
<span id="add-to-cart" class="add-to-cart">
<i class="iconfont">&#xe628;</i>
添加到购物车
</span>
<span id="sold-out" class="sold-out hide">
<i class="iconfont">&#xe62d;</i>
已售罄
</span>
<span id="collect-product" class="{{#if coled}}coled {{/if}}collect-product">
<i class="iconfont">&#xe616;</i>
{{#if coled}}
<em>已收藏</em>
{{^}}
<em>收藏商品</em>
{{/if}}
</span>
</p>
<p class="share-row">
<span class="title pull-left">分享商品:</span>
<span class="share-wrapper pull-left clearfix">
<i class="weibo" data-type="weibo" title="分享到新浪微博"></i>
<i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>
<i class="qweibo" data-type="qweibo" title="分享到腾讯微博"></i>
<i class="qzone" data-type="qzone" title="分享到QQ空间"></i>
<i class="qq" data-type="qq" title="分享到QQ好友"></i>
<i class="renren" data-type="renren" title="分享到人人"></i>
<i class="douban" data-type="douban" class="分享到豆瓣"></i>
</span>
</p>
</div>
<div id="balance" class="balance">
<p class="success-tip">商品已成功添加到购物车!</p>
<p class="cart-total">购物车一共有<span id="cart-num">0</span>件商品</p>
<p class="balance-btns">
<a class="go-cart" href="{{goCartUrl}}">
去购物车结算
<i class="iconfont">&#xe601;</i>
</a>
<span id="keep-shopping" class="keep-shopping">
继续购物
</span>
</p>
</div>
</div>
</div>
</div>
{{/ goodInfo}}
<div class="other-infos">
<div class="description-material info-block">
<p class="block-title">
<span class="title cur">商品信息 DESCRIPTION</span>
<span class="sep">|</span>
<span class="title">材质洗涤 MATERIALS</span>
</p>
<div class="description-content">
{{# description}}
<ul class="basic clearfix">
{{# basic}}
<li>
{{key}}: {{value}}
</li>
{{/ basic}}
</ul>
{{#if comfort}}
<ul class="comfort clearfix">
{{# comfort}}
<li class="pull-left">
<span class="comfort-title">{{name}}:</span>
<span class="min-des">{{minDes}}</span>
{{# blocks}}
<span class="comfort-block {{#if cur}}cur{{/if}}"></span>
{{/ blocks}}
<span class="max-des">{{maxDes}}</span>
</li>
{{/ comfort}}
</ul>
{{/if}}
{{/ description}}
</div>
<div class="material-content">
{{# material}}
{{#if detail}}
<ul class="material-detail clearfix">
{{# detail}}
<li>
<img src="{{img}}">
<p class="name">{{name}}<br>{{enName}}</p>
<p class="text">{{text}}</p>
</li>
{{/ detail}}
</ul>
{{/if}}
{{#if wash}}
<ul class="wash">
{{# wash}}
<li>
<img class="wash-icon" src="{{img}}">
<p class="wash-name">{{name}}</p>
</li>
{{/ wash}}
</ul>
{{/if}}
{{/ material}}
</div>
</div>
<div class="size-info info-block">
<p class="block-title">
<span class="title cur">尺码信息 SIZE INFO</span>
</p>
{{# size}}
<table class="size-table">
<thead>
<tr>
{{# thead}}
<th width="{{width}}">{{name}}</th>
{{/ thead}}
</tr>
</thead>
<tbody>
{{# tbody}}
<tr>
{{#each .}}
<td>{{.}}</td>
{{/each}}
</tr>
{{/ tbody}}
</tbody>
</table>
<p class="size-tip">
以上尺寸为实物人工测量,因测量方式不同会有1-2CM误差,相关数据仅作参考,以收到实物为准。 单位:CM
</p>
<p class="size-tip">
参考尺码因衣服版型、剪裁不同会有误差,仅供参考
</p>
{{#if sizeImg}}
<img class="size-img" src="{{sizeImg}}">
{{/if}}
{{/ size}}
</div>
{{#if reference}}
<div class="reference info-block">
<p class="block-title">
<span class="title cur">模特试穿 REFERENCE</span>
</p>
{{# reference}}
<table class="reference-table">
<thead>
<tr>
{{# thead}}
<th width="{{width}}">{{name}}</th>
{{/ thead}}
</tr>
</thead>
<tbody>
{{# tbody}}
<tr>
{{#each .}}
<td>
{{#if @first}}
<img class="avatar" src="{{.}}">
{{^}}
{{.}}
{{/if}}
</td>
{{/each}}
</tr>
{{/ tbody}}
</tbody>
</table>
{{/ reference}}
<p class="size-tip">
模特试穿中身高单位:CM,体重单位:KG,三围单位:CM
</p>
</div>
{{/if}}
<div class="details info-block">
<p class="block-title">
<span class="title cur">商品详情 DETAILS</span>
</p>
<div class="details-html">
{{{details}}}
</div>
</div>
{{# consultComment}}
<div class="consult-comment info-block">
<p class="block-title">
<span class="title">顾客咨询({{consultNum}})</span>
<span class="sep">|</span>
<span class="title cur">购买评价({{commentNum}})</span>
</p>
<div class="comments cc-content">
<h2>购买评价({{commentNum}})</h2>
<ul id="comments-ul">
{{# comments}}
<li>
<div class="user-info clearfix">
<img class="user-avatar pull-left" src="{{avatar}}">
<p>
<span class="name">{{userName}} </span>
购买了{{color}}/{{size}}
<br>
<span class="date">{{date}}</span>
</p>
</div>
<p class="comment">{{comment}}</p>
</li>
{{/ comments}}
</ul>
{{#if hasMoreComments}}
<p class="more-wrap">
<span class="load-more-comments load-more">
加载更多
<i class="iconfont">&#xe61d;</i>
</span>
</p>
{{/if}}
<p class="btn-wrap">
<a class="btn" href="{{commentUrl}}" target="_blank">
<i class="iconfont">&#xe62a;</i>
我要评论
</a>
</p>
</div>
<div class="consults cc-content">
<h2>顾客咨询({{consultNum}})</h2>
<ul id="consults-ul">
{{# consults}}
<li>
<div class="user-info clearfix">
<img class="user-avatar" src="{{avatar}}">
<p>
<span class="question">{{question}}</span>
<br>
<span class="date">{{date}}</span>
</p>
</div>
<p class="consult">{{answer}}</p>
</li>
{{/ consults}}
</ul>
{{#if hasMoreConsults}}
<p class="more-wrap">
<span class="load-more-consults load-more">
加载更多
<i class="iconfont">&#xe61d;</i>
</span>
</p>
{{/if}}
<p class="btn-wrap">
<span id="consults-btn" class="btn">
<i class="iconfont">&#xe62a;</i>
我要咨询
</span>
</p>
<div class="new-consult hide">
<textarea class="my-consult"></textarea>
<span class="consult-warn warn-tip hide">
<i class="iconfont">&#xe62c;</i>
请输入咨询内容
</span>
<div class="captcha-row">
<input class="captcha" type="text">
<img class="captcha-img" src="http://www.yohobuy.com/passport/images?g=consult">
<span class="captcha-warn warn-tip hide">
<i class="iconfont">&#xe62c;</i>
<em>请输入验证码</em>
</span>
</div>
<span id="submit-consult" class="btn submit-consult">提交咨询</span>
</div>
<div class="consult-success hide">
<p>
<span class="iconfont">&#xe61a;</span>
咨询成功,请等待客服回复
</p>
</div>
</div>
</div>
{{/ consultComment}}
<div class="after-service">
<p id="after-service-switch" class="after-service-switch">
<span class="iconfont">&#xe62b;</span>
售后服务
<span class="iconfont triangle">&#xe604;</span>
</p>
<div class="after-service-content info-block">
<div class="block-title">
<span class="title cur">售后服务 AFTER SERVICE</span>
</div>
<div class="img-1"></div>
<div class="img-2"></div>
<div class="text">
<h4>退换货承诺</h4>
<p>自您签收商品7日内可以退货,15日内可以换货,在商品不影响二次销售的情况下,YOHO!有货将为您办理退换货服务,请在网站提交"退换货"申请。需要说明的是:非质量问题的退换货,来回运费由您承担。</p>
<h4>退换货方式</h4>
<p>
针对国内大中型城市,YOHO!有货开通了<span class="orange">"上门换货"</span>服务,上门服务区域及费用请联系客服中心;若您所在的区域不在上门换货范围内,请您选择普通快递将商品、内包装、赠品及发货单等一并寄回。质量问题的退换货,目前不支持运费到付款业务,请您先垫付运费寄回。如需退换货,请致电客服电话:400-889-9646
</p>
<h4>退换货邮寄地址</h4>
<p>
南京市江宁区江宁经济技术开发区苏源大道87号YOHO!有货物流中心东一楼 收件人:YOHO!有货 邮编:211106
<br>
YOHO!有货客服热线:400-889-9646  客服邮箱:<a href="mailto:service@yoho.cn">service@yoho.cn</a>
<br>
有疑问请联系我们,我们将为您提供最优质的产品和服务。
</p>
</div>
</div>
</div>
<div class="service"></div>
<div class="info-block">
<p class="block-title">
<span class="title cur">最近浏览 RECENT REVIEW</span>
</p>
<ul class="recent-view clearfix">
{{# recentView}}
<li>
<a href="{{url}}">
<img src="{{img}}">
</a>
<a class="name" href="{{url}}">{{name}}</a>
<p class="price">
<span class="market-price {{#if salePrice}}has-sale{{/if}}">¥{{marketPrice}}</span>
{{#if salePrice}}
<span class="sale-price">¥{{salePrice}}</span>
{{/if}}
</p>
</li>
{{/ recentView}}
</ul>
</div>
</div>
</div>
{{/ detail}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -26,6 +26,13 @@
</script>
{{/if}}
{{!-- 商品详情页 --}}
{{#if productDetailPage}}
<script>
seajs.use('js/product/item');
</script>
{{/if}}
{{!-- 逛 --}}
{{#if guangIndexPage}}
<script>
... ...
{{#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
... ...
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Wed Dec 16 20:00:14 2015
Created by FontForge 20120731 at Wed Dec 23 15:19:53 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Wed Dec 16 20:00:14 2015
bbox="0 -214 1172.1 864"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E627"
unicode-range="U+0078-E62E"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -134,5 +134,30 @@ q14 5 23 14.5t12 20.5t3 23t-3.5 22t-8.5 18t-10 11zM0 295v-380q0 -28 20 -48.5t49
<glyph glyph-name="uniE627" unicode="&#xe627;" horiz-adv-x="1025"
d="M512 623q-167 0 -304.5 -89.5t-205.5 -236.5q-4 -9 0 -18q45 -96 121 -169.5t177 -115t212 -41.5q167 0 304.5 89.5t205.5 236.5q1 3 1.5 6t0 6t-1.5 6q-68 147 -205.5 236.5t-304.5 89.5zM512 57q-96 0 -163.5 67.5t-67.5 163.5t67.5 163.5t163.5 67.5t163.5 -67.5
t67.5 -163.5q0 -47 -18.5 -89.5t-49.5 -73.5t-73.5 -49.5t-89.5 -18.5zM364 288q0 -61 43.5 -104.5t104.5 -43.5t104.5 43.5t43.5 104.5t-43.5 104.5t-104.5 43.5t-104.5 -43.5t-43.5 -104.5z" />
<glyph glyph-name="uniE628" unicode="&#xe628;"
d="M482 83q-24 0 -41.5 -17.5t-17.5 -42.5t17.5 -42.5t42 -17.5t42 17.5t17.5 42.5q0 16 -8 30t-21.5 22t-30.5 8zM769 83q-25 0 -42.5 -17.5t-17.5 -42.5q0 -16 8 -30t21.5 -22t30.5 -8q25 0 42.5 17.5t17.5 42.5q0 38 -34 54q-13 6 -26 6zM839 193h-417l-143 425
q-7 18 -29 18h-127q-13 0 -22 -8t-9 -20q0 -4 1 -7t2.5 -6t3.5 -5.5t4.5 -4.5t5.5 -3.5t6.5 -2t7.5 -0.5h105l143 -424q7 -19 29 -19h439q13 0 21.5 8t8.5 20.5t-8.5 20.5t-21.5 8zM904 524l-516 45q-12 1 -18.5 -7t-1.5 -20l90 -270q4 -12 16 -21.5t24 -9.5h377q12 0 22 10
t11 23l23 216q1 8 -2 15.5t-10 12.5t-15 6z" />
<glyph glyph-name="uniE629" unicode="&#xe629;"
d="M154 686v-646h146l-14 -208l240 208h344v646h-716zM752 176h-134v159h-192v-159h-134v382h134v-148h192v148h134v-382z" />
<glyph glyph-name="uniE62A" unicode="&#xe62a;"
d="M328 -66q-3 0 -5.5 0.5t-5.5 2.5q-14 6 -14 22v128h-193q-10 0 -17.5 7t-7.5 18v549q0 10 7.5 17.5t17.5 7.5h804q7 0 13 -3.5t9 -9t3 -12.5v-549q0 -11 -7 -18t-18 -7h-401l-169 -146q-7 -7 -16 -7zM171 172h188q10 0 17.5 -7.5t7.5 -17.5v-73l103 92q7 6 17 6h350v426
h-683v-426zM739 485h-454q-5 0 -9.5 2t-8 5t-5.5 8t-2 10q0 10 7.5 17.5t17.5 7.5h454q3 0 5.5 -0.5t4.5 -1.5t4 -2.5t3.5 -3t3 -3.5t2.5 -4.5t1.5 -5t0.5 -4.5q0 -11 -7 -18t-18 -7zM739 362h-454q-4 0 -8 1t-7 3.5t-5.5 5.5t-3.5 7t-1 8t1 8t3.5 7t5.5 5t7 3.5t8 1.5h454
q10 0 17.5 -7.5t7.5 -18t-7 -17.5t-18 -7zM549 239h-264q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h264q10 0 17.5 -7.5t7.5 -17.5q0 -7 -3.5 -12.5t-9 -9t-12.5 -3.5z" />
<glyph glyph-name="uniE62B" unicode="&#xe62b;"
d="M511 -144q-73 0 -141 22.5t-123 64t-96.5 96.5t-64 123t-22.5 141q0 60 16 118t45 107t70 90t90 70t107 45t119 16q90 0 173 -35.5t142.5 -95.5t95 -142.5t35.5 -172.5q0 -46 -9 -90.5t-26 -84t-41.5 -75.5t-54.5 -66t-66 -54.5t-75.5 -41.5t-84 -26t-89.5 -9zM511 703
q-82 0 -156 -32t-127.5 -85.5t-85.5 -127.5t-32 -155q0 -109 54 -201.5t146 -146t200.5 -53.5t201 53.5t146 146t53.5 201.5q0 165 -117.5 282.5t-282.5 117.5zM465 164v29q0 9 1 17.5t2 15.5l2 10q1 5 3 9.5t4 8.5q1 2 2 4.5t2 4.5t2.5 4t2.5 4t2.5 4.5t3.5 4.5
q10 12 24 26l35 33q15 13 25.5 29.5t10.5 39.5q0 15 -5 27.5t-14 23.5q-5 5 -10.5 8.5t-12.5 6.5t-14.5 4t-16.5 1q-18 0 -32 -6q-5 -3 -9 -5.5t-8 -5.5t-8 -7q-1 -2 -2.5 -3.5t-3 -3.5t-2.5 -3.5t-2 -3.5l-2 -4l-2 -4l-2 -4q-1 -5 -2.5 -10t-2.5 -10t-1 -10l-95 8
q5 37 20 66t39 49q12 10 25.5 18t29.5 13q31 10 66 10q33 0 63 -9.5t53 -28.5q6 -5 11 -10t9.5 -11t8 -12.5t7.5 -13.5q13 -27 13 -64q0 -12 -1.5 -23t-3.5 -20q-2 -4 -3 -7.5t-3 -7.5l-2 -6q-2 -4 -4 -7l-4 -6q-10 -16 -24 -30q-5 -5 -10 -9.5t-11 -10t-11 -10.5
q-16 -13 -25.5 -23t-15.5 -20t-8 -22q-1 -5 -1.5 -12.5t-0.5 -15.5v-20h-92zM450 56q0 25 18 43t44 18q24 0 43 -17q18 -18 19 -42q0 -13 -5 -23.5t-14 -19.5q-18 -17 -43 -17q-12 0 -23.5 4.5t-20.5 12.5q-8 7 -13 18t-5 23z" />
<glyph glyph-name="uniE62C" unicode="&#xe62c;"
d="M505 776q77 0 148.5 -23.5t129 -67t101 -101.5t67.5 -129.5t24 -147.5q0 -64 -17 -125t-47.5 -112t-74 -94.5t-94.5 -74t-112 -47.5t-125 -17q-95 0 -182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -104q112 0 206.5 55t149.5 149.5
t55 206.5q0 37 -6.5 73.5t-19.5 69.5t-30.5 64t-40.5 57.5t-49.5 49.5t-57.5 40.5t-64 30t-69.5 19t-73.5 6.5q-111 0 -205.5 -55t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 138v-59h-58v59h58zM470 564h58v-349h-58v349z" />
<glyph glyph-name="uniE62D" unicode="&#xe62d;"
d="M828 618q65 -65 98 -148t33 -169t-33 -169t-98 -148q-66 -66 -149 -99q-16 -6 -33 -11.5t-33.5 -9t-33.5 -6.5t-34 -4t-35 -1q-43 0 -85 8t-84 24q-82 33 -148 98q-66 66 -98.5 149t-32.5 169t32.5 169t98.5 149q66 65 148.5 97.5t168.5 32.5q15 0 29 -0.5t28 -2.5
t28.5 -4.5t28.5 -6.5t27.5 -8.5t27.5 -9.5q83 -33 149 -99v0zM258 49q53 -53 118.5 -79t134.5 -26q34 0 68 6.5t67 19.5q65 26 117.5 78.5t78.5 118t26 134.5q0 35 -6.5 68.5t-19.5 66.5q-26 65 -78 118q-53 53 -119 79t-135 26q-23 0 -45.5 -3t-44.5 -9t-44 -14
q-66 -26 -118 -78.5t-78.5 -118t-26.5 -134.5t26.5 -134.5t78.5 -118.5v0zM748 602l69 -72l-531 -530l-70 70zM748 602z" />
<glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1025"
d="M491 6q9 -10 21.5 -10t21.5 10l357 407q4 5 5.5 9.5t0 8t-6 5.5t-11.5 2h-133q-14 0 -23.5 9.5t-9.5 22.5v261q0 9 -4.5 16.5t-12.5 11.5t-17 4h-333q-14 0 -24 -9.5t-10 -22.5v-261q0 -13 -9.5 -22.5t-23.5 -9.5h-133q-14 0 -17.5 -7.5t5.5 -17.5z" />
</font>
</defs></svg>
... ...
/**
* 商品详情页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/12/23
*/
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
var $imgShow = $('#img-show'),
$thumbs = $('#thumbs > .thumb-wrap');
var $size = $('#sizes'),
$sizes = $size.children('.size'),
$sizeWarn = $size.children('.size-warn'),
$colorSizeTip = $size.children('.color-size-tip');
var $num = $('#num'),
$plusNum = $('#plus-num'),
$minusNum = $('#minus-num'),
$numWarn = $('#num-warn');
var $addToCart = $('#add-to-cart'),
$soldOut = $('#sold-out');
var thumbsLoaded = {};
var skn = $('.main').data('skn');
var maxStock = -1; //记录当前选中的颜色-尺码的库存量,若为-1,代表未选择尺码
var SLIDETIME = 200;
var colTxt = {
default: '收藏商品',
coled: '已收藏',
hover: '取消收藏'
};
//咨询和评价页数
var page = {
comments: 1,
consults: 1
};
function imgShow(src) {
$imgShow.attr('src', src);
}
/**
* 获取当前选择的商品数目
* @return [Number]
*/
function getNum() {
return +$num.text();
}
//重置Num显示为1
function resetNum() {
$num.text('1');
$numWarn.addClass('hide');
}
//加入购物车和已售罄状态控制
function switchBtnStatus() {
if (maxStock === 0) {
$addToCart.addClass('hide');
$soldOut.removeClass('hide');
} else {
//包括默认的-1情况下
$addToCart.removeClass('hide');
$soldOut.addClass('hide');
}
}
//初始化thumbsLoaded
thumbsLoaded[$('.colors .focus').index()] = true;
//颜色
$('.colors').on('click', 'li', function() {
var $this = $(this),
index = $this.index();
var $imgs;
if ($this.hasClass('focus')) {
return;
}
$this.siblings('.focus').removeClass('focus');
$this.addClass('focus');
//切换图片显示
$thumbs.not('.hide').addClass('hide');
$imgs = $thumbs.eq(index).removeClass('hide').find('img');
if (typeof thumbsLoaded[index] === 'undefined') {
//trigger layLoad
lazyLoad($imgs, {
event: 'sporty'
});
$imgs.trigger('sporty');
thumbsLoaded[index] = true;
}
imgShow($imgs.first().data('shower'));
//切换尺码显示
$sizes.not('.hide').addClass('hide');
$sizes.eq(index).removeClass('hide').children('li').removeClass('focus');
$colorSizeTip.addClass('hide');
maxStock = -1;
resetNum();
switchBtnStatus();
});
//尺码
$size.on('click', 'li', function() {
var $this = $(this);
if ($this.hasClass('focus')) {
return;
}
maxStock = +$this.data('num');
$this.siblings('.focus').removeClass('focus');
$this.addClass('focus');
$colorSizeTip.html($this.data('title')).removeClass('hide');
$sizeWarn.addClass('hide');
switchBtnStatus();
resetNum();
}).on('click', '.size-ruler', function() {
//尺码帮助
});
//数量
$plusNum.click(function() {
var num = getNum();
if (maxStock === -1) {
$sizeWarn.removeClass('hide');//显示选择尺码提示
return;
}
//已售罄
if (maxStock === 0) {
return;
}
if (num >= maxStock) {
$numWarn.removeClass('hide');
} else {
$num.text(num + 1);
}
});
$minusNum.click(function() {
var num = getNum();
if (num === 1) {
return;
}
if (num <= maxStock) {
$numWarn.addClass('hide');
}
$num.text(num - 1);
});
//加入购物车
$addToCart.click(function() {
if (maxStock === -1) {
$sizeWarn.removeClass('hide');
return;
}
$.ajax({
type: 'GET',
url: '/product/item/addToCart',
data: {
skn: skn
}
}).then(function(data) {
var code = data.code;
if (code === 200) {
$('#type-chose').slideUp(SLIDETIME);
$('#balance').slideDown(SLIDETIME);
$('#cart-num').text(data.num); //更新数目
}
});
});
//收藏
$('#collect-product').click(function() {
var $this = $(this),
status = 'collect';
if ($this.hasClass('coled')) {
status = 'cancel';
}
$.ajax({
type: 'GET',
url: '/product/item/collect',
data: {
skn: skn,
status: status
}
}).then(function(data) {
var code = data.code;
if (code === 200) {
$this.toggleClass('coled');
if (status === 'cancel') {
$this.find('em').text(colTxt.default);
} else {
$this.find('em').text(colTxt.coled);
}
} else if (code === 400) {
window.location.href = data.data;
}
});
}).hover(function() {
var $this = $(this);
if ($this.hasClass('coled')) {
$this.find('em').text(colTxt.hover);
}
}, function() {
var $this = $(this);
if ($this.hasClass('coled')) {
$this.find('em').text(colTxt.coled);
}
});
//继续购物
$('#keep-shopping').click(function() {
$('#type-chose').slideDown(SLIDETIME);
$('#balance').slideUp(SLIDETIME);
});
//商品详情/材质洗涤切换
$('.description-material').on('click', '.title', function() {
var $this = $(this),
index = $this.index();
var $description = $('.description-content'),
$material = $('.material-content');
if ($this.hasClass('cur')) {
return;
}
$this.addClass('cur');
$this.siblings('.cur').removeClass('cur');
if (index === 0) {
//商品信息
$description.slideDown(SLIDETIME);
$material.slideUp(SLIDETIME);
} else {
$description.slideUp(SLIDETIME);
$material.slideDown(SLIDETIME);
}
});
//评价和咨询切换
$('.consult-comment').on('click', '.title', function() {
var $this = $(this),
index = $this.index();
var $comments = $('.comments'),
$consults = $('.consults');
if ($this.hasClass('cur')) {
return;
}
$this.addClass('cur');
$this.siblings('.cur').removeClass('cur');
if (index === 0) {
//咨询
$consults.slideDown(SLIDETIME);
$comments.slideUp(SLIDETIME);
} else {
$consults.slideUp(SLIDETIME);
$comments.slideDown(SLIDETIME);
}
}).on('click', '.load-more', function() {
var $this = $(this),
type;
if ($this.hasClass('load-more-comments')) {
type = 'comments';
} else {
type = 'consults';
}
$.ajax({
type: 'GET',
url: '/product/item/' + type,
data: {
page: page[type] + 1
}
}).then(function(html) {
if (html === ' ') {
$this.closest('.more-wrap').addClass('hide');
} else {
$(type + '-ul').append(html);
page[type]++;
}
});
});
//我要咨询
$('#consults-btn').click(function() {
//TODO:点击我要资讯的时候更新验证码显示
$('.new-consult').removeClass('hide');
$('.consult-success').addClass('hide');
});
//提交咨询
$('#submit-consult').click(function() {
var $this = $(this),
$parent = $this.closest('.new-consult'),
$textarea = $parent.find('.my-consult'),
$captcha = $parent.find('.captcha'),
content = $.trim($textarea.val()),
captcha = $.trim($captcha.val());
var $consultWarn = $parent.find('.consult-warn'),
$captchaWarn = $parent.find('.captcha-warn');
var pass = true;
if (content === '') {
$textarea.addClass('error');
$consultWarn.removeClass('hide');
pass = false;
} else {
$textarea.removeClass('error');
$consultWarn.addClass('hide');
}
if (captcha === '') {
$captcha.addClass('error');
$captchaWarn.removeClass('hide').children('em').text('请输入验证码');
pass = false;
} else {
$captcha.removeClass('error');
$captchaWarn.addClass('hide');
}
if (pass === false) {
return;
}
$.ajax({
type: 'GET',
url: '/product/item/consult',
data: {
content: content,
captcha: captcha
}
}).then(function(data) {
var code = data.code;
if (code === 200) {
$parent.addClass('hide');
$parent.siblings('.consult-success').removeClass('hide');
//清空输入
$textarea.val('');
$captcha.val('');
} else if (code === 400) {
//跳转登录页
location.href = data.href;
} else if (code === 401) {
//验证码错误
$captcha.addClass('error');
$captchaWarn.removeClass('hide').children('em').text('验证码错误');
}
});
});
//售后服务
$('.after-service-switch').click(function() {
var $this = $(this),
$content = $this.next('.after-service-content');
var html = {
default: '&#xe604;',
spread: '&#xe603;'
};
if ($content.css('display') === 'none') {
$content.slideDown(SLIDETIME);
$this.find('.triangle').html(html.spread);
} else {
$content.slideUp(SLIDETIME);
$this.find('.triangle').html(html.default);
}
});
\ 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";
... ...
.product-detail-page {
.brand-banner {
height: 45px;
width: 100%;
img {
display: block;
height: 45px;
}
.opt {
margin-top: 5px;
}
.home, .brand-fav {
display: inline-block;
width: 32px;
height: 32px;
line-height: 32px;
border: 1px solid #fff;
text-align: center;
color: #fff;
}
.home {
margin-right: 5px;
.iconfont {
font-size: 14px;
}
}
.brand-fav .iconfont {
font-size: 12px;
}
.coled {
color: #ee0014;
}
}
.path-nav {
border: none;
margin-bottom: 0;
}
.main {
width: 990px;
margin: 0 auto;
.infos {
width: 465px;
}
.img {
position: relative;
width: 420px;
height: 560px;
}
.img-show {
display: block;
width: 100%;
height: 100%;
}
.tags {
position: absolute;
top: 0;
left: 0;
}
.good-tag {
float: left;
height: 22px;
line-height: 22px;
color: #fff;
padding: 0 7px;
margin-right: 5px;
font-size: 12px;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
@each $tag, $bgColor in (new-tag, #78dc7d),
(renew-tag, #78dc7e),
(new-festival-tag, #000000),
(yep-tag, #ff565b),
(ymp-tag, #ff565b),
(sale-tag, #ff565b),
(few-tag, #ffac5b) {
.#{$tag} {
background: $bgColor;
}
}
.limit-tag {
border: 1px solid #4e4e4e;
color: #4e4e4e;
}
.thumbs {
width: 75px;
height: 510px;
overflow: hidden;
}
.thumb {
display: block;
width: 75px;
margin-bottom: 2px;
}
.name {
font-size: 18px;
font-weight: bold;
line-height: 24px;
}
.brand-name {
color: #666;
font-size: 12px;
}
.title {
color: #999;
font-size: 12px;
}
.market-price {
margin-top: 8px;
}
.price {
color: #000;
font-size: 22px;
line-height: 24px;
font-weight: bold;
}
.with-sale .price {
color: #999;
text-decoration: line-through;
font-size: 12px;
}
.activity {
margin-top: 12px;
li {
line-height: 20px;
}
}
.ac-type {
display: inline-block;
width: 43px;
height: 16px;
line-height: 16px;
margin-right: 5px;
text-align: center;
background: #999;
color: #fff;
font-size: 12px;
}
.ac-des {
font-size: 12px;
}
.row {
margin-top: 10px;
}
.trade-content {
padding-top: 20px;
margin-top: 20px;
border-top: 1px solid #eaeceb;
}
.chose-color {
font-size: 12px;
.title {
margin-top: 14px;
}
img {
display: block;
height: 36px;
width: 36px;
border: 2px solid #fff;
}
.focus img {
border-color: #222;
}
li {
margin-right: 5px;
margin-bottom: 5px;
cursor: pointer;
}
}
.chose-size {
font-size: 12px;
.title {
margin-top: 6px;
}
li {
float: left;
display: block;
height: 22px;
line-height: 22px;
width: 38px;
margin-right: 5px;
margin-bottom: 5px;
border: 1px solid #eaeceb;
text-align: center;
cursor: pointer;
&.disable {
opacity: 0.5;
filter: Alpha(opacity=50);
}
&.focus {
color: #fff;
background: #222;
}
}
}
.size {
float: left;
color: #666;
}
.size-ruler {
float: left;
display: block;
width: 57px;
height: 24px;
background: image-url('product/size-ruler.jpg');
margin-bottom: 5px;
cursor: pointer;
}
.size-warn, .num-warn {
height: 24px;
line-height: 24px;
}
.color-size-tip {
color: #999;
}
.chose-count .title {
margin-top: 6px;
}
.num {
display: block;
width: 38px;
height: 23px;
line-height: 23px;
text-align: center;
border: 1px solid #eaeceb;
color: #333;
font-size: 12px;
background: #ebebe4;
}
.minus-plus {
display: block;
width: 14px;
height: 23px;
border: 1px solid #eaeceb;
border-left: none;
text-align: center;
cursor: pointer;
i {
display: block;
width: 13px;
height: 11px;
line-height: 8px;
font-size: 12px;
}
}
.minus {
border-top: 1px solid #eaeceb;
font-size: 13px;
}
.add-to-cart, .sold-out, .go-cart {
display: inline-block;
margin-right: 10px;
height: 48px;
line-height: 48px;
width: 197px;
text-align: center;
color: #fff;
background: #e92601;
font-size: 14px;
cursor: pointer;
}
.sold-out {
background: #ccc;
}
.collect-product, .keep-shopping {
display: inline-block;
width: 127px;
height: 48px;
text-align: center;
line-height: 48px;
background: #fff;
color: #222;
border: 1px solid #ccc;
font-weight: bold;
font-size: 12px;
cursor: pointer;
.iconfont {
color: #ccc;
font-size: 12px;
}
&.coled .iconfont{
color: #fa5252;
}
}
.share-row {
margin-top: 20px;
.title {
margin-top: 2px;
}
i {
display: block;
float: left;
width: 16px;
height: 16px;
margin-left: 5px;
background: image-url('guang/detail/icon-share.png') no-repeat;
}
$left: 0px;
@each $icon in weibo,qweibo,renren,qzone,qq,douban,weixin {
.#{$icon} {
background-position: 0 $left;
}
$left: $left - 16px;
}
}
.balance {
display: none;
.success-tip {
color: #222;
font-size: 18px;
margin-bottom: 10px;
}
.cart-total {
color: #999;
font-size: 12px;
}
.balance-btns {
margin-top: 20px;
}
}
}
.other-infos {
padding-bottom: 30px;
}
.info-block {
margin-top: 30px;
color: #999;
border-top: 2px solid #eaeceb;
font-size: 12px;
.basic {
width: 640px;
margin: 0 auto;
li {
float: left;
width: 25%;
line-height: 20px;
}
}
.comfort {
width: 470px;
border: 1px solid #eaeceb;
margin: 17px auto 0;
padding-bottom: 15px;
li {
margin: 12px 20px 0;
}
}
.comfort-block {
display: inline-block;
width: 14px;
height: 10px;
border: 1px solid #eaeceb;
margin-right: 2px;
&.cur {
background: #999;
border: 1px solid #999;
}
}
}
.block-title {
margin-bottom: 25px;
text-align: center;
.title {
display: inline-block;
padding-top: 15px;
font-weight: bold;
cursor: pointer;
&.cur {
color: #222;
border-top: 2px solid #222;
margin-top: -2px;
}
}
.sep {
display: inline-block;
margin: 0 30px;
color: #eaeceb;
font-size: 14px;
cursor: default;
font-weight: bold;
}
}
.material-content {
display: none;
}
.material-detail {
width: 860px;
margin: 0 auto;
padding-bottom: 20px;
margin-bottom: 20px;
border-bottom: 1px dotted #eaeceb;
img {
float: left;
width: 125px;
height: 50px;
}
.name {
float: left;
width: 100px;
line-height: 25px;
border-right: 1px dotted #eaeceb;
color: #666;
font-weight: bold;
text-align: center;
font-size: 14px;
}
.text {
float: left;
width: 614px;
padding-left: 20px;
line-height: 18px;
}
}
.wash {
text-align: center;
li {
display: inline-block;
padding: 0 20px;
color: #666;
border-right: 1px solid #eaeceb;
}
}
.size-info {
text-align: center;
}
.size-table, .reference-table {
text-align: center;
margin: 0 auto;
td,th {
width: 110px;
text-align: center;
}
tr {
height: 30px;
}
thead {
background: #f5f7f6;
color: #999;
}
tbody {
color: #222;
}
.avatar {
width: 26px;
height: 26px;
border-radius: 50px;
}
}
.size-tip {
color: #999;
margin-top: 15px;
text-align: center;
}
.details {
text-align: center;
font-size: 12px;
color: #999;
line-height: 18px;
}
.details-html {
width: 640px;
margin: 0 auto;
b {
font-weight: bold;
}
i {
font-style: italic;
}
}
.consults {
display: none;
}
.consult-comment .title {
color: #666;
&.cur {
color: #666;
}
}
.cc-content {
background: #f5f7f6;
padding: 20px 20px 0 20px;
font-size: 12px;
h2 {
font-weight: bold;
font-size: 14px;
margin-bottom: 10px;
color: #000;
}
li {
border-top: 1px solid #eaeceb;
padding: 20px 0;
}
.user-info {
color: #999;
line-height: 16px;
> * {
float: left;
}
.name {
color: #666;
}
.date {
color: #bbb;
}
.question {
color: #222;
}
}
.user-avatar {
width: 30px;
height: 30px;
margin-right: 5px;
}
.more-wrap {
text-align: center;
color: #666;
border-top: 1px solid #eaeceb;
padding: 20px 0;
font-size: 14px;
font-weight: bold;
color: #666;
}
.btn-wrap {
padding: 20px 0;
border-top: 1px solid #eaeceb;
}
.load-more {
cursor: pointer;
}
.btn {
display: block;
width: 140px;
height: 32px;
line-height: 32px;
color: #fff;
background: #222;
text-align: center;
font-size: 12px;
margin: 0 auto;
cursor: pointer;
.iconfont {
font-size: 14px;
}
}
.comment, .consult {
margin-top: 10px;
}
.consults {
display: none;
}
}
.new-consult {
padding: 20px 0;
border-top: 1px solid #eaeceb;
textarea {
width: 590px;
height: 80px;
margin-top: 8px;
padding: 5px;
outline: none;
}
.captcha-row {
margin: 10px 0;
}
.captcha {
width: 70px;
height: 20px;
line-height: 20px;
border: 1px solid #ccc;
margin-right: 5px;
padding: 5px;
outline: none;
}
.captcha-img {
border: 0;
height: 32px;
width: 96px;
vertical-align: middle;
}
.submit-consult {
display: block;
width: 140px;
height: 32px;
line-height: 32px;
margin: 0;
}
.error {
border-color: #e01;
}
}
.consult-success {
border-top: 1px solid #eaeceb;
margin-top: 30px;
text-align: center;
padding: 20px 0;
p {
width: 295px;
height: 55px;
line-height: 55px;
margin: 0 auto;
border: 2px solid #222;
display: block;
color: #222;
font-weight: bold;
}
}
.after-service {
text-align: center;
margin-top: 30px;
.after-service-content {
display: none;
}
.after-service-switch {
height: 44px;
line-height: 44px;
background: #eaeceb;
text-align: center;
font-size: 12px;
cursor: pointer;
.iconfont {
font-size: 12px;
}
}
.text {
padding: 20px 15px;
color: #666;
background: #f5f7f6;
text-align: left;
color: #666;
line-height: 18px;
}
.orange {
color: #f9761a;
}
h4 {
font-weight: bold;
font-size: 14px;
line-height: 24px;
color: #222;
margin-top: 10px;
&:first-child {
margin-top: 0;
}
}
.img-1 {
width: 715px;
height: 259px;
margin: 0 auto;
background: image-url('product/after-service-1.png');
}
.img-2 {
width: 715px;
height: 230px;
margin: 0 auto;
background: image-url('product/after-service-2.png');
}
a {
color: #666;
}
}
.service {
width: 323px;
height: 30px;
margin: 45px auto 0;
background: image-url('product/service.png');
}
.recent-view {
width: 1010px;
margin: 0 auto;
li {
float: left;
width: 180px;
margin-right: 22px;
}
img {
height: 240px;
width: 180px;
display: block;
}
.name {
display: block;
margin-top: 5px;
color: #222;
line-height: 16px;
}
.price {
color: #222;
font-weight: bold;
margin-top: 5px;
}
.market-price {
margin-right: 5px;
}
.has-sale {
text-decoration: line-through;
color: #999;
}
}
.warn-tip {
display: inline-block;
color: #e01;
margin-left: 7px;
font-size: 12px;
i {
font-size: 14px;
}
}
}
\ No newline at end of file
... ...
... ... @@ -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", "filter-box", "sort-pager", "good", "hot-rank";
\ No newline at end of file
@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);
}
/*
... ...