fix(voice): add per-lesson failure recovery

This commit is contained in:
zhangheng
2026-07-22 20:59:53 +08:00
parent 71923f372f
commit 55084a4784
3 changed files with 152 additions and 11 deletions

View File

@@ -101,7 +101,7 @@
<text class="voice-record-duration">{{lesson.durationText}} · {{lesson.transcriptLength}}字</text>
</view>
</view>
<text class="voice-record-status">{{lesson.statusText}}</text>
<text class="voice-record-status {{lesson.failedSegmentCount > 0 ? 'voice-record-status-failed' : ''}}">{{lesson.statusText}}</text>
</view>
<text
wx:if="{{lesson.transcript}}"
@@ -123,6 +123,20 @@
bindtap="addVoiceLessonToDraft"
>{{lesson.addActionText}}</button>
</view>
<view wx:if="{{lesson.failedSegmentCount > 0}}" class="voice-record-failure-actions">
<button
class="voice-record-retry-button"
data-lesson-id="{{lesson.id}}"
disabled="{{recording || voiceBusy}}"
catchtap="retryVoiceLesson"
>重试转录</button>
<button
class="voice-record-delete-button"
data-lesson-id="{{lesson.id}}"
disabled="{{recording || voiceBusy}}"
catchtap="discardVoiceLesson"
>删除录音</button>
</view>
</view>
</checkbox-group>
<view wx:if="{{eligibleSummaryLessonCount > 0}}" class="voice-summary-controls">