Commit cd93c141 by zhousil

福利宝名称显示

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