接入编号讲解后端查询
Some checks failed
CI / verify (push) Has been cancelled

- 使用真实讲解编号解析接口替换本地演示映射
- 成功后复用现有详情页并自动播放讲解
- 增加查询状态、业务错误提示和相关测试

Made-with: Proma
This commit is contained in:
lyf
2026-08-25 18:00:52 +08:00
parent 00585a7b48
commit 130f155bdf
13 changed files with 490 additions and 13 deletions

View File

@@ -256,6 +256,26 @@ describe('讲解详情音频优先布局', () => {
}), expect.objectContaining({ displayMode: 'mini' }))
})
it('编号入口加载详情后自动发起一次播放', async () => {
mount(ExhibitDetail, {
global: { stubs: { GuidePageFrame: GuidePageFrameStub } }
})
await mocks.onLoadHandler?.({
id: exhibit.id,
stopId: 'stop-1',
autoplay: '1',
entry: 'code'
})
await flushPromises()
expect(mocks.play).toHaveBeenCalledTimes(1)
expect(mocks.play).toHaveBeenCalledWith(
expect.objectContaining({ audioUrl: exhibit.audioUrl }),
expect.objectContaining({ displayMode: 'mini' })
)
})
it('加载中使用同一高度底栏和不确定进度', async () => {
audioState.currentAudio.value = { id: 'audio-1' }
audioState.currentSource.value = { targetType: 'STOP', targetId: 'stop-1', lang: 'en-US' }