Commit 6babc727 by Sixong.Zhu

Merge branch 'master' into pre

parents c8a16e15 41f2cc74
Showing with 27 additions and 6 deletions
...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment