Commit f3f7b41e by liimin

新增一个录音前 删除上一个临时录音文件

1 parent a1b28d5e
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2025-01-02 18:49:17
* @LastEditors: limin
* @LastEditTime: 2025-01-15 22:01:56
* @LastEditTime: 2025-01-20 16:26:08
* @FilePath: \gl_tape\utils\recordManager\TempRecord.js
*/
import utils from '../utils'
......@@ -136,12 +136,20 @@ class TempRecord {
}
async addNewAudio() {
await this.removeOldTempAudio()
const lastAudio = await helpler.getLatestAudioFilePath()
uni.$logger.local.info('〖接待记录Record〗 == 添加一个新的录音' + lastAudio)
this.record.tempFilePath = lastAudio
const __path = await this.saveFilePath(lastAudio)
this.record.recordUrlList.push({ file: __path })
}
async removeOldTempAudio() {
const { tempFilePath } = this.record
uni.$logger.local.info('〖接待记录Record〗 == 删除上一个临时文件 -> ' + tempFilePath)
return this.removeFile(tempFilePath)
}
updatePath() {
const { id, tempFilePath, recordUrlList } = this.record
return this.updateRecord({ tempFilePath, recordUrlList }, { id })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!