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
80746d20
authored
May 16, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】对话增加排序
parent
c3884c5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/views/ai/chat/Conversation.vue
+9
-3
No files found.
src/views/ai/chat/Conversation.vue
View file @
80746d20
...
@@ -128,14 +128,20 @@ const handleConversationClick = async (id: string) => {
...
@@ -128,14 +128,20 @@ const handleConversationClick = async (id: string) => {
*/
*/
const
getChatConversationList
=
async
()
=>
{
const
getChatConversationList
=
async
()
=>
{
// 1、获取 对话数据
// 1、获取 对话数据
conversationList
.
value
=
await
ChatConversationApi
.
getChatConversationMyList
()
const
res
=
await
ChatConversationApi
.
getChatConversationMyList
()
// 2、没有 任何对话情况
// 2、排序
res
.
sort
((
a
,
b
)
=>
{
console
.
log
(
'sort'
,
a
,
b
)
return
b
.
updateTime
-
a
.
updateTime
})
conversationList
.
value
=
res
// 3、没有 任何对话情况
if
(
conversationList
.
value
.
length
===
0
)
{
if
(
conversationList
.
value
.
length
===
0
)
{
activeConversationId
.
value
=
null
activeConversationId
.
value
=
null
conversationMap
.
value
=
{}
conversationMap
.
value
=
{}
return
return
}
}
//
3
、对话根据时间分组(置顶、今天、一天前、三天前、七天前、30天前)
//
4
、对话根据时间分组(置顶、今天、一天前、三天前、七天前、30天前)
conversationMap
.
value
=
await
conversationTimeGroup
(
conversationList
.
value
)
conversationMap
.
value
=
await
conversationTimeGroup
(
conversationList
.
value
)
}
}
...
...
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