Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
水玉婷
ai-wechat
Commits
23ff5a11
Commit
23ff5a11
authored
Mar 10, 2026
by
水玉婷
Browse files
feat:修改列表顺序
parent
cdb9ca29
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/router/index.js
View file @
23ff5a11
...
@@ -5,15 +5,15 @@ const routes = [
...
@@ -5,15 +5,15 @@ const routes = [
{
{
path
:
'
/
'
,
path
:
'
/
'
,
name
:
'
Home
'
,
name
:
'
Home
'
,
component
:
()
=>
import
(
'
../views/Home.vue
'
),
meta
:
{
requiresAuth
:
true
}
},
{
path
:
'
/history
'
,
name
:
'
History
'
,
component
:
()
=>
import
(
'
../views/History.vue
'
),
component
:
()
=>
import
(
'
../views/History.vue
'
),
meta
:
{
requiresAuth
:
true
}
meta
:
{
requiresAuth
:
true
}
},
},
// {
// path: '/history',
// name: 'History',
// component: () => import('../views/History.vue'),
// meta: { requiresAuth: true }
// },
{
{
path
:
'
/user
'
,
path
:
'
/user
'
,
name
:
'
User
'
,
name
:
'
User
'
,
...
...
src/views/History.vue
View file @
23ff5a11
...
@@ -223,8 +223,7 @@ const getChatRecordList = async (isLoadMore = false) => {
...
@@ -223,8 +223,7 @@ const getChatRecordList = async (isLoadMore = false) => {
if
(
res
.
data
.
code
===
0
)
{
if
(
res
.
data
.
code
===
0
)
{
let
{
data
=
[],
total
=
0
,
totalInfo
=
{}
}
=
res
.
data
.
data
||
[];
let
{
data
=
[],
total
=
0
,
totalInfo
=
{}
}
=
res
.
data
.
data
||
[];
// 反转数据,最新的在前面
const
newData
=
(
data
||
[]).
map
((
item
:
any
)
=>
({
const
newData
=
(
data
.
reverse
()
||
[]).
map
((
item
:
any
)
=>
({
...
item
,
...
item
,
isEdit
:
false
,
isEdit
:
false
,
}));
}));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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