Commit 26880254 by zhousil

福利宝客服

parent d5023b9a
......@@ -22,5 +22,8 @@ export function parserMessage(type: string, rawMsg: string) {
if (type === MessageType.MyWelfare) {
return `[我的福利]`;
}
if (type === MessageType.QuestionAnswer) {
return `[问答]`;
}
return `[系统自动回复]`;
}
......@@ -32,7 +32,7 @@
}
}
.prodoct-item {
.product-item {
display: flex;
padding: 16px 0;
&:not(:last-child) {
......
......@@ -22,13 +22,16 @@
"plan-welfare-title"
) as any;
if (productTitleDom) {
// 遍历注册点击事件
productTitleDom.forEach((item: HTMLElement) => {
item.onclick = (e: any) => {
window.open(
window.location.host +
`/统一业务平台.福利宝管理.采购管理/detail/w_plan/key/${e.target.id}`,
"_blank"
);
// 我的福利在后台没找到位置
if (e.target.attributes["data-type"].value === "plan") {
window.open(
`/福利宝.福利宝管理端.采购管理/detail/w_plan/key/${e.target.attributes["data-id"].value}`,
"_blank"
);
}
};
});
}
......
......@@ -5,7 +5,7 @@
'my-message flex-row-reverse': isMyMessage,
'justify-content-center': isWithdrawMessage,
'offset-bottom': matchKeywords,
'system-message': isSystemMessage,
'question-answer-message': isQuestionAnswerMessage,
}"
>
<div class="msg-content" :class="{ 'algin-left': !isMyMessage }">
......@@ -14,23 +14,15 @@
:class="{ 'algin-left': !isMyMessage }"
v-if="!isWithdrawMessage"
>
{{ isSystemMessage ? "系统消息" : userName }}
{{ isQuestionAnswerMessage ? "" : userName }}
</div>
<div
class="content-avatar d-flex align-items-start"
:class="{ 'justify-content-end': isMyMessage,'cs-flex-direction': chatRole!=='default' }"
:class="{
'justify-content-end': isMyMessage,
'cs-flex-direction': chatRole !== 'default',
}"
>
<!-- <img
src="../imgs/default-host-avatar.svg"
style="width: 42px"
v-if="
messageComponent &&
!chatRole &&
!isWithdrawMessage &&
!isSystemMessage
"
class="host-avatar"
/> -->
<component
:is="messageComponent"
:user-name="userName"
......@@ -42,7 +34,7 @@
@open="openFile"
/>
<avatar
v-if="avatar && !isSystemMessage"
v-if="(avatar || showHostAvatar) && !isQuestionAnswerMessage && !isWithdrawMessage"
:src="
chatRole === 'default'
? avatar
......@@ -145,7 +137,7 @@
import WithdrawMessage from "./message-item/withdraw-message.vue";
import PurchasePlanMessage from "./message-item/purchase-plan-message.vue";
import MyWelfareMessage from "./message-item/my-welfare-message.vue";
import SystemMessage from "./message-item/system-message.vue";
import QuestionAnswerMessage from "./message-item/question-answer-message.vue";
import xim from "./../xim";
import { ChatRole } from "@/customer-service/model";
......@@ -161,7 +153,7 @@
[dto.MessageType.GeneralOrderMsg, "text-message"],
[dto.MessageType.MyPurchasePlan, "purchase-plan-message"],
[dto.MessageType.MyWelfare, "my-welfare-message"],
[dto.MessageType.System, "system-message"],
[dto.MessageType.QuestionAnswer, "question-answer-message"],
]);
@Component({
......@@ -176,7 +168,7 @@
WithdrawMessage,
PurchasePlanMessage,
MyWelfareMessage,
SystemMessage,
QuestionAnswerMessage,
},
})
export default class Message extends Vue {
......@@ -235,8 +227,8 @@
return this.data.type === dto.MessageType.Withdraw;
}
private get isSystemMessage() {
return this.data.type === dto.MessageType.System;
private get isQuestionAnswerMessage() {
return this.data.type === dto.MessageType.QuestionAnswer;
}
private get isAllRead() {
......@@ -294,13 +286,12 @@
private get avatar() {
const avatar = chat.getUserMapping();
if (Object.getOwnPropertyNames(avatar).length > 0) {
this.showHostAvatar = true;
} else {
this.showHostAvatar = false;
}
if (Object.getOwnPropertyNames(avatar).length > 0) {
this.showHostAvatar = true;
} else {
this.showHostAvatar = false;
}
if (this.isSendingMessage) {
if (avatar && this.chatMyId) {
const user = avatar[this.chatMyId];
if (user && user.avatar) {
......@@ -475,7 +466,7 @@
word-break: break-all;
}
}
&.system-message {
&.question-answer-message {
flex-direction: row;
.msg-content {
text-align: left;
......
......@@ -100,7 +100,7 @@ export const enum MessageType {
Withdraw = "withdraw",
MyPurchasePlan = "my_purchase_plan",
MyWelfare = "my_welfare",
System ="system"
QuestionAnswer ="question_answer"
}
export const enum MessageHandled {
......
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