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
fab51b8b
authored
Jan 04, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://gitlab.corp.qinqinxiaobao.com:9880/uniplat/customer-service
parents
37d6939d
41f2cc74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
components/message.vue
components/message.vue
View file @
fab51b8b
...
...
@@ -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
&&
...
...
@@ -561,7 +577,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
)
{
...
...
@@ -723,7 +739,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