style:category 和产品详情和详情样式调整

This commit is contained in:
2025-05-12 15:37:24 +08:00
parent fccf4a3fc3
commit e201814094
7 changed files with 49 additions and 10 deletions

View File

@@ -120,7 +120,7 @@
<!-- 产品介绍详情-->
<div class="oriprInfo">
<div class="titleprinfo">
<a href="#detail">{:lang('product_detail.detail_section_title')}</a>
<a href="#detail" class="checkshow">{:lang('product_detail.detail_section_title')}</a>
<span>|</span>
<a href="#related">{:lang('product_detail.related_products')}</a></div>
<!-- 富文本渲染-->
@@ -284,6 +284,18 @@
}
})
});
// 产品详情切换
$('.titleprinfo a').click(function(e) {
e.preventDefault();
$('.titleprinfo a').removeClass('checkshow');
$(this).addClass('checkshow');
var targetId = $(this).attr('href');
if($(targetId).length) {
$('html, body').animate({
scrollTop: $(targetId).offset().top
}, 500);
}
});
});
</script>
{/block}