Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3d5cb15e
authored
Jul 01, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】:mall 客服消息样式设计
parent
7a6f5c2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
155 additions
and
16 deletions
+155
-16
src/views/mall/promotion/kefu/components/KeFuChatBox.vue
+155
-16
No files found.
src/views/mall/promotion/kefu/components/KeFuChatBox.vue
View file @
3d5cb15e
...
...
@@ -63,7 +63,7 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
KeFuMessage
Api
,
KeFuMessage
RespVO
}
from
'@/api/mall/promotion/kefu/message'
import
{
KeFuMessageRespVO
}
from
'@/api/mall/promotion/kefu/message'
import
{
KeFuConversationRespVO
}
from
'@/api/mall/promotion/kefu/conversation'
import
{
UserTypeEnum
}
from
'@/utils/constants'
import
{
replaceEmoji
}
from
'@/views/mall/promotion/kefu/components/emoji'
...
...
@@ -77,10 +77,143 @@ const keFuConversation = ref<KeFuConversationRespVO>({} as KeFuConversationRespV
// 获得消息
const
getMessageList
=
async
(
conversation
:
KeFuConversationRespVO
)
=>
{
keFuConversation
.
value
=
conversation
const
{
list
}
=
await
KeFuMessageApi
.
getKeFuMessagePage
({
pageNo
:
1
,
conversationId
:
conversation
.
id
})
// const { list } = await KeFuMessageApi.getKeFuMessagePage({
// pageNo: 1,
// conversationId: conversation.id
// })
// TODO puhui999: 方便查看效果
const
list
=
[
{
id
:
19
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
2
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[爱心][爱心][坏笑][坏笑][天使][天使]'
,
readStatus
:
false
,
createTime
:
1718616705000
},
{
id
:
18
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
1
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[瞌睡][瞌睡]'
,
readStatus
:
false
,
createTime
:
1718616690000
},
{
id
:
17
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
1
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[冷酷][冷酷]'
,
readStatus
:
false
,
createTime
:
1718616350000
},
{
id
:
16
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
1
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[天使]'
,
readStatus
:
false
,
createTime
:
1718615505000
},
{
id
:
15
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
2
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[天使]'
,
readStatus
:
false
,
createTime
:
1718615485000
},
{
id
:
14
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
2
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[心碎][心碎]'
,
readStatus
:
false
,
createTime
:
1718615453000
},
{
id
:
13
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
2
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[心碎][心碎]'
,
readStatus
:
false
,
createTime
:
1718615430000
},
{
id
:
12
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
1
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[心碎][心碎]'
,
readStatus
:
false
,
createTime
:
1718615425000
},
{
id
:
11
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
1
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[困~][困~]'
,
readStatus
:
false
,
createTime
:
1718615413000
},
{
id
:
10
,
conversationId
:
1
,
senderId
:
283
,
senderAvatar
:
null
,
senderType
:
1
,
receiverId
:
null
,
receiverType
:
null
,
contentType
:
1
,
content
:
'[睡着][睡着]'
,
readStatus
:
false
,
createTime
:
1718615407000
}
]
messageList
.
value
=
list
}
defineExpose
({
getMessageList
})
...
...
@@ -122,20 +255,26 @@ const showChatBox = computed(() => !isEmpty(keFuConversation.value))
.ss-row-right
{
justify-content
:
flex-end
;
.
kefu-message
::
after
{
content
:
''
;
width
:
10px
;
height
:
10px
;
right
:
-19px
;
top
:
calc
(
50%
-
10px
);
position
:
absolute
;
border-left
:
5px
solid
#ffffff
;
border-bottom
:
5px
solid
transparent
;
border-top
:
5px
solid
transparent
;
border-right
:
5px
solid
transparent
;
.kefu-message
{
margin-right
:
20px
;
position
:
relative
;
&::after
{
content
:
''
;
width
:
10px
;
height
:
10px
;
right
:
-19px
;
top
:
calc
(
50%
-
10px
);
position
:
absolute
;
border-left
:
5px
solid
#ffffff
;
border-bottom
:
5px
solid
transparent
;
border-top
:
5px
solid
transparent
;
border-right
:
5px
solid
transparent
;
}
}
}
//
消息气泡
.kefu-message
{
color
:
#333
;
border-radius
:
5px
;
...
...
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