feat(voice): 录音时实时读秒,60 秒自动停止
- 入驻申请页/大神工作台:点击开始录音后,按钮显示已录秒数,状态栏显示剩余秒数(每秒刷新) - 录音中按钮转为红橙渐变并呼吸闪烁,状态文字高亮;离开页面/出错自动清理计时器 - 60 秒到点自动 stop 录音,避免超长被服务端拒绝 - voice-intro-consistency 增补读秒护栏(107 套件/710 用例全绿)
这个提交包含在:
@@ -29,6 +29,19 @@ describe('第九十一批语音介绍三端一致性闸门', () => {
|
||||
expect(apply).toContain('duration: 60000');
|
||||
});
|
||||
|
||||
it('录音时实时读秒并在 60 秒自动停止', () => {
|
||||
const workspace = fs.readFileSync(path.join(root, 'pwuniapp/pages/expert/workspace.vue'), 'utf-8');
|
||||
for (const src of [apply, workspace]) {
|
||||
expect(src).toContain('startVoiceTimer');
|
||||
expect(src).toContain('stopVoiceTimer');
|
||||
expect(src).toContain('setInterval');
|
||||
expect(src).toContain('voiceSeconds.value >= 60');
|
||||
expect(src).toContain('recorderManager.stop()');
|
||||
}
|
||||
expect(apply).toContain('剩余 ${Math.max(0, 60 - voiceSeconds.value)}s');
|
||||
expect(workspace).toContain('剩余 ${Math.max(0, 60 - voiceSeconds)}s');
|
||||
});
|
||||
|
||||
const scanSensitive = (dir: string): string[] => {
|
||||
const hits: string[] = [];
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户