fix(mobile): overnight audit round — IA cleanup, internal codes, exam guard

夜间自迭代体检(生产四tab+7子页,截图+console+接口+文案标志采集)
发现三类问题,本轮修复:

1. 信息架构(采纳用户建议):今日页「我的地图」四宫格三项与底部tab
   重复(问/练),仅学习中心/工作上报有增量 → 整块从今日页移除,
   「学习中心/我的训练概况/工作上报」下沉到「我」页新「常用功能」组
   (图标+标题+说明行,与我的积分同列);今日页保留小贴士条,
   页面高度显著缩短、不再与tab栏功能重复。

2. 内部编码泄漏:派发 reason 里的调度批次码(AUTO22-20260717
   PILOT-04)在今日「今日安排」、练页「最近练过」、学习中心
   「昨日错题重练」三处原样示人 → 新增 services/text.ts
   stripInternalCodes(剥前缀码保留人话,整行为码则回退默认文案),
   三处渲染点统一接入。

3. 功能不通:直接访问 /pages/user/exam/index(无id)会请求
   /api/aihr/mobile/exams/0 → 服务端500 → load() 增加 id 守卫,
   显示「请从学习中心·考试任务进入」且不再发请求。

同时:今日「打字问」描述改为不换行文案(原两行文案窄列截断)。

验证:本地7项断言全过;生产复核 map removed/code clean/
profile entries/exam guard/exams|0 not fired 全 true。
发布备份 h5-before-20260718055449。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 05:56:15 +08:00
co-authored by Claude Fable 5
parent 9d7d621300
commit a90f241def
6 changed files with 150 additions and 85 deletions
+111
View File
@@ -120,6 +120,34 @@
<text class="points-entry-arrow">›</text>
</button>
<view v-if="loggedIn" class="panel feature-entries">
<text class="panel-title">常用功能</text>
<button class="feature-entry" @click="openLearning">
<view class="feature-entry-icon learn">学</view>
<view class="feature-entry-copy">
<text class="feature-entry-title">学习中心</text>
<text class="feature-entry-desc">课程学习 · 错题本 · 岗位 SOP</text>
</view>
<text class="points-entry-arrow">›</text>
</button>
<button class="feature-entry" @click="openPracticeSummary">
<view class="feature-entry-icon summary">训</view>
<view class="feature-entry-copy">
<text class="feature-entry-title">我的训练概况</text>
<text class="feature-entry-desc">问师傅帮你汇总近期训练情况</text>
</view>
<text class="points-entry-arrow">›</text>
</button>
<button class="feature-entry" @click="openReport">
<view class="feature-entry-icon report">报</view>
<view class="feature-entry-copy">
<text class="feature-entry-title">工作上报</text>
<text class="feature-entry-desc">日报 / 任务 / 问题上报 · 建设中</text>
</view>
<text class="points-entry-arrow">›</text>
</button>
</view>
<view v-if="loggedIn && evidence" class="panel evidence-panel">
<text class="panel-title">成长证据包(待人工复核)</text>
<view class="evidence-grid">
@@ -243,6 +271,19 @@ const openPoints = () => {
uni.navigateTo({ url: '/pages/user/points/index' });
};
const openLearning = () => {
uni.navigateTo({ url: '/pages/user/learning/index' });
};
const openPracticeSummary = () => {
uni.setStorageSync('aihr_sop_pending_tool', 'MY_PRACTICE_SUMMARY');
uni.switchTab({ url: '/pages/user/sop/index' });
};
const openReport = () => {
uni.navigateTo({ url: `/pages/common/building/index?title=${encodeURIComponent('工作上报')}` });
};
const clearProfileData = () => {
profile.value = null;
history.value = [];
@@ -765,4 +806,74 @@ onShow(() => {
color: var(--employee-muted);
font-size: 12px;
}
.feature-entries {
display: flex;
flex-direction: column;
gap: 4px;
}
.feature-entry {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
margin: 0;
padding: 12px 4px;
border: none;
background: transparent;
text-align: left;
line-height: 1.3;
}
.feature-entry::after {
border: none;
}
.feature-entry + .feature-entry {
border-top: 1px solid #f2f3f5;
}
.feature-entry-icon {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
border-radius: 10px;
color: #ffffff;
font-size: 16px;
font-weight: 700;
}
.feature-entry-icon.learn {
background: #1f5c9d;
}
.feature-entry-icon.summary {
background: #e70014;
}
.feature-entry-icon.report {
background: #d98200;
}
.feature-entry-copy {
flex: 1;
display: flex;
flex-direction: column;
gap: 2px;
}
.feature-entry-title {
color: #18202b;
font-size: 15px;
font-weight: 700;
}
.feature-entry-desc {
color: #8a93a0;
font-size: 12px;
}
</style>