Authored by 郝肖肖

Merge branch 'release/5.1' of git.yoho.cn:fe/yohobuywap-node into release/5.1

... ... @@ -41,7 +41,6 @@ const shopIndex = (req, res) => {
const shopNav = (req, res, next) => {
shopModel.shopNav().then((result) => {
console.log(result);
res.json(result);
}).catch(next);
};
... ...
... ... @@ -97,7 +97,7 @@ function shopListData(tabName, stoping) {
$('.collect-btn').on('click', function(e) {
var opt,
$this = $(this),
fansCount = parseInt($this.parent().find('.fans-count').html());
fansCount = $this.parent().find('.fans-count').html();
shopId = $this.parents('.shop-info').data('id');
... ... @@ -132,11 +132,15 @@ function shopListData(tabName, stoping) {
if ($this.hasClass('already-collect')) {
$this.removeClass('already-collect');
tip.show('店铺取消收藏成功');
$this.parent().find('.fans-count').html(fansCount - 1);
if (fansCount.indexOf('w') === -1) {
$this.parent().find('.fans-count').html(parseInt(fansCount) - 1);
}
} else {
$this.addClass('already-collect');
tip.show('店铺收藏成功');
$this.parent().find('.fans-count').html(fansCount + 1);
if (fansCount.indexOf('w') === -1) {
$this.parent().find('.fans-count').html(parseInt(fansCount) + 1);
}
}
}
... ... @@ -206,8 +210,6 @@ function shopNavData() {
shopListData($('.shop-nav').find('li').eq(0).data('type'));
}
console.log($('.shop-nav').length);
// 导航点击事件
$('.shop-nav').find('li').on('click', function() {
var $this = $(this),
... ... @@ -226,7 +228,6 @@ function shopNavData() {
},
error: function() {
console.log('123');
// tip.show('网络断开连接了~');
$('.shop-nav').hide();
... ...
... ... @@ -230,6 +230,7 @@ seckillObj = {
'/product/seckill/get-product-list';
loading.show();
self.el.$navList.toggleClass('fix-top', false);
$.ajax({
url: url,
data: {
... ... @@ -299,13 +300,16 @@ seckillObj = {
bindEvents: function() {
var self = this;
var $nav = self.el.$navList;
var top = $nav.position().top + $nav.height();
var h = $nav.height();
var top = $nav.position().top;
$nav.wrap('<div style="height:' + h + 'px;"></div>');
if (yoho.isApp) {
this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this));
}
$(document).on('scroll', function() {
$(document).on('scroll touchmove', function() {
$nav.toggleClass('fix-top', $(window).scrollTop() > top);
});
},
... ... @@ -392,7 +396,10 @@ seckillObj = {
var $xhr;
loading.show();
$xhr = $.get(location.href)
$xhr = $.ajax({
url: location.href,
cache: false
})
.done(function(result) {
self.$container.replaceWith(
self.pageTemplate($.extend(result, {
... ...
... ... @@ -64,8 +64,10 @@
color: #b0b0b0;
display: inline-block;
width: 50px;
font-size: 26px;
font-size: 32px;
text-align: center;
position: relative;
top: 4px;
}
.already-collect {
... ... @@ -104,13 +106,15 @@
.shop-name {
font-weight: bold;
font-size: 24px;
font-size: 26px;
height: 35px;
}
.giving {
color: #b0b0b0;
font-size: 22px;
position: relative;
bottom: -7px;
}
}
... ...
... ... @@ -2,7 +2,7 @@
.seckill-list {
.nav-list {
background-color: #fff;
width: auto;
width: 750px;
border-top: solid 1PX #e1e1e1;
height: 119px;
overflow: hidden;
... ... @@ -59,7 +59,7 @@
}
.selected {
display: none;
color: #d0021b !important;
color: #d0021b !important;
font-weight: bold;
height: 79px;
line-height: 40px;
... ...
.seckill-list {
.product-list {
background-color: #fff;
margin-top: 1px;
.item {
position: relative;
padding: 20px 30px;
display: -webkit-box;
border-bottom: solid 1PX #e1e1e1;
&:first-child {
&:first-child {
border-top: solid 1PX #e1e1e1;
}
... ... @@ -51,7 +52,7 @@
}
.item-time {
-webkit-box-flex: 1;
font-size: 22px;
padding-top: 28px;
-webkit-box-align: end;
... ... @@ -121,5 +122,5 @@
z-index: 1;
}
}
}
\ No newline at end of file
}
... ...