Authored by xuqi

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy-mobile into develop

/**
* 潮童首页数据结构
* @author: liuyue(yue.liu@yoho.cn)
* @date: 2015/8/26
*/
module.exports = {
header: {
title: 'Kids',
bgColor: '#7ad9f9',
searchUrl: ''
},
sideNav: [{
textCn: '男生',
textEn: 'Boys',
url: false,
subNav: {
list: [{
textCn: '男生',
textEn: 'Boys',
img: '',
url: false
}, {
textCn: '首页',
img: 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png',
url: ''
}, {
textCn: '新品到着',
img: '',
url: ''
}]
}
}, {
textCn: '女生',
textEn: 'Girls',
current: true,
url: false,
subNav: {
list: [{
textCn: '女生',
textEn: 'Girls',
img: '',
url: false
}, {
textCn: '首页',
img: '',
url: ''
}, {
textCn: '新品到着',
img: '',
url: ''
}, {
textCn: '上衣',
img: '',
url: ''
}, {
textCn: '鞋靴',
img: '',
url: ''
}, {
textCn: '裤装',
img: '',
url: ''
}, {
textCn: '品牌一览',
img: '',
url: ''
}]
}
}, {
textCn: '潮童',
textEn: 'Kids'
}, {
textCn: '家居',
textEn: 'Life Style'
}],
content: [{
bannerTop: {
list: [{
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
}, {
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/07/08/10/02096990afbb3c1f327dd7e180aee02604.jpg'
}, {
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg'
}]
}
}, {
iconsEnter: {
list: [{
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
text: '新品到着'
}, {
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
text: '全球优选'
}, {
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
text: '明星潮牌'
}, {
url: '',
img: 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
text: '全部品类'
}]
}
}, {
fineBrands: {
name: '优选品牌',
brands: [{
url: '',
img: 'http://img11.static.yhbimg.com/brandLogo/2014/12/24/17/010c9d590aa72776d6fa9c7b29c0dbf02e.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'Front Row Shop'
}, {
url: '',
img: 'http://img13.static.yhbimg.com/brandLogo/2014/01/27/11/02760471b3fdea1e82e7abfe9155e8654f.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'dress lab'
}, {
url: '',
img: 'http://img13.static.yhbimg.com/brandLogo/2014/03/04/15/029db86af0b2902805aabc953627bcbb12.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'DEVIL NUT'
}, {
url: '',
img: 'http://img11.static.yhbimg.com/brandLogo/2014/11/05/09/0157535787c0ad76cd04756a0351ce5b1f.png?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'casselini'
}, {
url: '',
img: 'http://img10.static.yhbimg.com/brandLogo/2013/07/10/15/0101726da2fcae86fa101dc63583457f1a.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'haso'
}, {
url: '',
img: 'http://img13.static.yhbimg.com/brandLogo/2014/01/10/15/02e40864fc98561c2aac569e4affa3445a.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'EVISU'
}, {
url: '',
img: 'http://img13.static.yhbimg.com/brandLogo/2014/01/10/15/02e40864fc98561c2aac569e4affa3445a.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'EVISU'
}, {
url: '',
img: 'http://img13.static.yhbimg.com/brandLogo/2014/01/10/15/02e40864fc98561c2aac569e4affa3445a.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center',
name: 'MORE'
}]
}
}, {
hotCategory: {
img: 'http://img13.static.yhbimg.com/adpic/2015/05/07/15/020cfde7eb630474916655cc0e290c68e2.jpg?imageView/2/w/640/h/480',
list: [{
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}, {
textCn: '打底衫',
img: 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
url: ''
}]
}
}, {
kidsGoods: {
goods: [{
id: 1,
thumb: 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
name: 'GAWS DIGI 丛林数码印花拼接卫衣',
isLike: false,
price: 1268,
salePrice: 589,
isSale: true,
isFew: true,
isNew: false,
url: '',
likeUrl: ''
}, {
id: 2,
thumb: 'http://img13.static.yhbimg.com/goodsimg/2015/03/03/08/023d70c59e81ccbfb39404487aaf642da2.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
name: 'CLOTtee 撞色连帽外套',
isLike: false,
price: 488,
salePrice: 139,
isSale: true,
isFew: true,
isNew: false,
url: '',
likeUrl: ''
}, {
id: 3,
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/03/02/08/02e2d44125e95495e3152aa459fa6b9b0c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
name: 'HALFGIRL 插肩棒球服短裙套装',
isLike: true,
price: 478,
salePrice: 208,
isSale: true,
isFew: true,
isNew: false,
url: '',
likeUrl: ''
}, {
id: 4,
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/03/03/08/022f25fbe177ee12803c522f04fcce06d0.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
name: '黄伟文Wyman X yohood联名商品YYYOHOOD连帽卫衣',
isLike: false,
salePrice: 148,
isSale: false,
isFew: false,
isNew: true,
url: '',
likeUrl: ''
}]
}
}],
footer: {
// 已登录
user: {
name: 'liudayue',
url: '',
signoutUrl: ''
}
// 未登录
// loginUrl: '',
// signupUrl: ''
}
}
\ No newline at end of file
... ...
.fine-brands {
background: #fff;
border-top: 1px solid #e0e0e0;
a {
display: block;
text-decoration: none;
}
.brand {
float: left;
width: 158rem / $pxConvertRem;
height: 174rem / $pxConvertRem;
border-right: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
.brand-logo {
display: table-cell;
width: 158rem / $pxConvertRem;
height: 130rem / $pxConvertRem;
vertical-align: middle;
img {
display: block;
max-width: 158rem / $pxConvertRem;
max-height: 130rem / $pxConvertRem;
vertical-align: middle;
margin: 0 auto;
}
}
.brand-name {
line-height: 44rem / $pxConvertRem;
font-size: 18rem / $pxConvertRem;
color: #babac2;
text-align: center;
text-decoration: none;
border-bottom: none;
overflow: hidden;
}
}
.brand:nth-child(4n) {
border-right: none;
}
}
\ No newline at end of file
... ...
... ... @@ -34,4 +34,11 @@
.girls-wrap .header {
background: #fd307f;
}
.kids-wrap .logo{
font-style: italic;
font-family: "helvetica","Arial","黑体";
font-weight: bold;
color: #fff;
}
\ No newline at end of file
... ...
$pxConvertRem : 40;
@import "compass", "compass/reset";
@import "common/header-download","common/header", "common/banner-top","common/banner-center", "common/side-nav", "common/floor-header", "common/banner-top", "common/banner-bottom", "common/hot-brands", "common/creative-life", "common/plus-star", "common/maybe-like", "common/footer",
@import "common/header-download","common/header", "common/banner-top","common/banner-center", "common/side-nav", "common/floor-header", "common/banner-top", "common/banner-bottom", "common/hot-brands", "common/fine-brands", "common/creative-life", "common/plus-star", "common/maybe-like", "common/footer",
"common/icons-enter","common/trendsetter-collocation",
"common/trend-topics","common/goods-category";
@import "girls/hot-category", "girls/hot-brands";
@import "girls/hot-category", "girls/hot-brands","kids/kids-goods";
body {
font-family: helvetica,Arial,"黑体";
... ...
.kids-goods{
margin: (30rem / $pxConvertRem) 0 0;
padding: 36rem / $pxConvertRem 0 0;
background: #fff;
border-top: 1px solid #e0e0e0;
.title{
padding: 0 0 30rem / $pxConvertRem;
line-height: 32rem / $pxConvertRem;
font-size: 28rem / $pxConvertRem;
border-bottom: 1px solid #f1f1f1;
a{
float: left;
width: 319rem / $pxConvertRem;
text-align: center;
color: #aaa;
}
a.current{
color: #000;
}
a:first-child{
border-right: 1px solid #e6e6e6;
}
}
.goods-list{
padding-left: 15rem / $pxConvertRem;
}
}
\ No newline at end of file
... ...
... ... @@ -7,12 +7,14 @@
var controllerPath = './views/controller/',
boys = require(controllerPath + 'boys'),
girls = require(controllerPath + 'girls'),
goods = require(controllerPath + 'goods');
goods = require(controllerPath + 'goods'),
kids = require(controllerPath + 'kids')
module.exports = function(app) {
app.get('/boys', boys.index); //boys首页
app.get('/girls', girls.index); //girls首页
app.get('/kids', kids.index); //girls首页
app.get('/common/goodinfo', goods.goodTpl); //商品信息模板
app.get('/goods/more', goods.more); //下拉加载更多
... ...
/**
* 潮童首页控制器
* @author: liuyue(yue.liu@yoho.cn)
* @date: 2015/8/26
*/
var data = require('../../public/js/data/kids'),
layoutPath = '../layouts/layout';
// 首页
exports.index = function(req, res) {
res.render('pages/kids', {
data: data,
layout: layoutPath
});
};
\ No newline at end of file
... ...
... ... @@ -33,7 +33,7 @@
{{> common/goods_category}}
{{/ goodsCategory}}
{{! 热门分类}}
{{! 热门品牌}}
{{# hotBrands}}
{{> common/hot_brands}}
{{/ hotBrands}}
... ...
{{# data}}
<div class="mobile-wrap kids-wrap">
{{> kids/kids_header}}
{{# content}}
{{! 头部banner}}
{{# bannerTop}}
{{> common/banner_top}}
{{/ bannerTop}}
{{! 图标入口}}
{{# iconsEnter}}
{{> common/icons_enter}}
{{/ iconsEnter}}
{{! 优选品牌}}
{{# fineBrands}}
{{> common/fine_brands}}
{{/ fineBrands}}
{{! 热门分类}}
{{# hotCategory}}
{{> girls/hot_category}}
{{/ hotCategory}}
{{! 可能喜欢}}
{{# kidsGoods}}
{{> kids/kids_goods}}
{{/ kidsGoods}}
{{/ content}}
</div>
{{/ data}}
\ No newline at end of file
... ...
{{> common/floor_header}}
<ul class="fine-brands clearfix">
{{# brands}}
<li class="brand">
<a href="{{url}}">
<div class="brand-logo">
<img class="lazy" data-original="{{img}}">
</div>
<p class="brand-name">{{name}}</p>
</a>
</li>
{{/ brands}}
</ul>
\ No newline at end of file
... ...
<div class="kids-goods">
<p class="title clearfix">
<a class="current" href="javascript:;">人气单品</a>
<a href="javascript:;">新品到着</a>
</p>
<div class="goods-list clearfix">
{{# goods}}
{{> common/good_info}}
{{/ goods}}
</div>
</div>
\ No newline at end of file
... ...
{{# header}}
<div class="header clearfix" style="background-color:{{bgColor}};background-image:none">
<span class="nav-btn iconfont">&#xe60b;</span>
<span class="logo">{{title}}</span>
{{# searchUrl}}
<a href="{{.}}" class="search-btn iconfont">&#xe60f;</span>
{{/ searchUrl}}
</div>
{{/ header}}
\ No newline at end of file
... ...