From 46885b29cd047751eea69343703568b018dbec81 Mon Sep 17 00:00:00 2001 From: fofolee Date: Sun, 1 May 2022 10:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ShareCenterPage.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/ShareCenterPage.vue b/src/pages/ShareCenterPage.vue index ec3244c..63dae04 100644 --- a/src/pages/ShareCenterPage.vue +++ b/src/pages/ShareCenterPage.vue @@ -38,7 +38,9 @@ >{{ commands[count - 1]?.authorName }} {{ commands[count - 1]?.updateTime }}{{ + commands[count - 1]?.updateTime.slice(0, 10) + }} { - this.initCommands = res.data.data; + this.initCommands = res.data.data.sort( + (x, y) => y.updated_at - x.updated_at + ); this.matchedCommands = _.cloneDeep(this.initCommands); this.fetchCommandDetails(1); }); @@ -167,7 +171,7 @@ export default { .forEach((item) => { this.getCommand( item.slug, - item.content_updated_at.slice(0, 10), + item.content_updated_at, item.last_editor.name ).then((command) => { this.commands.push(command);