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
41f2cc74
authored
Jan 04, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
延迟撤回时间
parent
c5752ec7
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 @
41f2cc74
...
@@ -34,9 +34,14 @@
...
@@ -34,9 +34,14 @@
<span
<span
@
click=
"openReaderList"
@
click=
"openReaderList"
class=
"pointer"
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
<
template
v-else-if=
"manualReaded || data.read_count"
v-else-if=
"manualReaded || data.read_count"
>
{{
>
{{
...
@@ -173,7 +178,7 @@
...
@@ -173,7 +178,7 @@
import
{
CustomerServiceEvent
,
MessageEvent
}
from
"../event"
;
import
{
CustomerServiceEvent
,
MessageEvent
}
from
"../event"
;
import
{
PayMessageBody
}
from
"../xim/models/chat"
;
import
{
PayMessageBody
}
from
"../xim/models/chat"
;
const
twoMinutes
=
2
*
60
*
1000
;
const
oneDay
=
24
*
60
*
60
*
1000
;
const
messageMapping
=
new
Map
<
dto
.
MessageType
,
string
>
([
const
messageMapping
=
new
Map
<
dto
.
MessageType
,
string
>
([
[
dto
.
MessageType
.
Image
,
"image-message"
],
[
dto
.
MessageType
.
Image
,
"image-message"
],
...
@@ -274,6 +279,14 @@
...
@@ -274,6 +279,14 @@
private
isWithdraw
=
true
;
private
isWithdraw
=
true
;
private
get
isSystemMessage
()
{
return
(
this
.
messageBody
&&
this
.
messageBody
.
eid
&&
+
this
.
messageBody
.
eid
===
0
);
}
private
get
isPayMessage
()
{
private
get
isPayMessage
()
{
return
dto
.
MessageTypeController
.
isPayMessage
(
this
.
data
.
type
);
return
dto
.
MessageTypeController
.
isPayMessage
(
this
.
data
.
type
);
}
}
...
@@ -284,13 +297,16 @@
...
@@ -284,13 +297,16 @@
return
true
;
return
true
;
}
}
if
(
this
.
needReadTip
)
{
if
(
this
.
needReadTip
)
{
return
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
twoMinutes
;
return
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
oneDay
;
}
}
}
}
return
false
;
return
false
;
}
}
private
get
needReadTip
()
{
private
get
needReadTip
()
{
if
(
this
.
isSystemMessage
)
{
return
false
;
}
return
(
return
(
this
.
data
.
type
!==
dto
.
MessageType
.
Pay
&&
this
.
data
.
type
!==
dto
.
MessageType
.
Pay
&&
this
.
data
.
type
!==
dto
.
MessageType
.
Refund
&&
this
.
data
.
type
!==
dto
.
MessageType
.
Refund
&&
...
@@ -557,7 +573,7 @@
...
@@ -557,7 +573,7 @@
return
false
;
return
false
;
}
}
return
(
this
.
isWithdraw
=
return
(
this
.
isWithdraw
=
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
twoMinutes
);
new
Date
().
valueOf
()
-
this
.
data
.
ts
*
1000
<
oneDay
);
}
}
private
openReaderList
(
e
:
MouseEvent
)
{
private
openReaderList
(
e
:
MouseEvent
)
{
...
@@ -719,7 +735,12 @@
...
@@ -719,7 +735,12 @@
}
}
.all
{
.all
{
color
:
#4389f8
;
color
:
#ccc
;
opacity
:
0.7
;
}
.not-all
{
color
:
#077aec
;
}
}
.match-keyword
{
.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