fix(recommendation): use displayed skin age across reports and admin

This commit is contained in:
xsl
2026-10-16 19:03:25 +08:00
parent 571d78a2ed
commit bb6da17f54
12 changed files with 106 additions and 35 deletions
+4
View File
@@ -181,6 +181,10 @@
// Refresh only presentation for old snapshots: scores, selected care order,
// product and original stored objects are never rewritten/recomputed.
function forDisplay(vm, result, saved) {
if (saved && vm.recommendation && vm.recommendation.ageBasis === 'display') {
var product=products.filter(function(p){return p.tier === vm.recommendation.tier;})[0] || null;
if(saved.product!==product)saved = Object.assign({}, saved, { product: product });
}
if (!saved || (saved.gradeRule === gradeRule && saved.copyRule === copyRule)) return saved || build(vm, result);
var current = build(vm, result);
var care = (saved.care || []).map(function(item) {