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
ddbd13c0
authored
Nov 03, 2021
by
zhousil
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
福利宝客服
parent
ae024595
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
129 additions
and
7 deletions
components/controller/index.ts
components/css/benefits-plan.less
components/message-item/my-welfare-message.vue
components/message-item/purchase-plan-message.vue
components/message.vue
model/index.ts
components/controller/index.ts
View file @
ddbd13c0
...
@@ -16,5 +16,11 @@ export function parserMessage(type: string, rawMsg: string) {
...
@@ -16,5 +16,11 @@ export function parserMessage(type: string, rawMsg: string) {
if
(
type
===
MessageType
.
Withdraw
)
{
if
(
type
===
MessageType
.
Withdraw
)
{
return
`[撤回了一条消息]`
;
return
`[撤回了一条消息]`
;
}
}
if
(
type
===
MessageType
.
MyPurchasePlan
)
{
return
`[我的采购计划]`
;
}
if
(
type
===
MessageType
.
MyWelfare
)
{
return
`[我的福利]`
;
}
return
`[系统自动回复]`
;
return
`[系统自动回复]`
;
}
}
components/css/benefits-plan.less
View file @
ddbd13c0
/deep/.benefits-plan-message, /deep/.benefits-welfare-message{
/deep/.benefits-plan-message,
/deep/.benefits-welfare-message {
white-space: normal;
white-space: normal;
.my-plan,.my-welfare{
.my-plan,
color: #E84929;
.my-welfare {
color: #e84929;
margin-bottom: 10px;
margin-bottom: 10px;
}
}
.item-title{
}
cursor: pointer;
/deep/.benefits-plan-message {
.plan-title-wrap {
display: flex;
justify-content: space-between;
margin-bottom: 4px;
.total-price {
color: #e84929;
}
.item-title {
max-width: 185px;
color: #373737;
font-size: 14px;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-decoration: underline;
margin-right: 8px;
cursor: pointer;
}
}
.prodoct-item {
display: flex;
padding: 16px 0;
&:not(:last-child) {
border-bottom: 1px dashed #ededed;
}
img {
width: 50px;
height: 50px;
margin-right: 10px;
}
.product-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
flex: 1;
.product-name {
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.price-nums{
display: flex;
justify-content: space-between;
}
}
}
}
/deep/.benefits-welfare-message {
.item-title {
font-weight: bold;
margin-bottom: 10px;
text-decoration: underline;
text-decoration: underline;
cursor: pointer;
}
}
}
}
\ No newline at end of file
components/message-item/my-welfare-message.vue
0 → 100644
View file @
ddbd13c0
<
template
>
<div
class=
"msg-detail inline-text"
v-html=
"messageBody.msg.text || emptyText"
></div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
}
from
"vue-property-decorator"
;
import
BaseMessage
from
"./index"
;
@
Component
({
components
:
{}
})
export
default
class
Index
extends
BaseMessage
{
private
readonly
emptyText
=
" "
;
}
</
script
>
<
style
lang=
"less"
scoped
>
.inline-text
{
display
:
inline-block
;
white-space
:
pre-wrap
;
text-align
:
left
;
}
</
style
>
\ No newline at end of file
components/message-item/purchase-plan-message.vue
0 → 100644
View file @
ddbd13c0
<
template
>
<div
class=
"msg-detail inline-text"
v-html=
"messageBody.msg.text || emptyText"
></div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
}
from
"vue-property-decorator"
;
import
BaseMessage
from
"./index"
;
@
Component
({
components
:
{}
})
export
default
class
Index
extends
BaseMessage
{
private
readonly
emptyText
=
" "
;
}
</
script
>
<
style
lang=
"less"
scoped
>
.inline-text
{
display
:
inline-block
;
white-space
:
pre-wrap
;
text-align
:
left
;
}
</
style
>
\ No newline at end of file
components/message.vue
View file @
ddbd13c0
...
@@ -134,6 +134,8 @@
...
@@ -134,6 +134,8 @@
import
VideoMessage
from
"./message-item/video-message.vue"
;
import
VideoMessage
from
"./message-item/video-message.vue"
;
import
TextMessage
from
"./message-item/text-message.vue"
;
import
TextMessage
from
"./message-item/text-message.vue"
;
import
WithdrawMessage
from
"./message-item/withdraw-message.vue"
;
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
xim
from
"./../xim"
;
import
xim
from
"./../xim"
;
const
twoMinutes
=
2
*
60
*
1000
;
const
twoMinutes
=
2
*
60
*
1000
;
...
@@ -146,6 +148,8 @@
...
@@ -146,6 +148,8 @@
[
dto
.
MessageType
.
Text
,
"text-message"
],
[
dto
.
MessageType
.
Text
,
"text-message"
],
[
dto
.
MessageType
.
Withdraw
,
"withdraw-message"
],
[
dto
.
MessageType
.
Withdraw
,
"withdraw-message"
],
[
dto
.
MessageType
.
GeneralOrderMsg
,
"text-message"
],
[
dto
.
MessageType
.
GeneralOrderMsg
,
"text-message"
],
[
dto
.
MessageType
.
MyPurchasePlan
,
"purchase-plan-message"
],
[
dto
.
MessageType
.
MyWelfare
,
"my-welfare-message"
],
]);
]);
@
Component
({
@
Component
({
...
@@ -158,6 +162,8 @@
...
@@ -158,6 +162,8 @@
VideoMessage
,
VideoMessage
,
TextMessage
,
TextMessage
,
WithdrawMessage
,
WithdrawMessage
,
PurchasePlanMessage
,
MyWelfareMessage
},
},
})
})
export
default
class
Message
extends
Vue
{
export
default
class
Message
extends
Vue
{
...
...
model/index.ts
View file @
ddbd13c0
...
@@ -98,6 +98,8 @@ export const enum MessageType {
...
@@ -98,6 +98,8 @@ export const enum MessageType {
Voice
=
"voice"
,
Voice
=
"voice"
,
GeneralOrderMsg
=
"general_order_msg"
,
GeneralOrderMsg
=
"general_order_msg"
,
Withdraw
=
"withdraw"
,
Withdraw
=
"withdraw"
,
MyPurchasePlan
=
"my_purchase_plan"
,
MyWelfare
=
"my_welfare"
,
}
}
export
const
enum
MessageHandled
{
export
const
enum
MessageHandled
{
...
...
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