Commit 23ff5a11 authored by 水玉婷's avatar 水玉婷
Browse files

feat:修改列表顺序

parent cdb9ca29
...@@ -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',
......
...@@ -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,
})); }));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment