feat(h5): update skin scoring, age display and capture countdown

This commit is contained in:
xsl
2026-10-15 00:20:48 +08:00
parent d8c67762da
commit 60ae6c97ef
37 changed files with 5110 additions and 1632 deletions
+13
View File
@@ -102,6 +102,19 @@ function main() {
for (var ci = 0; ci < cases.length; ci++) {
var tag = cases[ci].tag, fixture = cases[ci].fixture, tr = cases[ci].truth;
console.log('== ' + tag + '(realAge=' + tr.profile.realAge + ',skinType=' + tr.profile.skinType + ') ==');
// The old Excel assumes inverse worst-region wrinkles. Pin the new scalar
// input to its old P to isolate regressions elsewhere; do not edit fixtures.
// Actual overall-score behavior is independently tested in wrinkle-overall.js.
fixture.result.score_info.wrinkle_score = tr.cats.wrinkles.P;
// Pin dark-circle score to the existing pigment item to isolate old Excel
// assertions; independent tone-dark-circle tests exercise its new 20% weight.
fixture.result.score_info.dark_circle_score = fixture.result.score_info.melanin_score - (fixture.result.melasma?.value || 0) * 10 - (fixture.result.freckle?.value || 0) * 5;
if (tag === 'case2') {
// Authorized three-view change: left cheek has one closed comedone.
tr.cats.acne = { P: 99, S: 9.97, tier: '良好档', copy: '检出1处皮损(闭口粉刺1处)。建议维持清洁与控油节奏,注意作息与饮食。' };
tr.avgS = 9.53;
tr.summary = tr.summary.replace('六分类S均分9.54', '六分类S均分9.53');
}
var vm = SkinScore.buildViewModel(fixture.result, fixture.side, tr.profile);
// 下颌线角度 AP/AQ:fixture 保真校验(引擎消费角度后由 L 列逐字断言兜底)