Commit 9a553a20 by 前端

删除备用文件

1 parent 801d8a32
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48 * @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-19 09:38:34 * @LastEditTime: 2024-11-19 11:18:42
* @FilePath: \gl_tape\mixin\click.js * @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -243,12 +243,12 @@ export default { ...@@ -243,12 +243,12 @@ export default {
tempFilePath: audioPath[i] tempFilePath: audioPath[i]
}) })
let oldFilePath let oldFilePath
const getPreAudioList = interruptRecord.getPreAudioList || []
if (saveResult[1] && saveResult[1].savedFilePath) { if (saveResult[1] && saveResult[1].savedFilePath) {
oldFilePath = saveResult[1].savedFilePath oldFilePath = saveResult[1].savedFilePath
this.removeSavedFile(getPreAudioList[i])
uni.$logger.local.info(`保存文件结果路径${oldFilePath}`) uni.$logger.local.info(`保存文件结果路径${oldFilePath}`)
} else { } else {
const getPreAudioList = interruptRecord.getPreAudioList || []
console.log(getPreAudioList)
oldFilePath = getPreAudioList[i] oldFilePath = getPreAudioList[i]
uni.$logger.local.info(`临时文件不存在,找到之前保存的文件${oldFilePath}`) uni.$logger.local.info(`临时文件不存在,找到之前保存的文件${oldFilePath}`)
} }
...@@ -276,6 +276,15 @@ export default { ...@@ -276,6 +276,15 @@ export default {
interruptRecord.updatePreRecords(saveRecords, true) interruptRecord.updatePreRecords(saveRecords, true)
} }
}, },
removeSavedFile(filePath) {
uni.removeSavedFile({
filePath: filePath,
complete: function (res) {
uni.$logger.local.info(`删除轮询的文件${filePath}`)
}
})
},
/** /**
* 删除待提交记录 * 删除待提交记录
* @returns {void} * @returns {void}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!