Authored by Lynnic

评论咨询tab跳转要绑定到外层元素上 -- code reviewed by zhaobiao

... ... @@ -4,12 +4,17 @@
* @date: 2015/11/18
*/
var $ = require('jquery'),
tip = require('../../plugin/tip');
var commentsNum;
tip = require('../../plugin/tip'),
Hammer = require('yoho.hammer');
var commentsNum,consultsNum;
var consultFooterEle = document.getElementById('consult-content-footer'),
consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle);
(function() {
var consultsNum = $('#nav-tab .consults-num').html() - 0;
consultsNum = $('#nav-tab .consults-num').html() - 0;
commentsNum = $('#nav-tab .comments-num').html() - 0;
... ... @@ -50,4 +55,10 @@ $('#nav-tab li').on('touchend', function() {
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
}
}
});
\ No newline at end of file
});
if (consultFooterHammer) {
consultFooterHammer.on('tap', function() {
location.href = $(consultFooterEle).find('a').attr('href');
});
}
\ No newline at end of file
... ...
... ... @@ -122,7 +122,7 @@
<a href="{{cartUrl}}" class="num-incart iconfont">&#xe62c;</a>
{{#if addToCart}}
<a href="{{addToCartUrl}}" class="addto-cart">加入购物车</a>
<a id="addtoCart" href="{{addToCartUrl}}" class="addto-cart">加入购物车</a>
{{/if}}
{{#if soldOut}}
... ...
... ... @@ -49,7 +49,7 @@
</div>
{{/ consults}}
</div>
<div class="consult-content-footer">
<div class="consult-content-footer" id="consult-content-footer">
<a href="{{link}}">
查看更多
<span class="iconfont">&#xe604;</span></a>
... ...