feat(h5): align report care and single-product section with updated design

This commit is contained in:
xsl
2026-10-15 01:30:45 +08:00
parent 60ae6c97ef
commit 77493bdff5
18 changed files with 983 additions and 728 deletions
+8 -9
View File
@@ -1556,20 +1556,19 @@
}).join('') || '<p class="care-item">本次有效数据不足,暂无个性化护理建议。</p>';
var product = presentation.product;
$('.card-product').hidden = !product;
$('.prod-title').hidden = !product;
$('#product-unavailable').hidden = !!product;
if (product) {
$('#product-title').textContent = product.title;
$('#product-name').replaceChildren();
[product.name, '双仓精华液'].forEach(function (line) {
var span = document.createElement('span'); span.className = 'product-line'; span.textContent = line;
$('#product-name').appendChild(span);
});
// Presentation snapshots retain historical copy/recommendations. Only the
// artwork crop is refreshed by tier, without mutating stored report data.
// product display/artwork is refreshed by selected tier, never re-selected.
var productArt = ReportUI.products.filter(function (p) { return p.tier === product.tier; })[0];
$('#product-title').textContent = productArt ? productArt.title : product.title;
$('#product-name').textContent = productArt ? productArt.name : product.name;
$('#product-image').src = productArt ? productArt.image : product.image;
$('#product-image').alt = product.name + '双仓精华液';
$('#product-image').alt = (productArt ? productArt.title : product.title) + '推荐产品';
} else {
$('#product-image').removeAttribute('src');
$('#product-title').textContent = '';
$('#product-name').textContent = '';
}
}
+3 -3
View File
@@ -10,9 +10,9 @@
['sens', '泛红', 'stab', 'sens'], ['acne', '痘痘', 'stab', 'acne']
];
var products = [
{ tier: 1, match: '25+束紧精华', title: "1'me 主场精华 I", name: '以我本然有光蓄活', image: 'assets/img/ui-20261012/product-25.jpg' },
{ tier: 2, match: '35+支撑精华', title: "1'me 主场精华 II", name: '以我自在有势挺括', image: 'assets/img/ui-20261012/product-35.jpg' },
{ tier: 3, match: '50+重塑精华', title: "1'me 主场精华 III", name: '以我从容有态构塑', image: 'assets/img/ui-20261012/product-50.jpg' }
{ tier: 1, match: '25+束紧精华', title: "1'me 主场精华 I", name: '焕活光泽 透亮紧致', image: 'assets/img/ui-20261015/product-25.png' },
{ tier: 2, match: '35+支撑精华', title: "1'me 主场精华 II", name: '恢复弹性 紧实利落', image: 'assets/img/ui-20261015/product-35.png' },
{ tier: 3, match: '50+重塑精华', title: "1'me 主场精华 III", name: '强韧屏障 轮廓向上', image: 'assets/img/ui-20261015/product-50.png' }
];
var levelMap = { '预警': '改善', '改善': '良好', '良好': '优秀' };
var dimNames = { firm: '紧塑力', vita: '透亮感', stab: '稳韧力' };