fix(mobile): replace emoji glyphs with uni-icons and flex centering app-wide

- ChatComposer panel contract: callers now pass uni-icons type names
  (image/sound/list/help/checkmark) instead of emoji
- voice playback buttons: sound icon + pulse animation, no more 🔊/◼ chars
- practice recent list: rare symbols ⌕⌁◉ (tofu risk) -> wallet/gear/chatbubble
- sop resource icon ▶/文 -> 视/文 character badges
- back arrows: 22 char-based ← -> uni-icons back across 21 pages
- line-height centering -> flex in 8 spots (back buttons, media-remove,
  turn-voice capsule, option-marker, text-button, play-question)
This commit is contained in:
2026-07-19 20:16:05 +08:00
parent 925b48e436
commit c47bf748cb
25 changed files with 101 additions and 56 deletions
+28 -13
View File
@@ -60,7 +60,7 @@
</view>
<view v-if="recentPracticeItems.length" class="assignment-list">
<view v-for="item in recentPracticeItems" :key="item.id" class="assignment-row recent-row" :class="{ highlighted: item.assignment && highlightedAssignmentId === item.assignment.id }" @click="openRecentItem(item)">
<view class="recent-icon" aria-hidden="true">{{ item.icon }}</view>
<view class="recent-icon" aria-hidden="true"><uni-icons :type="item.icon" size="22" color="#e60012" /></view>
<view class="assignment-copy">
<text v-if="item.sourceLabel" class="assignment-badge" :class="item.assignment?.source || 'manual'">
{{ item.sourceLabel }}
@@ -186,7 +186,13 @@
:class="{ playing: isTurnPlaying(index) }"
@click="playTurnVoice(index, turn.text)"
>
<text class="voice-icon">{{ isTurnPlaying(index) ? '◼' : '🔊' }}</text>
<uni-icons
class="voice-icon"
:class="{ playing: isTurnPlaying(index) }"
type="sound"
size="17"
:color="isTurnPlaying(index) ? '#e70014' : '#5a6270'"
/>
<text class="voice-duration">{{ turnVoiceLabel(index) }}</text>
</view>
<view v-if="turnVoice(index).unread" class="voice-dot" />
@@ -465,7 +471,7 @@ const recentPracticeItems = computed<RecentPracticeItem[]>(() => {
desc: item.status === '已完成' ? '已完成' : '待复盘',
sourceLabel: assignmentSourceLabel(item.source),
status: item.status,
icon: item.scenarioName?.includes('催费') ? '⌕' : item.scenarioName?.includes('报修') ? '⌁' : '◉',
icon: item.scenarioName?.includes('催费') ? 'wallet' : item.scenarioName?.includes('报修') ? 'gear' : 'chatbubble',
assignment: item
}));
const historyItems: RecentPracticeItem[] = practiceHistory.value.map((item) => ({
@@ -473,7 +479,7 @@ const recentPracticeItems = computed<RecentPracticeItem[]>(() => {
title: item.scene || '场景训练',
desc: `${item.score || 0} 分 · ${item.status || '已完成'}`,
status: item.status,
icon: item.scene?.includes('催费') ? '⌕' : item.scene?.includes('报修') ? '⌁' : '◉'
icon: item.scene?.includes('催费') ? 'wallet' : item.scene?.includes('报修') ? 'gear' : 'chatbubble'
}));
return [...assignmentItems, ...historyItems].slice(0, 3);
});
@@ -572,9 +578,9 @@ const toggleTurnTranscript = (index: number) => {
};
const practicePanelItems = computed(() => [
{ key: 'audio', icon: '🎵', label: '选音频转文字', disabled: transcribing.value },
{ key: 'help', icon: '🧭', label: helpLoading.value ? '求助中…' : '求助 SOP', disabled: helpLoading.value },
{ key: 'finish', icon: '🏁', label: '结束评分', disabled: !canFinishPractice.value }
{ key: 'audio', icon: 'sound', label: '选音频转文字', disabled: transcribing.value },
{ key: 'help', icon: 'help', label: helpLoading.value ? '求助中…' : '求助 SOP', disabled: helpLoading.value },
{ key: 'finish', icon: 'checkmark', label: '结束评分', disabled: !canFinishPractice.value }
]);
const handlePanelAction = (key: string) => {
@@ -2189,9 +2195,7 @@ onUnload(() => {
margin-right: 12px;
border-radius: 50%;
background: var(--employee-primary-soft);
color: var(--employee-primary);
font-size: 24px;
font-weight: 800;
line-height: 1;
}
.recent-row .assignment-copy {
@@ -2461,9 +2465,12 @@ onUnload(() => {
}
.turn-voice-button {
display: flex;
width: auto;
min-width: 76px;
min-height: 32px;
height: 32px;
align-items: center;
justify-content: center;
padding: 0 10px;
border: 1px solid #f2b9bf;
border-radius: 999px;
@@ -2471,7 +2478,7 @@ onUnload(() => {
color: #e60012;
font-size: 12px;
font-weight: 800;
line-height: 30px;
line-height: 1.2;
}
.daily-question-voice {
@@ -2729,10 +2736,18 @@ onUnload(() => {
}
.voice-icon {
font-size: 15px;
line-height: 1;
}
.voice-icon.playing {
animation: voice-icon-pulse 1s ease-in-out infinite;
}
@keyframes voice-icon-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.voice-duration {
color: #232a33;
font-size: 15px;