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);