Authored by htoooth

fix

... ... @@ -555,6 +555,16 @@
</div>
{{# consultComment}}
<div class="lazy-load-object">
<textarea class="datalazyload" style="visibility: hidden;">
<script>
fetchComment();
fetchReturn();
loadRecommend();
</script>
</textarea>
</div>
<div class="consult-comment info-block">
<p class="block-title">
... ... @@ -611,14 +621,7 @@
</div>
</div>
<div class="lazy-load-object">
<textarea class="datalazyload" style="visibility: hidden;">
<script>
fetchComment();
fetchReturn();
</script>
</textarea>
</div>
</div>
{{/ consultComment}}
... ... @@ -674,6 +677,7 @@
{{> product/latest-walk-tpl}}
</div>
{{/if}}
<div id="recommend-shop">
{{>product/recommend}}
</div>
... ...
... ... @@ -17,8 +17,8 @@ module.exports = {
cookieDomain: '.yohobuy.com',
domains: {
favApi: 'http://192.168.102.31:8092/brower',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
api: 'http://dev-api.yohops.com:9999/',
service: 'http://dev-service.yohops.com:9999/',
search: 'http://192.168.102.216:8080/yohosearch/'
},
subDomains: {
... ... @@ -64,7 +64,7 @@ module.exports = {
port: '4444' // influxdb port
},
console: {
level: 'error',
level: 'info',
colorize: 'all',
prettyPrint: true
}
... ...
... ... @@ -12,8 +12,4 @@
</div>
\{{/ latestWalk}}
</script>
<div class="lazy-load-object">
<textarea class="latest-walk-datalazyload" style="visibility: hidden;">
<script> fetchLatestWalk(); </script>
</textarea>
</div>
... ...
... ... @@ -7,5 +7,11 @@
</div>
{{> product/latest-walk-tpl}}
<div class="lazy-load-object">
<textarea class="latest-walk-datalazyload" style="visibility: hidden;">
<script> fetchLatestWalk(); </script>
</textarea>
</div>
{{/if}}
{{/unless}}
... ...
... ... @@ -598,7 +598,6 @@ window.fetchHotArea = fetchHotArea;
// 商品详情图片懒加载
lazyLoad($('#details-html img'));
// 咨询和评价
function fetchComment() {
var commentPage = 1,
... ... @@ -825,7 +824,8 @@ function loadRecommend() {
}
});
}
loadRecommend();
window.loadRecommend = loadRecommend;
// 推荐和浏览切换
$('.individual-comment').on('click', '.title', function() {
... ... @@ -843,11 +843,12 @@ $('.individual-comment').on('click', '.title', function() {
$this.siblings('.cur').removeClass('cur');
if (index === 0) {
// 浏览
// 店铺推荐
$recommendComment.slideDown(SLIDETIME);
$latestWalk.slideUp(SLIDETIME);
} else {
// 最近游览
fetchLatestWalk(); // eslint-disable-line
$recommendComment.slideUp(SLIDETIME);
$latestWalk.slideDown(SLIDETIME);
}
... ...
... ... @@ -18,6 +18,10 @@ function fetchLatestWalk() {
return;
}
if ($('#latest-walk-goods').html()) {
return;
}
tpl = Handlebars.compile($('#latest-walk-tpl').html());
$.ajax({
... ... @@ -51,6 +55,7 @@ function fetchLatestWalk() {
}
if (latestWalk.length > 0) {
$('#latest-walk-goods').html(tpl({
latestWalk: latestWalk
}));
... ...