Authored by Lynnic

修复了评论咨询js bug --code reviewed by xuqi

... ... @@ -13,7 +13,11 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle),
navtabEle = document.getElementById('nav-tab'),
navtabHammer = navtabEle && new Hammer(navtabEle);
navtabHammer = navtabEle && new Hammer(navtabEle),
gotoConsultEle = document.getElementById('goto-consult'),
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle);
(function() {
... ... @@ -50,10 +54,10 @@ if (navtabHammer) {
if (!$this.hasClass('focus')) {
$('#nav-tab li').each(function() {
$this.removeClass('focus');
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$this.addClass('hide');
$(this).addClass('hide');
});
$this.addClass('focus');
... ... @@ -67,4 +71,10 @@ if (consultFooterHammer) {
consultFooterHammer.on('tap', function() {
location.href = $(consultFooterEle).find('a').attr('href');
});
}
if (gotoConsultHammer) {
gotoConsultHammer.on('tap', function() {
location.href = $(gotoConsultEle).find('a').attr('href');
});
}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="goods-consults-page yoho-page">
<div class="goto-consult">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
</div>
<div class="goto-consult" id="goto-consult">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
</div>
{{# consults}}
<div class="goods-consults" id="goods-consults">
{{#list}}
... ...