Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2c1faa75
authored
Oct 09, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话语音组件优化
1 parent
98649729
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
vue3-lw-pc/src/components/ChatContent.vue
vue3-lw-pc/src/components/Voice.vue
vue3-lw-pc/src/components/ChatContent.vue
View file @
2c1faa7
...
...
@@ -54,7 +54,7 @@ export default {
</
script
>
<
template
>
<div
:class=
"
{ 'message-right': message.fromId === queryChat.fromId, message: message.fromId !== queryChat.fromId }
">
<div
:class=
"
message.fromId === queryChat.fromId ? 'message-right' : 'message'
"
>
<template
v-if=
"message.msgType === 'text'"
>
<template
v-if=
"setIndex(JSON.parse(message.contact).content) == -1"
>
<div>
...
...
@@ -84,13 +84,13 @@ export default {
target=
"_black"
>
{{ content }}
</a>
<div
v-else-if=
"message.msgType === 'voice'"
>
<div
v-else-if=
"message.msgType === 'voice'"
class=
"ac"
>
<voice
:amrUrl=
"JSON.parse(message.contact)['attachment']"
></voice>
<
span
style=
"font-size: 12px; color: var(--font-black-6)"
>
语音消息
</span
>
<
div
style=
"font-size: 12px"
>
语音消息
</div
>
</div>
<div
v-else-if=
"message.msgType === 'meeting_voice_call'"
>
<div
v-else-if=
"message.msgType === 'meeting_voice_call'"
class=
"ac"
>
<voice
:amrUrl=
"JSON.parse(message.contact)['attachment']"
></voice>
<span
style=
"font-size: 12px
; color: var(--font-black-6)
"
v-if=
"JSON.parse(message.contact)['endtime']"
>
<span
style=
"font-size: 12px"
v-if=
"JSON.parse(message.contact)['endtime']"
>
语音通话-结束时间:{{ setDate(JSON.parse(message.contact)['endtime']) }}
</span>
</div>
...
...
vue3-lw-pc/src/components/Voice.vue
View file @
2c1faa7
...
...
@@ -46,6 +46,8 @@ export default {
// .catch((e) => {
// this.$message.error('播放录音失败,或文件损坏')
// })
}
else
{
this
.
msgError
(
'语音文件不存在'
)
}
// this.audioSrc = [JSON.parse(this.message.contact)[type]]
},
...
...
@@ -73,28 +75,15 @@ export default {
<
template
>
<div>
<el-icon-microphone
:class=
"['el-icon-microphone', actived && 'actived']"
style=
"font-size: 40px; color: var(--color)"
@
click
.
stop=
"play('attachment')"
/>
<!--
<AudioPlayer
:audio-list=
"audioSrc"
ref=
"AudioPlayer"
:before-play=
"onBeforePlay"
/>
-->
<!--
<el-dialog
v-if=
"audioSrc[0]"
v-model=
"dialogVisible"
width=
"30%"
@
close=
"close"
>
<div
class=
"shabowboxvidoe shabowboxaudio"
>
<audio
controls
>
<source
:src=
"audioSrc[0]"
type=
"audio/mpeg"
/>
</audio>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
</span>
</el-dialog>
-->
<el-icon-microphone
:class=
"['el-icon-microphone cp', actived && 'actived']"
@
click
.
stop=
"play('attachment')"
/>
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
.el-icon-microphone
{
font-size
:
40px
;
color
:
var
(
--color
);
}
@keyframes
play
{
from
{
//
color
:
red
;
...
...
@@ -107,3 +96,10 @@ export default {
animation
:
play
1s
infinite
alternate
;
}
</
style
>
<
style
>
.message-right
{
.el-icon-microphone
{
color
:
inherit
;
}
}
</
style
>
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