Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
ecf70ae3
Commit
ecf70ae3
authored
Jan 12, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bbf63be6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
23 deletions
+53
-23
release.vue
pages/friendcircle/release.vue
+53
-23
No files found.
pages/friendcircle/release.vue
View file @
ecf70ae3
...
...
@@ -92,8 +92,9 @@
}
.release
.as-box
{
width
:
100%
;
height
:
2
35
px
;
height
:
2
40
px
;
background
:
#FFFFFF
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
...
...
@@ -123,6 +124,7 @@
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
margin-top
:
5px
;
}
.release
.as-btn-item
{
width
:
85px
;
...
...
@@ -247,20 +249,24 @@
<!-- 音频模块 -->
<u-popup
v-model=
"audioshow"
mode=
"bottom"
>
<view
class=
"as-box"
>
<view
class=
"as-yuyin"
@
longpress=
"onStartRecoder"
@
touchend=
"onEndRecoder"
>
<view
style=
"width: 40px;height: 40px;display: flex;align-items: center;justify-content: center;
position: absolute;right: 0;top: 0;"
@
click=
"audioshow=false"
>
<u-icon
name=
"cross"
:size=
"50"
color=
"#333"
></u-icon>
</view>
<view
class=
"as-yuyin"
>
<image
v-if=
"gifshow==false"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mic.png"
mode=
"widthFix"
style=
"width: 37px;height: auto;"
></image>
<image
v-if=
"gifshow==true"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/luyin.gif"
mode=
"widthFix"
style=
"width: 37px;height: auto;"
></image>
</view>
<text
class=
"now-date"
>
{{
reDate
}}
</text>
<text
class=
"now-date"
>
{{
reDate2
!=
reDate
&&
voicePath
!=
''
?(
reDate2
+
'/'
):
''
}}{{
reDate
}}
</text>
<view
class=
"as-btn"
>
<view
class=
"as-btn-item"
@
click=
"audioshow=false"
>
取消
<view
class=
"as-btn-item"
@
click=
"luyintype!=2? playVoice():''"
>
试听
</view>
<view
class=
"as-btn-item"
style=
"background: #40766E;color: #FFFFFF;"
@
click=
"onStartRecoder"
>
{{
luyintype
==
1
?
'开始'
:(
luyintype
==
2
?
'结束'
:
'重录制'
)
}}
</view>
<view
class=
"as-btn-item"
@
click=
"
asupload()
"
>
<view
class=
"as-btn-item"
@
click=
"
luyintype!=2?asupload():''
"
>
确定
</view>
</view>
...
...
@@ -312,6 +318,7 @@
gifshow
:
false
,
playshow
:
false
,
controls
:
false
,
//显示默认控件
luyintype
:
1
,
}
},
...
...
@@ -429,6 +436,8 @@
console
.
log
(
r
)
that
.
reDate
=
'00:00'
that
.
audioshow
=
true
;
that
.
voicePath
=
''
that
.
luyintype
=
1
;
},
fail
(){
wx
.
showModal
({
title
:
'录音管理器'
,
...
...
@@ -445,6 +454,8 @@
})
that
.
reDate
=
'00:00'
that
.
audioshow
=
true
;
that
.
voicePath
=
''
that
.
luyintype
=
1
;
}
else
{
wx
.
showToast
({
title
:
'授权失败'
,
...
...
@@ -468,6 +479,8 @@
}
else
{
that
.
reDate
=
'00:00'
that
.
audioshow
=
true
;
that
.
voicePath
=
''
that
.
luyintype
=
1
;
}
}
})
...
...
@@ -528,21 +541,32 @@
this
.
reDate
=
'00:00'
this
.
addMsg
.
FileList
=
[];
this
.
audioshow
=
true
;
this
.
luyintype
=
1
;
clearInterval
(
this
.
timer
)
innerAudioContext
.
stop
();
//视频播放完停止
},
// 开始录制
onStartRecoder
()
{
console
.
log
(
'长按'
)
if
(
this
.
luyintype
==
1
){
this
.
gifshow
=
true
recorderManager
.
start
({
duration
:
600000
,
format
:
'mp3'
})
},
// 录制结束
onEndRecoder
()
{
this
.
luyintype
=
2
}
else
if
(
this
.
luyintype
==
2
){
// 录制结束
console
.
log
(
'结束'
)
this
.
gifshow
=
false
recorderManager
.
stop
()
this
.
luyintype
=
3
}
else
{
this
.
reset
()
}
},
shiting
(){
//试听
innerAudioContext
.
src
=
this
.
voicePath
;
},
// 播放暂停录音
playVoice
()
{
...
...
@@ -630,8 +654,14 @@
},
// 音频的上传
asupload
(){
innerAudioContext
.
stop
();
//
clearInterval
(
this
.
timer
)
let
that
=
this
that
.
reDate2
=
'00:00'
that
.
playshow
=
false
that
.
nowbofo
=
false
;
//控制播放的字段
that
.
sec
=
0
that
.
min
=
0
uni
.
uploadFile
({
url
:
that
.
action
,
filePath
:
that
.
voicePath
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment