...
|
...
|
@@ -9,11 +9,18 @@ var $ = require('jquery'), |
|
|
|
|
|
var commentsNum,consultsNum;
|
|
|
|
|
|
var navtabEle = document.getElementById('nav-tab'),
|
|
|
var consultFooterEle = $('.consult-content-footer')[0],
|
|
|
consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle),
|
|
|
|
|
|
navtabEle = document.getElementById('nav-tab'),
|
|
|
navtabHammer = navtabEle && new Hammer(navtabEle),
|
|
|
|
|
|
gotoConsultEle = document.getElementById('goto-consult'),
|
|
|
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle);
|
|
|
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle),
|
|
|
|
|
|
readmore = document.getElementById('readmore'),
|
|
|
readmoreHammer = readmore && new Hammer(readmore);
|
|
|
|
|
|
|
|
|
|
|
|
(function() {
|
...
|
...
|
@@ -63,6 +70,12 @@ if (navtabHammer) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
if (consultFooterHammer) {
|
|
|
consultFooterHammer.on('tap', function() {
|
|
|
location.href = $(consultFooterEle).data('href');
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (gotoConsultHammer) {
|
|
|
gotoConsultHammer.on('tap', function() {
|
|
|
location.href = $(gotoConsultEle).find('a').attr('href');
|
...
|
...
|
@@ -74,3 +87,16 @@ if ($('.goods-consults-page').length > 0) { |
|
|
$('#yoho-header').css('position', 'fixed').css('top', '0');
|
|
|
}
|
|
|
|
|
|
if ($('.goods-consults-page').length > 0) {
|
|
|
$('#yoho-footer').css('border-top', '1px solid #e0e0e0');
|
|
|
}
|
|
|
|
|
|
if (readmoreHammer) {
|
|
|
readmoreHammer.on('tap', function() {
|
|
|
$('.readmore').hide();
|
|
|
$('.goods-consults .consult-item').show();
|
|
|
return false;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
require('./fav'); |
...
|
...
|
|