diff --git a/cwd-comments-admin/src/api/admin.ts b/cwd-comments-admin/src/api/admin.ts index 7a4ff63..5ea7962 100644 --- a/cwd-comments-admin/src/api/admin.ts +++ b/cwd-comments-admin/src/api/admin.ts @@ -124,3 +124,8 @@ export function saveCommentSettings(data: { }): Promise<{ message: string }> { return put<{ message: string }>('/admin/settings/comments', data); } + +export function exportComments(): Promise { + return get('/admin/comments/export'); +} + diff --git a/cwd-comments-admin/src/router/index.ts b/cwd-comments-admin/src/router/index.ts index 51d5c50..55c5e4b 100644 --- a/cwd-comments-admin/src/router/index.ts +++ b/cwd-comments-admin/src/router/index.ts @@ -3,6 +3,7 @@ import LoginView from '../views/LoginView.vue'; import LayoutView from '../views/LayoutView.vue'; import CommentsView from '../views/CommentsView.vue'; import SettingsView from '../views/SettingsView.vue'; +import DataView from '../views/DataView.vue'; const routes: RouteRecordRaw[] = [ { @@ -27,6 +28,11 @@ const routes: RouteRecordRaw[] = [ path: 'settings', name: 'settings', component: SettingsView + }, + { + path: 'data', + name: 'data', + component: DataView } ] } diff --git a/cwd-comments-admin/src/views/DataView.vue b/cwd-comments-admin/src/views/DataView.vue new file mode 100644 index 0000000..db5811c --- /dev/null +++ b/cwd-comments-admin/src/views/DataView.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/cwd-comments-admin/src/views/LayoutView.vue b/cwd-comments-admin/src/views/LayoutView.vue index a057248..a87126c 100644 --- a/cwd-comments-admin/src/views/LayoutView.vue +++ b/cwd-comments-admin/src/views/LayoutView.vue @@ -30,6 +30,13 @@ > 评论管理 +