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 7fea1d50
authored
Jul 01, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
加锁
1 parent
11c33c5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
mixin/click.js
mixin/click.js
View file @
7fea1d5
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
*/
*/
const
recorderManager
=
uni
.
getRecorderManager
();
const
recorderManager
=
uni
.
getRecorderManager
();
const
plug
=
uni
.
requireNativePlugin
(
"html5app-recordaudio"
);
const
plug
=
uni
.
requireNativePlugin
(
"html5app-recordaudio"
);
import
RecordManager
from
"@/utils/RecordManager"
;
const
recordManager
=
RecordManager
.
getInstance
();
const
UPLOAD_STATUS
=
{
const
UPLOAD_STATUS
=
{
// 上传状态
// 上传状态
success
:
1
,
success
:
1
,
...
@@ -169,8 +171,8 @@ export default {
...
@@ -169,8 +171,8 @@ export default {
this
.
setAudioInfo
({
endReasonType
:
0
,
audioStatus
:
"finish"
});
this
.
setAudioInfo
({
endReasonType
:
0
,
audioStatus
:
"finish"
});
},
},
/**保存记录*/
/**保存记录*/
saveRecord
()
{
async
saveRecord
()
{
uni
.
$lock
=
true
;
const
unlock
=
await
recordManager
.
lock
()
;
const
recordUrlList
=
this
.
audioInfo
.
audioList
.
map
((
i
)
=>
{
const
recordUrlList
=
this
.
audioInfo
.
audioList
.
map
((
i
)
=>
{
return
{
return
{
status
:
UPLOAD_STATUS
.
fail
,
status
:
UPLOAD_STATUS
.
fail
,
...
@@ -187,7 +189,7 @@ export default {
...
@@ -187,7 +189,7 @@ export default {
];
];
console
.
log
(
recordList
,
"recordList"
);
console
.
log
(
recordList
,
"recordList"
);
uni
.
$storage
.
set
(
"recordList"
,
JSON
.
stringify
(
recordList
));
uni
.
$storage
.
set
(
"recordList"
,
JSON
.
stringify
(
recordList
));
un
i
.
$lock
=
false
;
un
lock
()
;
},
},
//结束接待
//结束接待
stopAudio
:
utils
.
throttle
(
async
function
(
status
)
{
stopAudio
:
utils
.
throttle
(
async
function
(
status
)
{
...
...
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