Authored by xuqi

Merge branch 'feature/guang' of http://git.dev.yoho.cn/web/yohobuy into feature/guang

... ... @@ -699,3 +699,117 @@
}
}]
}
## 逛详情页
{
guangDetailPage: true, //引用逛详情页js
detail:{
id: 1, //详情页id
header: {
title: '', //大标题
avatar: '', //作者头像
name: '' , //作者名字
authorUrl: '', //作者主页url
intro: '', //作者简介
time: '', //时间
click: '', //点击数
commentNum: '' //评论数
},
content: [
{
pic: '' //内容大图
},
{
text: '' //内容文字
},
{
smallPic: [ //内容两张并列小图
'http://img02.static.yohobuy.com/cms/2015/06/26/12/027eb72bc880b4fe1aad361296c871c2ea.jpg',
'http://img02.static.yohobuy.com/cms/2015/06/26/12/027eb72bc880b4fe1aad361296c871c2ea.jpg'
]
},
{
relatedReco: { //相关推荐
recos: [
{
withInfo: {
thumb: '', //商品图片
name: '', //商品标题
price: '', //原价
salePrice: '', //现价
tags: [ //商品顶部标签
{
isNew: true //新品到着
},
{
isSale: true //折扣
},
{
isLimit: true //限量
},
{
isYohood: true //yohood
},
{
isReNew: false //再到着
},
{
isYearEndPromotion: false //年终大促
},
{
isYearMidPromotion: false //年中大促
}
],
isFew: true, //单独的即将售罄标志,不显示不写
url: '' //商品链接
}
}
...
],
moreReco: '', //标题是否有more,有传url,没有不传
}
}
],
brands: [ //相关品牌
{
'thumb' => '', //品牌图片
'name' => '004', //品牌名称
'url' => '' //品牌url
}
...
],
userInfo: { //用户点赞收藏
isLike: true, //当前用户是否点赞
likeNum: 84, //点赞次数
isCollected: true //当前用户是否收藏
},
tag: [ //内容标签
{
name: LEE, //标签内容
url: www.baidu.com //标签链接
}
...
],
relatedPost:[ //相关文章
{
url => '', //链接
thumb => '', //图片
title => '' //标题
}
...
],
commentInfo: '', //初始内容,用于登陆页跳转回来后的内容不丢失
comment: {
commentNum: 4, //如果没有评论,数字为0,list和commentPager可以不传
list: [ //评论列表
{
avatar: '', //评论用户头像
name: '', //用户名字
content: '', //评论内容
time: '' //发表时间
}
...
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -53,46 +53,7 @@
{{# recos}}
<div class="commodity-info">
{{#withInfo}}
<div class="tag-container clearfix">
{{# tags}}
{{# isNew}}
<p class="good-tag new-tag">NEW</p>
{{/ isNew}}
{{# isReNew}}
<p class="good-tag renew-tag">再到着</p>
{{/ isReNew}}
{{# isSale}}
<p class="good-tag sale-tag">SALE</p>
{{/ isSale}}
{{# isYohood}}
<div class="good-tag yohood-tag"></div>
{{/ isYohood}}
{{# isLimit}}
<p class="good-tag limit-tag">限量商品</p>
{{/ isLimit}}
{{# isYearEndPromotion}}
<p class="good-tag yep-tag">年终大促</p>
{{/ isYearEndPromotion}}
{{# isYearMidPromotion}}
<p class="good-tag ymp-tag">年中热促</p>
{{/ isYearMidPromotion}}
{{/ tags}}
</div>
<div class="info-img">
<a class="thumb" href="{{url}}">
<img class="lazy" data-original="{{thumb}}">
</a>
{{# isFew}}
<p class="few-tag">即将售罄</p>
{{/ isFew}}
</div>
<a class="name" href="{{url}}">{{name}}</a>
<p class="price">
{{# price}}
<span class="market-price">¥{{.}}</span>
{{/ price}}
<span class="sale-price">¥{{salePrice}}</span>
</p>
{{> product/good}}
{{/ withInfo}}
</div>
{{/ recos}}
... ... @@ -170,7 +131,7 @@
<li>
<a href="{{url}}">
<span class="bg-img">
<img src="{{imgUrl}}" alt="">
<img src="{{thumb}}" alt="">
</span>
<div class="post-title">
<h2>{{title}}</h2>
... ...
... ... @@ -472,109 +472,11 @@
$commodityWidth: 192px;
.commodity-info {
.good-info {
width: $commodityWidth;
height: 325px;
margin-right: 20px;
margin-bottom: 20px;
float: left;
font-size: 12px;
* {
box-sizing: border-box;
}
.info-img {
position: relative;
}
.thumb {
display: block;
img {
width: $commodityWidth;
}
}
.few-tag {
position: absolute;
bottom: 0;
width: 100%;
height: 20px;
background: #ffac5b;
color: #fff;
line-height: 20px;
text-align: center;
font-size: 12px;
}
.tag-container {
height: 20px;
width: 100%;
overflow: hidden;
.good-tag {
display: block;
float: left;
height: 20px;
font-size: 12px;
text-align: center;
line-height: 20px;
box-sizing: border-box;
margin-right: 4px;
&:last-child {
margin-right: 0;
}
}
.new-tag {
width: 43px;
background-color: #78dc7e;
color: #fff;
}
.renew-tag {
width: 53px;
background-color: #78dc7e;
color: #fff;
}
.sale-tag {
width: 43px;
background-color: #ff575c;
color: #fff;
}
.yohood-tag {
width: 64px;
background: image-url('yohood.png') no-repeat;
background-size: 100% 100%;
}
.limit-tag {
width: 60px;
line-height: 18px;
border: 1px solid #000;
color: #000;
}
.yep-tag, .ymp-tag {
width: 64px;
background-color: #ff575c;
color: #fff;
}
}
.name {
display: block;
color: #222;
text-decoration: none;
max-width: $commodityWidth;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
line-height: 36px;
}
.price {
font-weight: bold;
.market-price {
margin-right: 5px;
color: #999;
text-decoration: line-through;
}
.sale-price {
color: #000;
}
}
}
.share-to .share-a {
... ...
... ... @@ -35,7 +35,7 @@
.good-detail-text {
color: #222;
font-size: 12px;
text-align: center;
text-align: left;
> a {
margin-top: 16px;
... ... @@ -86,6 +86,10 @@
&.limit-tag {
color: #4e4e4e;
border: 1px solid #4e4e4e;
height: 22px;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
}
}
... ...
... ... @@ -124,10 +124,7 @@ class GuangController extends AbstractAction
'intro' => '日本设计界宗师',
'time' => '2015-03-09 08:26',
'click' => '1128',
'commentNum' => '4',
'isLike' => false,
'likeNum' => 84,
'isCollected' => true,
'commentNum' => '4'
),
'content' => array(
array(
... ... @@ -166,10 +163,10 @@ class GuangController extends AbstractAction
'isYohood' => false
),
array(
'isReNew' => false
'isReNew' => true
),
array(
'isYearEndPromotion' => true
'isYearEndPromotion' => false
),
array(
'isYearMidPromotion' => false
... ... @@ -279,6 +276,7 @@ class GuangController extends AbstractAction
)
),
'userInfo' => array(
'isLike' => true,
'likeNum' => 84,
'isCollected' => true,
),
... ... @@ -319,7 +317,7 @@ class GuangController extends AbstractAction
'relatedPost' => array(
array(
'url' => 'www.baidu.com',
'imgUrl' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/27/17/015d433e79035f8e04aeb4f1329418f0e7.jpg?imageView/2/w/250/h/200',
'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/27/17/015d433e79035f8e04aeb4f1329418f0e7.jpg?imageView/2/w/250/h/200',
'title' => 'Playboy Special'
),
array(
... ...