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
a33fdcc0
authored
Nov 04, 2021
by
zhousil
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
福利宝客服
parent
5552f710
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
52 deletions
components/message-item/my-welfare-message.vue
components/message-item/purchase-plan-message.vue
components/message-item/question-answer-message.vue
components/message.vue
components/message-item/my-welfare-message.vue
View file @
a33fdcc0
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
@
Component
({
components
:
{}
})
@
Component
({
components
:
{}
})
export
default
class
Index
extends
BaseMessage
{
export
default
class
Index
extends
BaseMessage
{
pr
ivate
readonly
emptyText
=
" "
;
pr
otected
readonly
emptyText
=
" "
;
}
}
</
script
>
</
script
>
...
...
components/message-item/purchase-plan-message.vue
View file @
a33fdcc0
<
template
>
<div
class=
"msg-detail inline-text"
v-html=
"messageBody.msg.text || emptyText"
></div>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
}
from
"vue-property-decorator"
;
import
{
Component
}
from
"vue-property-decorator"
;
import
BaseMessage
from
"./index
"
;
import
MyWelfareMessage
from
"@/customer-service/components/message-item/my-welfare-message.vue
"
;
import
Chat
from
"@/customer-service/xim/index"
;
import
Chat
from
"@/customer-service/xim/index"
;
@
Component
({
components
:
{}
})
@
Component
({
components
:
{}
})
export
default
class
Index
extends
BaseMessage
{
export
default
class
Index
extends
MyWelfareMessage
{
private
readonly
emptyText
=
" "
;
mounted
()
{
mounted
()
{
if
(
Chat
.
isBackend
())
{
if
(
Chat
.
isBackend
())
{
this
.
backEndPlan
();
this
.
backEndPlan
();
...
...
components/message-item/question-answer-message.vue
View file @
a33fdcc0
<
template
>
<div
class=
"msg-detail inline-text"
v-html=
"format2Link(messageBody.msg.text || emptyText)"
></div>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
replaceText2Link
}
from
"@/customer-service/utils"
;
import
xim
from
"@/customer-service/xim"
;
import
{
Component
}
from
"vue-property-decorator"
;
import
{
Component
}
from
"vue-property-decorator"
;
import
BaseMessage
from
"./index
"
;
import
TextMessage
from
"@/customer-service/components/message-item/text-message.vue
"
;
@
Component
({
components
:
{}
})
@
Component
({
components
:
{}
})
export
default
class
Index
extends
BaseMessage
{
export
default
class
Index
extends
TextMessage
{}
private
readonly
emptyText
=
" "
;
private
format2Link
(
text
:
string
)
{
let
t
=
replaceText2Link
(
text
);
const
keywords
=
xim
.
getMatchedTextKeywords
();
for
(
const
item
of
keywords
)
{
const
r
=
new
RegExp
(
item
,
"g"
);
t
=
t
.
replace
(
r
,
`<span class="highlight">
${
item
}
</span>`
);
}
return
t
;
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.content-chat
.chat-room-con
.message-template
.my-message.msg-detail
{
.chat-room-con
.message-template
.my-message.msg-detail
{
background
:
#f5f5f5
!important
;
background-color
:
#f5f5f5
!important
;
&::after
{
&::after
{
border
:
0
;
border
:
0
;
}
}
}
}
.inline-text
{
.inline-text
{
display
:
inline-block
;
display
:
inline-block
;
white-space
:
pre-wrap
;
white-space
:
pre-wrap
;
...
...
components/message.vue
View file @
a33fdcc0
...
@@ -2,10 +2,9 @@
...
@@ -2,10 +2,9 @@
<div
<div
class=
"message-con d-flex align-items-center"
class=
"message-con d-flex align-items-center"
:class=
"
{
:class=
"
{
'my-message flex-row-reverse': isMyMessage,
'my-message flex-row-reverse': isMyMessage
&&
!isQuestionAnswerMessage
,
'justify-content-center': isWithdrawMessage,
'justify-content-center': isWithdrawMessage,
'offset-bottom': matchKeywords,
'offset-bottom': matchKeywords,
'question-answer-message': isQuestionAnswerMessage,
}"
}"
>
>
<div
class=
"msg-content"
:class=
"
{ 'algin-left': !isMyMessage }">
<div
class=
"msg-content"
:class=
"
{ 'algin-left': !isMyMessage }">
...
@@ -466,19 +465,6 @@
...
@@ -466,19 +465,6 @@
word-break
:
break-all
;
word-break
:
break-all
;
}
}
}
}
&
.question-answer-message
{
flex-direction
:
row
;
.msg-content
{
text-align
:
left
;
}
.msg-name
{
margin-left
:
0
!important
;
text-align
:
left
;
}
.content-avatar
{
justify-content
:
flex-start
!important
;
}
}
&
.offset-bottom
{
&
.offset-bottom
{
margin-bottom
:
30px
;
margin-bottom
:
30px
;
}
}
...
...
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