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
7187387a
Commit
7187387a
authored
Jan 06, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
624cc72e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
4 deletions
+37
-4
release.vue
pages/friendcircle/release.vue
+37
-4
No files found.
pages/friendcircle/release.vue
View file @
7187387a
...
...
@@ -78,6 +78,7 @@
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
padding
:
0
10px
;
}
.release
.audio-o
{
display
:
flex
;
...
...
@@ -131,6 +132,12 @@
color
:
#40766E
;
border
:
1px
solid
#40766E
;
}
.release
.audio-ot
{
width
:
1
;
flex
:
1
;
margin-right
:
20px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
0
10px
;
justify-content
:
space-between
;
height
:
20px
;
background
:
#EBEBEB
;
border-radius
:
4px
;
}
</
style
>
<
template
>
...
...
@@ -150,11 +157,21 @@
</u-upload>
<!-- 音频 -->
<view
class=
"audio"
v-if=
'addMsg.FileType==3'
>
<view
class=
"audio-o"
@
click=
"statraudio()"
>
<view
class=
"audio-o"
@
click=
"statraudio()"
v-if=
"addMsg.FileList.length==0"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound2.png"
mode=
"widthFix"
style=
"width: 20px;height: auto;"
></image>
<text
style=
"margin-left: 10px;"
>
语音录制
</text>
<text
style=
"color: #BBBBBB;"
>
(点击进入录制页面)
</text>
</view>
<view
v-if=
"addMsg.FileList.length>0"
class=
"audio-o"
style=
"justify-content: space-around;width: 100%;"
>
<view
class=
"audio-ot"
@
click=
"playVoice"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound2.png"
mode=
"widthFix"
style=
"width: 20px;height: auto;"
></image>
<text>
{{
reDate
}}
</text>
</view>
<view
style=
"font-size: 14px;color: #40766E;"
>
重新录制
</view>
</view>
</view>
<view
class=
"option-box"
@
click=
"getAddress()"
style=
"margin-top: 10px;"
>
...
...
@@ -195,6 +212,7 @@
<u-popup
v-model=
"audioshow"
mode=
"bottom"
>
<view
class=
"as-box"
>
<view
class=
"as-yuyin"
@
click=
"aa"
@
longpress=
"onStartRecoder"
@
touchend=
"onEndRecoder"
>
...
...
@@ -388,15 +406,28 @@
})
},
// 开始录制
onStartRecoder
()
{
console
.
log
(
'长按'
)
recorderManager
.
start
({
duration
:
600000
duration
:
600000
,
format
:
'mp3'
})
},
// 录制结束
onEndRecoder
()
{
recorderManager
.
stop
()
},
// 播放暂停录音
playVoice
()
{
innerAudioContext
.
src
=
this
.
voicePath
;
if
(
innerAudioContext
.
paused
)
{
innerAudioContext
.
play
()
}
else
{
innerAudioContext
.
stop
();
}
},
// 监听
onMonitorEvents
(){
// 录制开始
...
...
@@ -434,7 +465,7 @@
this
.
reDate
=
_m
+
':'
+
_s
},
asupload
(){
console
.
log
(
2
)
let
that
=
this
uni
.
uploadFile
({
url
:
that
.
action
,
...
...
@@ -445,7 +476,9 @@
},
success
:
(
uploadFileRes
)
=>
{
if
(
uploadFileRes
.
statusCode
==
200
)
console
.
log
(
uploadFileRes
);
console
.
log
(
JSON
.
parse
(
uploadFileRes
.
data
));
that
.
addMsg
.
FileList
=
[]
that
.
addMsg
.
FileList
.
push
(
JSON
.
parse
(
uploadFileRes
.
data
).
data
)
},
fail
:
function
(
res
)
{
console
.
log
(
res
)
...
...
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