Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
674789ad
Commit
674789ad
authored
Apr 15, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 21402】 feat: 完成关于私信相关的内容
parent
deea553b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
126 additions
and
5 deletions
+126
-5
index.ts
src/api/index.ts
+2
-0
index.ts
src/api/selfMessage/index.ts
+39
-0
types.ts
src/api/selfMessage/types.ts
+80
-0
index.vue
src/components/common/Comment/index.vue
+1
-1
index.vue
src/views/selfMessage/index.vue
+0
-0
index.vue
src/views/userPage/index.vue
+4
-4
No files found.
src/api/index.ts
View file @
674789ad
...
...
@@ -15,6 +15,7 @@ export * from './otherUserPage'
export
*
from
'./auction'
export
*
from
'./dailyLottery'
export
*
from
'./launchCampaign'
export
*
from
'./selfMessage'
// 导出类型
export
*
from
'./task/types'
export
*
from
'./shop/types'
...
...
@@ -32,3 +33,4 @@ export * from './otherUserPage/types'
export
*
from
'./auction/types'
export
*
from
'./dailyLottery/types'
export
*
from
'./launchCampaign/types'
export
*
from
'./selfMessage/types'
src/api/selfMessage/index.ts
0 → 100644
View file @
674789ad
import
service
from
'@/utils/request/index'
import
type
{
SendMessageDto
,
GetMessageListDto
,
ConversationResponseDto
,
GetMessageDetailListDto
,
MessageDetailListItem
,
}
from
'./types'
// 关于私信的相关接口
/**
* 给用户发表私信
*/
export
const
sendMessage
=
(
data
:
SendMessageDto
)
=>
{
return
service
.
request
({
url
:
'/api/cultureDialog/sendDialogMessage'
,
method
:
'POST'
,
data
,
})
}
// 获取私信列表
export
const
getMessageList
=
(
data
:
GetMessageListDto
)
=>
{
return
service
.
request
<
ConversationResponseDto
>
({
url
:
'/api/cultureDialog/getDialogList'
,
method
:
'POST'
,
data
,
})
}
// 查看某个私信详情
export
const
getMessageDetailList
=
(
data
:
GetMessageDetailListDto
)
=>
{
return
service
.
request
<
MessageDetailListItem
[]
>
({
url
:
`/api/cultureDialog/getDialogMessageList`
,
method
:
'POST'
,
data
,
})
}
src/api/selfMessage/types.ts
0 → 100644
View file @
674789ad
import
{
BooleanFlag
}
from
'@/constants'
/**
* 发送私信的参数
*/
export
interface
SendMessageDto
{
content
:
string
chatType
:
BooleanFlag
// 0 实名 1 匿名
senderId
:
string
receiverId
:
string
images
:
string
}
/**
* 获取私信列表的参数
*/
export
interface
GetMessageListDto
{
chatType
?:
BooleanFlag
search
?:
string
}
/**
* 获取私信列表的响应
*/
export
interface
ConversationResponseDto
{
anonymousUnreadCount
:
number
realUnreadCount
:
number
totalUnreadCount
:
number
dialogList
:
ConversationItem
[]
}
export
interface
ConversationItem
{
chat_type
:
string
chat_type_desc
:
string
had_read
:
number
id
:
number
is_self_last_msg
:
boolean
last_message
:
string
last_message_prefix
:
string
last_sender_name
:
string
last_time
:
string
last_time_str
:
string
last_user_id
:
string
other_user_account
:
string
other_user_avatar
:
string
other_user_id
:
string
other_user_name
:
string
status
:
number
un_read_count
:
number
}
/**
* 获取私信详情的列表参数
*/
export
interface
GetMessageDetailListDto
{
receiverId
:
string
dialogId
:
number
chatType
:
BooleanFlag
}
/**
* 获取私信详情的列表响应
*/
export
interface
MessageDetailListItem
{
images
:
string
relation_status
:
number
create_time
:
string
receiver_id
:
string
message_id
:
number
sender_name
:
string
sender_avatar
:
string
content
:
string
sender_id
:
string
relation_id
:
number
create_time_str
:
string
is_anonymous
:
boolean
dialog_id
:
number
is_self
:
boolean
image_list
:
string
[]
}
src/components/common/Comment/index.vue
View file @
674789ad
<
template
>
<div
ref=
"commentRef"
class=
"bg-white rounded-3 shadow-sm border border-gray-100
overflow-hidden
"
>
<div
ref=
"commentRef"
class=
"bg-white rounded-3 shadow-sm border border-gray-100"
>
<!-- 评论筛选 -->
<div
class=
"p-4 border-b border-gray-100"
>
<div
class=
"flex items-center gap-4 justify-between"
>
...
...
src/views/selfMessage/index.vue
View file @
674789ad
This diff is collapsed.
Click to expand it.
src/views/userPage/index.vue
View file @
674789ad
...
...
@@ -99,7 +99,7 @@
<div
class=
"bg-white rounded-lg shadow-sm mb-4"
>
<div
v-for=
"item in menuUserItems"
:key=
"item.
path
"
:key=
"item.
tab
"
@
click=
"changeMenu(item.path)"
:class=
"[
'flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors border-b border-gray-100 last:border-b-0',
...
...
@@ -202,7 +202,7 @@ const { userInfo } = storeToRefs(userStore)
// 左侧普通用户菜单
const
menuUserItems
=
[
{
path
:
'/selfMessage'
,
path
:
()
=>
`/selfMessage?isReal=
${
isReal
.
value
}
`
,
label
:
'我的私信'
,
icon
:
()
=>
<
IEpMessage
/>
,
tab
:
'我的私信'
,
...
...
@@ -302,8 +302,8 @@ const currentUserInfo = computed(() =>
},
)
const
changeMenu
=
(
key
:
string
)
=>
{
router
.
push
(
key
)
const
changeMenu
=
(
key
:
string
|
(()
=>
string
)
)
=>
{
router
.
push
(
typeof
key
===
'function'
?
key
()
:
key
)
}
const
handleEdit
=
()
=>
{
...
...
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