Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f3f7b41e
authored
Jan 20, 2025
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增一个录音前 删除上一个临时录音文件
1 parent
a1b28d5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
utils/recordManager/TempRecord.js
utils/recordManager/TempRecord.js
View file @
f3f7b41
...
...
@@ -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
})
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment