|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
+ <view class="container" :style="{ '--font-scale': fontScale }">
|
|
|
<!-- ==================== Hero 头部 ==================== -->
|
|
|
<view class="hero">
|
|
|
<view class="hero-bg-circle hero-bg-circle-1"></view>
|
|
|
@@ -243,8 +243,10 @@ var NOISE_NAME_KEYS = ['联系电话', '报告编码', '测试时间', '档案',
|
|
|
'出生', '年份', '编码', '编号', '手机', '身份证', '总均分', '邮箱']
|
|
|
// 百分位制 category(0-100)
|
|
|
var PERCENT_CATEGORIES = ['overall', 'cognitive']
|
|
|
+import fontScaleMixin from '@/mixins/font-scale.js'
|
|
|
|
|
|
export default {
|
|
|
+ mixins: [fontScaleMixin],
|
|
|
components: { RadarChart },
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -670,7 +672,7 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
.hero-bg-circle-2 { width: 220rpx; height: 220rpx; left: -80rpx; bottom: -60rpx; }
|
|
|
|
|
|
.hero-top { position: relative; z-index: 1; }
|
|
|
-.hero-name { font-size: 44rpx; font-weight: 700; color: $app-surface; display: block; }
|
|
|
+.hero-name { font-size: calc(44rpx * var(--font-scale, 1)); font-weight: 700; color: $app-surface; display: block; }
|
|
|
.hero-dim-row { display: flex; align-items: center; margin-top: 14rpx; flex-wrap: wrap; }
|
|
|
.hero-dim-badge {
|
|
|
font-size: 22rpx; color: $app-surface;
|
|
|
@@ -684,7 +686,7 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
border-radius: 24rpx; padding: 6rpx 18rpx;
|
|
|
margin-right: 14rpx;
|
|
|
}
|
|
|
-.hero-date { font-size: 24rpx; color: rgba(255,255,255,0.75); }
|
|
|
+.hero-date { font-size: calc(24rpx * var(--font-scale, 1)); color: rgba(255,255,255,0.75); }
|
|
|
|
|
|
.hero-score-wrap {
|
|
|
position: relative; z-index: 1;
|
|
|
@@ -695,8 +697,8 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
.hero-score-divider { width: 1rpx; height: 72rpx; background: rgba(255,255,255,0.25); }
|
|
|
.hero-score-num { font-size: 88rpx; font-weight: 700; color: $app-surface; line-height: 1; }
|
|
|
.hero-score-num-pct { font-size: 72rpx; }
|
|
|
-.hero-score-pct-unit { font-size: 32rpx; font-weight: 400; margin-left: 2rpx; }
|
|
|
-.hero-score-label { font-size: 24rpx; color: rgba(255,255,255,0.75); margin-top: 12rpx; }
|
|
|
+.hero-score-pct-unit { font-size: calc(32rpx * var(--font-scale, 1)); font-weight: 400; margin-left: 2rpx; }
|
|
|
+.hero-score-label { font-size: calc(24rpx * var(--font-scale, 1)); color: rgba(255,255,255,0.75); margin-top: 12rpx; }
|
|
|
|
|
|
.hero-pct-bar-wrap { position: relative; z-index: 1; margin-top: 32rpx; }
|
|
|
.hero-pct-track {
|
|
|
@@ -712,7 +714,7 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
background: $app-surface; border-radius: 2rpx; transform: translateX(-2rpx);
|
|
|
}
|
|
|
.hero-pct-foot { margin-top: 12rpx; text-align: center; }
|
|
|
-.hero-pct-foot-text { font-size: 22rpx; color: rgba(255,255,255,0.85); }
|
|
|
+.hero-pct-foot-text { font-size: calc(22rpx * var(--font-scale, 1)); color: rgba(255,255,255,0.85); }
|
|
|
|
|
|
/* ==================== 通用卡片 ==================== */
|
|
|
.body { padding: 28rpx 24rpx 0; }
|
|
|
@@ -730,18 +732,18 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
margin-right: 12rpx; align-self: center;
|
|
|
}
|
|
|
.card-title-bar-gold { background: linear-gradient(180deg, $dim-wealth, $brand-primary); }
|
|
|
-.card-title { font-size: 30rpx; font-weight: 600; color: $facade-text-gray-800; }
|
|
|
-.card-title-sub { font-size: 22rpx; color: $facade-text-gray-400; margin-left: 14rpx; }
|
|
|
+.card-title { font-size: calc(30rpx * var(--font-scale, 1)); font-weight: 600; color: $facade-text-gray-800; }
|
|
|
+.card-title-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-gray-400; margin-left: 14rpx; }
|
|
|
|
|
|
/* ==================== 指标条 ==================== */
|
|
|
.metric-row { margin-bottom: 26rpx; }
|
|
|
.metric-row:last-child { margin-bottom: 4rpx; }
|
|
|
.metric-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12rpx; }
|
|
|
-.metric-name { font-size: 26rpx; color: $facade-text-gray-700; font-weight: 500; }
|
|
|
+.metric-name { font-size: calc(26rpx * var(--font-scale, 1)); color: $facade-text-gray-700; font-weight: 500; }
|
|
|
.metric-value-wrap { display: flex; align-items: center; }
|
|
|
-.metric-value { font-size: 30rpx; font-weight: 700; color: $dim-wisdom-deep; }
|
|
|
+.metric-value { font-size: calc(30rpx * var(--font-scale, 1)); font-weight: 700; color: $dim-wisdom-deep; }
|
|
|
.metric-value-warn { color: $brand-primary-dark; }
|
|
|
-.metric-unit { font-size: 20rpx; font-weight: 400; }
|
|
|
+.metric-unit { font-size: calc(20rpx * var(--font-scale, 1)); font-weight: 400; }
|
|
|
.metric-warn-badge {
|
|
|
font-size: 20rpx; color: $brand-primary-dark;
|
|
|
background: $uni-primary-pale; border: 1rpx solid $c-rpt-orange;
|
|
|
@@ -762,14 +764,14 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
display: flex; justify-content: space-between; align-items: center;
|
|
|
padding: 10rpx 0;
|
|
|
}
|
|
|
-.metric-plain-value { font-size: 26rpx; color: $dim-wisdom-deep; font-weight: 600; }
|
|
|
+.metric-plain-value { font-size: calc(26rpx * var(--font-scale, 1)); color: $dim-wisdom-deep; font-weight: 600; }
|
|
|
|
|
|
/* ==================== 大五人格 ==================== */
|
|
|
.bf-row { margin-bottom: 24rpx; }
|
|
|
.bf-row:last-child { margin-bottom: 4rpx; }
|
|
|
.bf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10rpx; }
|
|
|
-.bf-name { font-size: 26rpx; color: $facade-text-gray-700; font-weight: 500; }
|
|
|
-.bf-value { font-size: 30rpx; font-weight: 700; color: $facade-violet-deep; }
|
|
|
+.bf-name { font-size: calc(26rpx * var(--font-scale, 1)); color: $facade-text-gray-700; font-weight: 500; }
|
|
|
+.bf-value { font-size: calc(30rpx * var(--font-scale, 1)); font-weight: 700; color: $facade-violet-deep; }
|
|
|
.bf-track { position: relative; height: 14rpx; border-radius: 7rpx; background: $c-rpt-violet-grid; }
|
|
|
.bf-fill { height: 100%; border-radius: 7rpx; }
|
|
|
.bf-neutral { background: linear-gradient(90deg, $c-rpt-violet-soft, $facade-violet); }
|
|
|
@@ -779,7 +781,7 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
position: absolute; top: -5rpx; left: 60%; width: 2rpx; height: 24rpx;
|
|
|
background: $facade-text-gray-400; border-radius: 1rpx;
|
|
|
}
|
|
|
-.bf-hint { display: block; font-size: 20rpx; color: $facade-text-gray-400; margin-top: 6rpx; }
|
|
|
+.bf-hint { display: block; font-size: calc(20rpx * var(--font-scale, 1)); color: $facade-text-gray-400; margin-top: 6rpx; }
|
|
|
|
|
|
/* ==================== 情绪状态 ==================== */
|
|
|
.emo-row { display: flex; align-items: center; margin-bottom: 20rpx; }
|
|
|
@@ -789,8 +791,8 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
background: $facade-violet-tint-2; border-radius: 14rpx;
|
|
|
padding: 10rpx 18rpx; margin-right: 18rpx; flex-shrink: 0;
|
|
|
}
|
|
|
-.emo-name { font-size: 24rpx; color: $c-rpt-violet-text; margin-right: 12rpx; }
|
|
|
-.emo-value { font-size: 28rpx; font-weight: 700; color: $facade-violet-deep; }
|
|
|
+.emo-name { font-size: calc(24rpx * var(--font-scale, 1)); color: $c-rpt-violet-text; margin-right: 12rpx; }
|
|
|
+.emo-value { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 700; color: $facade-violet-deep; }
|
|
|
.emo-track { flex: 1; height: 12rpx; border-radius: 6rpx; background: $c-rpt-violet-grid; overflow: hidden; }
|
|
|
.emo-fill { height: 100%; border-radius: 6rpx; background: linear-gradient(90deg, $facade-violet-light, $facade-violet-deep); }
|
|
|
|
|
|
@@ -809,7 +811,7 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
padding: 16rpx 20rpx;
|
|
|
margin-bottom: 20rpx;
|
|
|
}
|
|
|
-.emo-summary-text { font-size: 24rpx; color: $c-rpt-violet-text; }
|
|
|
+.emo-summary-text { font-size: calc(24rpx * var(--font-scale, 1)); color: $c-rpt-violet-text; }
|
|
|
|
|
|
/* ==================== 体质健康 ==================== */
|
|
|
.habit-row {
|
|
|
@@ -820,8 +822,8 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
border-bottom: 1rpx solid $c-rpt-line;
|
|
|
}
|
|
|
.habit-row:last-child { border-bottom: none; }
|
|
|
-.habit-name { font-size: 26rpx; color: $facade-text-gray-700; }
|
|
|
-.habit-value { font-size: 26rpx; color: $dim-wisdom-deep; font-weight: 600; }
|
|
|
+.habit-name { font-size: calc(26rpx * var(--font-scale, 1)); color: $facade-text-gray-700; }
|
|
|
+.habit-value { font-size: calc(26rpx * var(--font-scale, 1)); color: $dim-wisdom-deep; font-weight: 600; }
|
|
|
|
|
|
/* ==================== 基本信息 ==================== */
|
|
|
.info-grid { display: flex; flex-wrap: wrap; }
|
|
|
@@ -829,13 +831,13 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
width: 33.33%; display: flex; flex-direction: column; align-items: center;
|
|
|
margin-bottom: 16rpx;
|
|
|
}
|
|
|
-.info-value { font-size: 36rpx; font-weight: 700; color: $facade-text-gray-800; }
|
|
|
-.info-unit { font-size: 20rpx; font-weight: 400; color: $facade-text-gray-400; margin-left: 4rpx; }
|
|
|
-.info-name { font-size: 22rpx; color: $facade-text-gray-400; margin-top: 6rpx; }
|
|
|
+.info-value { font-size: calc(36rpx * var(--font-scale, 1)); font-weight: 700; color: $facade-text-gray-800; }
|
|
|
+.info-unit { font-size: calc(20rpx * var(--font-scale, 1)); font-weight: 400; color: $facade-text-gray-400; margin-left: 4rpx; }
|
|
|
+.info-name { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-gray-400; margin-top: 6rpx; }
|
|
|
|
|
|
/* ==================== 成长建议/评语 ==================== */
|
|
|
.advice-content {
|
|
|
- font-size: 26rpx; color: $c-rpt-body; line-height: 1.8;
|
|
|
+ font-size: calc(26rpx * var(--font-scale, 1)); color: $c-rpt-body; line-height: 1.8;
|
|
|
white-space: pre-wrap; word-break: break-all;
|
|
|
}
|
|
|
.advice-clamped {
|
|
|
@@ -844,15 +846,15 @@ $c-rpt-mask-ink: #000; // 遮罩渐变异色(mask-image)
|
|
|
mask-image: linear-gradient(180deg, $c-rpt-mask-ink 60%, transparent 100%);
|
|
|
}
|
|
|
.advice-toggle { text-align: center; margin-top: 16rpx; }
|
|
|
-.advice-toggle-text { font-size: 24rpx; color: $dim-wisdom; font-weight: 500; }
|
|
|
+.advice-toggle-text { font-size: calc(24rpx * var(--font-scale, 1)); color: $dim-wisdom; font-weight: 500; }
|
|
|
|
|
|
.foot-note { text-align: center; padding: 18rpx 0 8rpx; }
|
|
|
-.foot-note-text { font-size: 20rpx; color: $c-rpt-foot; }
|
|
|
+.foot-note-text { font-size: calc(20rpx * var(--font-scale, 1)); color: $c-rpt-foot; }
|
|
|
|
|
|
/* ==================== 其他 ==================== */
|
|
|
.loading-wrap { display: flex; justify-content: center; padding: 140rpx 0; }
|
|
|
.loading-text { font-size: 28rpx; color: $facade-text-muted; }
|
|
|
.empty-wrap { display: flex; justify-content: center; padding: 140rpx 0; }
|
|
|
-.empty-text { font-size: 28rpx; color: $facade-text-muted; }
|
|
|
+.empty-text { font-size: calc(28rpx * var(--font-scale, 1)); color: $facade-text-muted; }
|
|
|
.bottom-spacer { height: 60rpx; }
|
|
|
-</style>
|
|
|
+</style>
|