Authored by yyq

Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0

... ... @@ -69,14 +69,16 @@
</div>
</div>
</div>
<div class="related-goods goods">
{{# relatedGroup}}
{{> related-goods}}
{{/ relatedGroup}}
<span class="left iconfont">&#xe62c;</span>
<span class="right iconfont">&#xe629;</span>
<div class="related-groups">
<div class="related-goods goods">
{{# relatedGroup}}
{{> related-goods}}
{{/ relatedGroup}}
</div>
</div>
<span class="left iconfont hide">&#xe62c;</span>
<span class="right iconfont">&#xe629;</span>
</div>
{{/ related}}
{{/ content}}
... ... @@ -107,22 +109,22 @@
</div>
{{# userInfo}}
<div class="user-handle">
<ul class="clearfix">
<li id="prise-btn" class="like-status{{# isLike}} liked{{/ isLike}}">
<a href="javascript:;">
<i class="iconfont">&#xe60e;</i>
<span class="like-num">{{likeNum}}</span>
</a>
</li>
<li id="collect-btn" class="sort-collect{{# isCollected}} collected{{/ isCollected}}">
<a href="javascript:;">
<i class="iconfont">&#xe619;</i>
<span>收藏</span>
</a>
</li>
</ul>
</div>
<div class="user-handle">
<ul class="clearfix">
<li id="prise-btn" class="like-status{{# isLike}} liked{{/ isLike}}">
<a href="javascript:;">
<i class="iconfont">&#xe60e;</i>
<span class="like-num">{{likeNum}}</span>
</a>
</li>
<li id="collect-btn" class="sort-collect{{# isCollected}} collected{{/ isCollected}}">
<a href="javascript:;">
<i class="iconfont">&#xe619;</i>
<span>收藏</span>
</a>
</li>
</ul>
</div>
{{/ userInfo}}
{{> share}}
... ...
... ... @@ -140,11 +140,11 @@ const getProductItemData = (params, url, uid) => {
* 获取商品尺寸,颜色,和缩略图
* @function getProductInfo
* @param { Number } productId 商品ID
* @param { String } uid 用户ID
* @param { Number } skn 商品skn
* @param { String } uid 用户ID
* @return { Object } 接口返回单个商品的基本信息
*/
const getProductInfo = (productId, uid, skn) => {
const getProductInfo = (productId, skn, uid) => {
return itemApi.getProductBaseAsync(productId, uid, skn).then(result => {
return itemFun.setProductData(result);
});
... ...
... ... @@ -17,10 +17,14 @@ var $commentList = $commentArea.find('.comments-wrap'),
MAX_COMMENTS_WORDS = 100,
$wordCountTip = $('#word-count-tip'),
_alert = dialog.Alert,
tag = $('#tags').find('li').length;
tag = $('#tags').find('li').length,
leng = $('.goods').find('.good-info').length / 4,
pag = 0;
require('../plugins/share');
// require('yoho-unslider');
$('#prise-btn').click(function() {
var prising = false,
url,
... ... @@ -192,10 +196,37 @@ if ($('.collocation').find('.good-info').length === 0) {
if ($('.goods').find('.good-info').length === 0) {
$('.related-group').hide();
} else if ($('.goods').find('.good-info').length < 5) {
$('.left').hide();
$('.right').hide();
}
// $('.left').click(function {
// $('.goods').animate({ left: '+50px' }, "slow");
// })
$('.right').click(function() {
pag = pag + 1;
if (pag === leng - 1) {
$('.right').addClass('hide');
}
if (pag !== 0) {
$('.left').removeClass('hide');
}
$('.goods').animate({left: '+=-930px'});
});
$('.left').click(function() {
var $goods = $('.goods');
pag = pag - 1;
if (pag === 0) {
$('.left').addClass('hide');
}
// console.log($('.goods').offsetWidth()
if (pag !== leng - 1) {
$('.right').removeClass('hide');
}
$goods.animate({left: '+=930px'});
});
... ...
... ... @@ -72,8 +72,8 @@ $(function() {
// 编辑商品颜色和属性
Cart.editColorOrSize(
$this.attr('data-productId'),
$this.attr('data-productSkn'),
$this.attr('data-productid'),
$this.attr('data-productskn'),
$this.find('.default-color').text(),
$this.find('.default-size').text(), function() {
editable = true;
... ...
... ... @@ -124,7 +124,6 @@ Cart = {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
if (callback) {
return callback();
}
... ... @@ -148,7 +147,6 @@ Cart = {
if (res.code === 200) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
});
} else {
new _alert(res.message).show();
... ... @@ -219,7 +217,6 @@ Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
// 显示或者更新删除商品模块
Cart.showRemovedProducts(products, extraInfos);
... ... @@ -314,7 +311,6 @@ Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
if (callback) {
return callback();
... ... @@ -334,7 +330,6 @@ Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
});
}
});
... ...
... ... @@ -11,8 +11,15 @@
position: relative;
h4 {
height: 18px;
line-height: 18px;
padding-right: 10px;
display: -webkit-box;
font-size: 16px;
font-weight: bold;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
p {
... ...
... ... @@ -53,7 +53,7 @@
img {
width: 1150px;
height: auto;
height: $sliderHeight;
}
}
}
... ...
... ... @@ -79,10 +79,9 @@
border: 1px solid #404040;
border-left: none;
* {
p,
h4 {
display: block;
}
p {
display: -webkit-box;
}
}
... ...
... ... @@ -98,6 +98,10 @@
overflow: hidden;
position: relative;
.collocation {
margin-left: 30px;
}
.btn {
position: relative;
}
... ... @@ -137,8 +141,21 @@
}
}
.related-group {
position: relative;
height: 450px;
}
.related-groups {
width: 930px;
overflow: hidden;
position: relative;
height: 420px;
margin-left: 30px;
}
.related-goods {
padding: 60px 0 0 30px;
padding-top: 60px;
.good-info {
width: 219px;
... ... @@ -173,6 +190,11 @@
.goods {
height: 420px;
overflow: hidden;
position: absolute;
.good-info:nth-child(4n) {
margin-right: 0;
}
}
.related-brand {
... ... @@ -500,4 +522,8 @@
padding-left: 30px;
width: 330px;
}
.hide {
display: none;
}
}
... ...
... ... @@ -34,11 +34,14 @@
-webkit-box-orient: vertical;
}
.good-name-text:hover,
.check-detail:hover {
.good-name-text:hover {
text-decoration: underline;
}
.check-detail:hover {
@extend .blue;
}
.change-tag {
margin: 10px auto 0;
color: #1b1b1b;
... ...