Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
broadcast_cloud
/
web-live
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
2
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d1e6067f
authored
Mar 18, 2021
by
MichaelJier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature
1. 竖屏横屏pc增加发送时间倒计时
parent
11b92c35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
10 deletions
+70
-10
components/modules-pc/sendBox/index.vue
+22
-3
components/modules-vertical/sendBox/sendChat.vue
+25
-4
components/modules/cameraBox/index.vue
+3
-1
components/modules/sendBox/index.vue
+20
-2
No files found.
components/modules-pc/sendBox/index.vue
View file @
d1e6067f
...
@@ -36,7 +36,9 @@
...
@@ -36,7 +36,9 @@
/>
/>
</div>
</div>
<div
class=
"send-emoji"
@
click
.
stop=
"_toggleEmoji"
></div>
<div
class=
"send-emoji"
@
click
.
stop=
"_toggleEmoji"
></div>
<div
class=
"send-btn"
@
click
.
stop=
"_sendChat"
>
发送
</div>
<div
class=
"send-btn"
@
click
.
stop=
"sendCountDown === 0 && _sendChat()"
:class=
"sendCountDown === 0 ? '' : 'unable'"
>
{{
sendCountDown
===
0
?
'发送'
:
`${sendCountDown
}
s`
}}
<
/div
>
<
keep
-
alive
>
<
keep
-
alive
>
<
emoji
-
box
v
-
if
=
"showEmoji"
v
-
model
=
"content"
><
/emoji-box
>
<
emoji
-
box
v
-
if
=
"showEmoji"
v
-
model
=
"content"
><
/emoji-box
>
<
/keep-alive
>
<
/keep-alive
>
...
@@ -56,6 +58,7 @@ export default {
...
@@ -56,6 +58,7 @@ export default {
}
,
}
,
data
()
{
data
()
{
return
{
return
{
sendCountDown
:
0
,
showEmoji
:
false
,
showEmoji
:
false
,
sendDate
:
0
,
sendDate
:
0
,
content
:
''
,
content
:
''
,
...
@@ -123,13 +126,25 @@ export default {
...
@@ -123,13 +126,25 @@ export default {
uuid
:
this
.
uuid
uuid
:
this
.
uuid
}
);
}
);
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
this
.
content
=
''
;
this
.
_resetChat
()
this
.
_remReplay
();
if
(
res
.
data
.
chatAuthModel
===
1
)
{
if
(
res
.
data
.
chatAuthModel
===
1
)
{
this
.
$layer
.
msg
(
'已提交审核,请耐心等待'
);
this
.
$layer
.
msg
(
'已提交审核,请耐心等待'
);
}
}
}
}
}
,
}
,
_resetChat
()
{
clearInterval
(
this
.
sendCountDownTimer
)
this
.
sendCountDown
=
3
this
.
sendCountDownTimer
=
setInterval
(()
=>
{
if
(
this
.
sendCountDown
===
0
)
{
clearInterval
(
this
.
sendCountDownTimer
)
}
else
if
(
this
.
sendCountDown
>
0
)
{
this
.
sendCountDown
--
}
}
,
1000
);
this
.
_remReplay
();
this
.
content
=
''
;
}
,
_isDisabled
()
{
_isDisabled
()
{
if
(
this
.
userInfo
.
isDisableChat
===
1
)
{
if
(
this
.
userInfo
.
isDisableChat
===
1
)
{
this
.
$layer
.
msg
(
'你已经被禁言,该功能暂时无法使用'
);
this
.
$layer
.
msg
(
'你已经被禁言,该功能暂时无法使用'
);
...
@@ -290,6 +305,10 @@ export default {
...
@@ -290,6 +305,10 @@ export default {
border
-
radius
:
2
px
;
border
-
radius
:
2
px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.
unable
{
color
:
#
fff
;
background
-
color
:
#
999
;
}
}
}
.
chat
-
reply
{
.
chat
-
reply
{
position
:
absolute
;
position
:
absolute
;
...
...
components/modules-vertical/sendBox/sendChat.vue
View file @
d1e6067f
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
<div
class=
"box"
>
<div
class=
"box"
>
<input
type=
"text"
v-model=
"content"
@
keyup
.
enter=
"_sendChat"
ref=
"sendInput"
v-iosfit
/>
<input
type=
"text"
v-model=
"content"
@
keyup
.
enter=
"_sendChat"
ref=
"sendInput"
v-iosfit
/>
</div>
</div>
<div
class=
"btn"
@
click=
"_sendChat"
>
发送
</div>
<div
class=
"btn"
@
click=
"sendCountDown === 0 && _sendChat()"
:class=
"sendCountDown === 0 ? '' : 'unable'"
>
{{
sendCountDown
===
0
?
'发送'
:
`${sendCountDown
}
s`
}}
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
...
@@ -17,7 +19,8 @@ export default {
...
@@ -17,7 +19,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
sendDate
:
0
,
sendDate
:
0
,
content
:
''
content
:
''
,
sendCountDown
:
0
}
;
}
;
}
,
}
,
computed
:
{
computed
:
{
...
@@ -49,6 +52,19 @@ export default {
...
@@ -49,6 +52,19 @@ export default {
_close
()
{
_close
()
{
this
.
isShow
=
false
;
this
.
isShow
=
false
;
}
,
}
,
_resetChat
()
{
clearInterval
(
this
.
sendCountDownTimer
)
this
.
sendCountDown
=
3
this
.
sendCountDownTimer
=
setInterval
(()
=>
{
if
(
this
.
sendCountDown
===
0
)
{
clearInterval
(
this
.
sendCountDownTimer
)
}
else
if
(
this
.
sendCountDown
>
0
)
{
this
.
sendCountDown
--
}
}
,
1000
);
this
.
_close
();
this
.
content
=
''
;
}
,
async
_sendChat
()
{
async
_sendChat
()
{
if
(
new
Date
().
getTime
()
-
this
.
sendDate
<=
3000
)
{
if
(
new
Date
().
getTime
()
-
this
.
sendDate
<=
3000
)
{
this
.
$layer
.
msg
(
'您的操作太频繁了'
);
this
.
$layer
.
msg
(
'您的操作太频繁了'
);
...
@@ -67,8 +83,7 @@ export default {
...
@@ -67,8 +83,7 @@ export default {
uuid
:
this
.
uuid
uuid
:
this
.
uuid
}
);
}
);
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
this
.
content
=
''
;
this
.
_resetChat
()
this
.
_close
();
if
(
res
.
data
.
chatAuthModel
===
1
)
{
if
(
res
.
data
.
chatAuthModel
===
1
)
{
this
.
$layer
.
msg
(
'已提交审核,请耐心等待'
);
this
.
$layer
.
msg
(
'已提交审核,请耐心等待'
);
}
}
...
@@ -113,11 +128,17 @@ export default {
...
@@ -113,11 +128,17 @@ export default {
margin
:
0
0.1
rem
;
margin
:
0
0.1
rem
;
padding
:
0
0.1
rem
;
padding
:
0
0.1
rem
;
height
:
0.28
rem
;
height
:
0.28
rem
;
width
:
0.5
rem
;
text
-
align
:
center
;
line
-
height
:
0.28
rem
;
line
-
height
:
0.28
rem
;
border
-
radius
:
0.05
rem
;
border
-
radius
:
0.05
rem
;
background
:
#
409
eff
;
background
:
#
409
eff
;
color
:
#
fff
;
color
:
#
fff
;
font
-
size
:
0.12
rem
;
font
-
size
:
0.12
rem
;
}
}
.
unable
{
color
:
#
fff
;
background
-
color
:
#
999
;
}
}
}
<
/style
>
<
/style
>
components/modules/cameraBox/index.vue
View file @
d1e6067f
...
@@ -82,6 +82,7 @@ export default {
...
@@ -82,6 +82,7 @@ export default {
border
:
1px
solid
#fff
;
border
:
1px
solid
#fff
;
.img
{
.img
{
display
:
block
;
display
:
block
;
border-radius
:
0.05rem
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-color
:
#333333
;
background-color
:
#333333
;
...
@@ -97,10 +98,10 @@ export default {
...
@@ -97,10 +98,10 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
font-size
:
0.13rem
;
font-size
:
0.13rem
;
transform
:
scale
(
0.95
)
translateX
(
-0.02rem
);
color
:
#fff
;
color
:
#fff
;
background
:
linear-gradient
(
180deg
,
rgba
(
0
,
0
,
0
,
.25
)
0%
,
rgba
(
0
,
0
,
0
,
0.01
)
50%
);
background
:
linear-gradient
(
180deg
,
rgba
(
0
,
0
,
0
,
.25
)
0%
,
rgba
(
0
,
0
,
0
,
0.01
)
50%
);
&-text
{
&-text
{
transform
:
scale
(
0.95
)
translateX
(
-0.02rem
);
position
:
absolute
;
position
:
absolute
;
top
:
0.02rem
;
top
:
0.02rem
;
left
:
0.02rem
;
left
:
0.02rem
;
...
@@ -108,6 +109,7 @@ export default {
...
@@ -108,6 +109,7 @@ export default {
}
}
&
.z-active
{
&
.z-active
{
border-color
:
var
(
--main-color
);
border-color
:
var
(
--main-color
);
background
:
var
(
--main-color
);
}
}
}
}
}
}
...
...
components/modules/sendBox/index.vue
View file @
d1e6067f
...
@@ -34,7 +34,9 @@
...
@@ -34,7 +34,9 @@
</div>
</div>
<div
class=
"emoji"
@
click
.
stop=
"_toggleEmoji"
></div>
<div
class=
"emoji"
@
click
.
stop=
"_toggleEmoji"
></div>
<div
class=
"more"
v-if=
"!content.trim()"
@
click
.
stop=
"_toggleMore"
></div>
<div
class=
"more"
v-if=
"!content.trim()"
@
click
.
stop=
"_toggleMore"
></div>
<div
class=
"send"
v-else
@
click
.
stop=
"_sendChat"
>
发送
</div>
<div
class=
"send"
v-else
@
click
.
stop=
"sendCountDown === 0 && _sendChat()"
:class=
"sendCountDown === 0 ? '' : 'unable'"
>
{{
sendCountDown
===
0
?
'发送'
:
`${sendCountDown
}
s`
}}
<
/div
>
<
/div
>
<
/div
>
<
keep
-
alive
>
<
keep
-
alive
>
<
transition
-
group
:
name
=
"showAni ? 'fade' : 'left'"
>
<
transition
-
group
:
name
=
"showAni ? 'fade' : 'left'"
>
...
@@ -75,7 +77,8 @@ export default {
...
@@ -75,7 +77,8 @@ export default {
}
,
}
,
count
:
0
,
count
:
0
,
showAni
:
true
,
showAni
:
true
,
marketSrc
:
''
marketSrc
:
''
,
sendCountDown
:
0
}
;
}
;
}
,
}
,
computed
:
{
computed
:
{
...
@@ -129,6 +132,15 @@ export default {
...
@@ -129,6 +132,15 @@ export default {
this
.
chatReplyObj
=
{
id
:
''
,
name
:
''
}
;
this
.
chatReplyObj
=
{
id
:
''
,
name
:
''
}
;
}
,
}
,
_resetChat
()
{
_resetChat
()
{
clearInterval
(
this
.
sendCountDownTimer
)
this
.
sendCountDown
=
3
this
.
sendCountDownTimer
=
setInterval
(()
=>
{
if
(
this
.
sendCountDown
===
0
)
{
clearInterval
(
this
.
sendCountDownTimer
)
}
else
if
(
this
.
sendCountDown
>
0
)
{
this
.
sendCountDown
--
}
}
,
1000
);
this
.
_remReplay
();
this
.
_remReplay
();
this
.
content
=
''
;
this
.
content
=
''
;
}
,
}
,
...
@@ -376,10 +388,16 @@ export default {
...
@@ -376,10 +388,16 @@ export default {
height
:
0.28
rem
;
height
:
0.28
rem
;
line
-
height
:
0.28
rem
;
line
-
height
:
0.28
rem
;
border
-
radius
:
0.05
rem
;
border
-
radius
:
0.05
rem
;
width
:
.
5
rem
;
text
-
align
:
center
;
background
-
color
:
var
(
--
main
-
color
);
background
-
color
:
var
(
--
main
-
color
);
color
:
var
(
--
sebdBox
-
text
-
color
);
color
:
var
(
--
sebdBox
-
text
-
color
);
font
-
size
:
0.12
rem
;
font
-
size
:
0.12
rem
;
}
}
.
unable
{
color
:
#
fff
;
background
-
color
:
#
999
;
}
}
}
}
}
<
/style
>
<
/style
>
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