Commit cd93c141 by zhousil

福利宝名称显示

parent bfc192a3
Showing with 20 additions and 2 deletions
...@@ -76,7 +76,12 @@ ...@@ -76,7 +76,12 @@
<span <span
class="withdraw" class="withdraw"
v-if="isMyMessage && canWithdraw && !isWithdrawMessage && !isQuestionAnswerMessage" v-if="
isMyMessage &&
canWithdraw &&
!isWithdrawMessage &&
!isQuestionAnswerMessage
"
@click="withdraw" @click="withdraw"
>撤回此消息</span >撤回此消息</span
> >
...@@ -194,6 +199,9 @@ ...@@ -194,6 +199,9 @@
@chatStore.Action(ChatStore.ACTION_SET_HANDLED) @chatStore.Action(ChatStore.ACTION_SET_HANDLED)
private readonly setHandled!: ChatStore.ACTION_SET_HANDLED; private readonly setHandled!: ChatStore.ACTION_SET_HANDLED;
@chatStore.Getter(ChatStore.GETTER_CURRENT_CURRENT_CHAT)
private readonly currentChat!: ChatStore.GETTER_CURRENT_CURRENT_CHAT;
@Prop({ type: Object, default: () => Object.create(null) }) @Prop({ type: Object, default: () => Object.create(null) })
private readonly data!: dto.Message; private readonly data!: dto.Message;
...@@ -281,12 +289,22 @@ ...@@ -281,12 +289,22 @@
if (this.chatMembers) { if (this.chatMembers) {
const t = this.chatMembers.find((i) => i.eid === this.data.eid); const t = this.chatMembers.find((i) => i.eid === this.data.eid);
if (t) { if (t) {
return t.name; return this.getFilterUsername(t.name);
} }
} }
return ""; return "";
} }
private getFilterUsername(name: string) {
if (
this.currentChat.catalog === "福利宝" &&
this.chatRole === "customer-service"
) {
return `采购顾问 ${name}`;
}
return name;
}
private get avatar() { private get avatar() {
const mapping = getUserMapping(); const mapping = getUserMapping();
......
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