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
Unverified
Commit
1911ed99
authored
Aug 25, 2024
by
芋道源码
Committed by
Gitee
Aug 25, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!527 【功能优化】商城客服聊天相关优化
Merge pull request !527 from 卢越/master
parents
b9970045
075cf0c1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
12 deletions
+36
-12
src/api/mall/promotion/kefu/conversation/index.ts
+1
-1
src/views/mall/promotion/kefu/components/KeFuMessageList.vue
+7
-6
src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue
+1
-0
src/views/mall/promotion/kefu/components/message/OrderItem.vue
+11
-2
src/views/mall/promotion/kefu/components/message/ProductItem.vue
+16
-3
No files found.
src/api/mall/promotion/kefu/conversation/index.ts
View file @
1911ed99
...
@@ -30,6 +30,6 @@ export const KeFuConversationApi = {
...
@@ -30,6 +30,6 @@ export const KeFuConversationApi = {
},
},
// 删除客服会话
// 删除客服会话
deleteConversation
:
async
(
id
:
number
)
=>
{
deleteConversation
:
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/promotion/kefu-conversation/delete?id'
+
id
})
return
await
request
.
delete
({
url
:
`/promotion/kefu-conversation/delete?id=
${
id
}
`
})
}
}
}
}
src/views/mall/promotion/kefu/components/KeFuMessageList.vue
View file @
1911ed99
...
@@ -71,6 +71,7 @@
...
@@ -71,6 +71,7 @@
<MessageItem
:message=
"item"
>
<MessageItem
:message=
"item"
>
<ProductItem
<ProductItem
v-if=
"KeFuMessageContentTypeEnum.PRODUCT === item.contentType"
v-if=
"KeFuMessageContentTypeEnum.PRODUCT === item.contentType"
:spuId=
"getMessageContent(item).spuId"
:picUrl=
"getMessageContent(item).picUrl"
:picUrl=
"getMessageContent(item).picUrl"
:price=
"getMessageContent(item).price"
:price=
"getMessageContent(item).price"
:skuText=
"getMessageContent(item).introduction"
:skuText=
"getMessageContent(item).introduction"
...
@@ -393,7 +394,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
...
@@ -393,7 +394,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
border-left
:
5px
solid
transparent
;
border-left
:
5px
solid
transparent
;
border-bottom
:
5px
solid
transparent
;
border-bottom
:
5px
solid
transparent
;
border-top
:
5px
solid
transparent
;
border-top
:
5px
solid
transparent
;
border-right
:
5px
solid
#ffffff
;
border-right
:
5px
solid
var
(
--app-content-bg-color
)
;
}
}
}
}
}
}
...
@@ -412,7 +413,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
...
@@ -412,7 +413,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
right
:
-19px
;
right
:
-19px
;
top
:
calc
(
50%
-
10px
);
top
:
calc
(
50%
-
10px
);
position
:
absolute
;
position
:
absolute
;
border-left
:
5px
solid
#ffffff
;
border-left
:
5px
solid
var
(
--app-content-bg-color
)
;
border-bottom
:
5px
solid
transparent
;
border-bottom
:
5px
solid
transparent
;
border-top
:
5px
solid
transparent
;
border-top
:
5px
solid
transparent
;
border-right
:
5px
solid
transparent
;
border-right
:
5px
solid
transparent
;
...
@@ -422,9 +423,9 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
...
@@ -422,9 +423,9 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
//
消息气泡
//
消息气泡
.kefu-message
{
.kefu-message
{
color
:
#
333
;
color
:
#
A9A9A9
;
border-radius
:
5px
;
border-radius
:
5px
;
box-shadow
:
3px
5px
15px
rgba
(
0
,
0
,
0
,
0.2
);
box-shadow
:
3px
3px
5px
rgba
(
220
,
220
,
220
,
0.1
);
padding
:
5px
10px
;
padding
:
5px
10px
;
width
:
auto
;
width
:
auto
;
max-width
:
50%
;
max-width
:
50%
;
...
@@ -432,7 +433,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
...
@@ -432,7 +433,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
display
:
inline-block
!important
;
display
:
inline-block
!important
;
position
:
relative
;
position
:
relative
;
word-break
:
break-all
;
word-break
:
break-all
;
background-color
:
#ffffff
;
background-color
:
var
(
--app-content-bg-color
)
;
transition
:
all
0.2s
;
transition
:
all
0.2s
;
&:hover
{
&:hover
{
...
@@ -454,7 +455,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
...
@@ -454,7 +455,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
.chat-tools
{
.chat-tools
{
width
:
100%
;
width
:
100%
;
border
:
#e4e0e0
solid
1px
;
border
:
var
(
--el-border-color
)
solid
1px
;
border-radius
:
10px
;
border-radius
:
10px
;
height
:
44px
;
height
:
44px
;
}
}
...
...
src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue
View file @
1911ed99
<
template
>
<
template
>
<ProductItem
<ProductItem
v-for=
"item in list"
v-for=
"item in list"
:spu-id=
"item.spuId"
:key=
"item.id"
:key=
"item.id"
:picUrl=
"item.picUrl"
:picUrl=
"item.picUrl"
:price=
"item.price"
:price=
"item.price"
...
...
src/views/mall/promotion/kefu/components/message/OrderItem.vue
View file @
1911ed99
<
template
>
<
template
>
<div
v-if=
"isObject(getMessageContent)"
>
<div
v-if=
"isObject(getMessageContent)"
@
click=
"openDetail(getMessageContent.id)"
style=
"cursor: pointer;"
>
<div
:key=
"getMessageContent.id"
class=
"order-list-card-box mt-14px"
>
<div
:key=
"getMessageContent.id"
class=
"order-list-card-box mt-14px"
>
<div
class=
"order-card-header flex items-center justify-between p-x-5px"
>
<div
class=
"order-card-header flex items-center justify-between p-x-5px"
>
<div
class=
"order-no"
>
订单号:
{{
getMessageContent
.
no
}}
</div>
<div
class=
"order-no"
>
订单号:
{{
getMessageContent
.
no
}}
</div>
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
</div>
</div>
<div
v-for=
"item in getMessageContent.items"
:key=
"item.id"
class=
"border-bottom"
>
<div
v-for=
"item in getMessageContent.items"
:key=
"item.id"
class=
"border-bottom"
>
<ProductItem
<ProductItem
:spu-id=
"item.spuId"
:num=
"item.count"
:num=
"item.count"
:picUrl=
"item.picUrl"
:picUrl=
"item.picUrl"
:price=
"item.price"
:price=
"item.price"
...
@@ -36,6 +37,8 @@ import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message'
...
@@ -36,6 +37,8 @@ import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message'
import
{
isObject
}
from
'@/utils/is'
import
{
isObject
}
from
'@/utils/is'
import
ProductItem
from
'@/views/mall/promotion/kefu/components/message/ProductItem.vue'
import
ProductItem
from
'@/views/mall/promotion/kefu/components/message/ProductItem.vue'
const
{
push
}
=
useRouter
()
defineOptions
({
name
:
'OrderItem'
})
defineOptions
({
name
:
'OrderItem'
})
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
message
?:
KeFuMessageRespVO
message
?:
KeFuMessageRespVO
...
@@ -46,6 +49,12 @@ const getMessageContent = computed(() =>
...
@@ -46,6 +49,12 @@ const getMessageContent = computed(() =>
typeof
props
.
message
!==
'undefined'
?
jsonParse
(
props
!
.
message
!
.
content
)
:
props
.
order
typeof
props
.
message
!==
'undefined'
?
jsonParse
(
props
!
.
message
!
.
content
)
:
props
.
order
)
)
/** 查看订单详情 */
const
openDetail
=
(
id
:
number
)
=>
{
console
.
log
(
getMessageContent
)
push
({
name
:
'TradeOrderDetail'
,
params
:
{
id
}
})
}
/**
/**
* 格式化订单状态的颜色
* 格式化订单状态的颜色
*
*
...
@@ -97,7 +106,7 @@ function formatOrderStatus(order: any) {
...
@@ -97,7 +106,7 @@ function formatOrderStatus(order: any) {
.order-list-card-box
{
.order-list-card-box
{
border-radius
:
10px
;
border-radius
:
10px
;
padding
:
10px
;
padding
:
10px
;
border
:
1px
#6a6a6a
solid
;
border
:
1px
var
(
--el-border-color
)
solid
;
background-color
:
var
(
--app-content-bg-color
);
background-color
:
var
(
--app-content-bg-color
);
.order-card-header
{
.order-card-header
{
...
...
src/views/mall/promotion/kefu/components/message/ProductItem.vue
View file @
1911ed99
<
template
>
<
template
>
<div>
<div
@
click
.
stop=
"openDetail(props.spuId)"
style=
"cursor: pointer;"
>
<div>
<div>
<slot
name=
"top"
></slot>
<slot
name=
"top"
></slot>
</div>
</div>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
class=
"order-img"
class=
"order-img"
fit=
"contain"
fit=
"contain"
preview-teleported
preview-teleported
@
click
.
stop
/>
/>
</div>
</div>
<div
<div
...
@@ -53,8 +54,14 @@
...
@@ -53,8 +54,14 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
fenToYuan
}
from
'@/utils'
import
{
fenToYuan
}
from
'@/utils'
const
{
push
}
=
useRouter
()
defineOptions
({
name
:
'ProductItem'
})
defineOptions
({
name
:
'ProductItem'
})
const
props
=
defineProps
({
const
props
=
defineProps
({
spuId
:
{
type
:
Number
,
default
:
0
},
picUrl
:
{
picUrl
:
{
type
:
String
,
type
:
String
,
default
:
'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto'
default
:
'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto'
...
@@ -107,13 +114,19 @@ const skuString = computed(() => {
...
@@ -107,13 +114,19 @@ const skuString = computed(() => {
}
}
return
props
.
skuText
return
props
.
skuText
})
})
/** 查看商品详情 */
const
openDetail
=
(
spuId
:
number
)
=>
{
console
.
log
(
props
.
spuId
)
push
({
name
:
'ProductSpuDetail'
,
params
:
{
id
:
spuId
}
})
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.ss-order-card-warp
{
.ss-order-card-warp
{
padding
:
20px
;
padding
:
20px
;
border-radius
:
10px
;
border-radius
:
10px
;
border
:
1px
#6a6a6a
solid
;
border
:
1px
var
(
--el-border-color
)
solid
;
background-color
:
var
(
--app-content-bg-color
);
background-color
:
var
(
--app-content-bg-color
);
.img-box
{
.img-box
{
...
@@ -134,7 +147,7 @@ const skuString = computed(() => {
...
@@ -134,7 +147,7 @@ const skuString = computed(() => {
.tool-box
{
.tool-box
{
position
:
absolute
;
position
:
absolute
;
right
:
0
px
;
right
:
0
;
bottom
:
-10px
;
bottom
:
-10px
;
}
}
}
}
...
...
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