Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6babc727
authored
Jan 04, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into pre
parents
c8a16e15
41f2cc74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
components/message.vue
components/message.vue
View file @
6babc727
...
...
@@ -34,9 +34,14 @@
<span
@
click=
"openReaderList"
class=
"pointer"
:class=
"
{ all: isAllRead }
"
:class=
"
isAllRead ? 'all' : 'not-all'
"
>
<template
v-if=
"isAllRead"
>
全部已读
</
template
>
<template
v-if=
"isAllRead"
>
<i
class=
"el-icon-circle-check"
title=
"全部已读"
></i>
</
template
>
<
template
v-else-if=
"manualReaded || data.read_count"
>
{{
...
...
@@ -173,7 +178,7 @@
import
{
CustomerServiceEvent
,
MessageEvent
}
from
"../event"
;
import
{
PayMessageBody
}
from
"../xim/models/chat"
;
const
twoMinutes
=
2
*
60
*
1000
;
const
oneDay
=
24
*
60
*
60
*
1000
;
const
messageMapping
=
new
Map
<
dto
.
MessageType
,
string
>
([
[
dto
.
MessageType
.
Image
,
"image-message"
],
...
...
@@ -274,6 +279,14 @@
private
isWithdraw
=
true
;
private
get
isSystemMessage
()
{
return
(
this
.
messageBody
&&
this
.
messageBody
.
eid
&&
+
this
.
messageBody
.
eid
===
0
);
}
private
get
isPayMessage
()
{
return
dto
.
MessageTypeController
.
isPayMessage
(
this
.
data
.
type
);
}
...
...
@@ -284,13 +297,16 @@
return
true
;
}
if
(
this
.
needReadTip
)
{
return
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
twoMinutes
;
return
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
oneDay
;
}
}
return
false
;
}
private
get
needReadTip
()
{
if
(
this
.
isSystemMessage
)
{
return
false
;
}
return
(
this
.
data
.
type
!==
dto
.
MessageType
.
Pay
&&
this
.
data
.
type
!==
dto
.
MessageType
.
Refund
&&
...
...
@@ -557,7 +573,7 @@
return
false
;
}
return
(
this
.
isWithdraw
=
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
twoMinutes
);
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
oneDay
);
}
private
openReaderList
(
e
:
MouseEvent
)
{
...
...
@@ -719,7 +735,12 @@
}
.all
{
color
:
#4389f8
;
color
:
#ccc
;
opacity
:
0.7
;
}
.not-all
{
color
:
#077aec
;
}
.match-keyword
{
...
...
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