diff --git a/mock/blog.ts b/mock/blog.ts index 7cb2919..9a64a99 100644 --- a/mock/blog.ts +++ b/mock/blog.ts @@ -74,4 +74,13 @@ export default [ } }, }, + { + url: '/wiki/api/v1/author/blogs/count', + method: 'GET', + response: () => { + return { + count: 101, + } + }, + }, ] as MockMethod[] diff --git a/mock/bookmark.ts b/mock/bookmark.ts new file mode 100644 index 0000000..ded3879 --- /dev/null +++ b/mock/bookmark.ts @@ -0,0 +1,13 @@ +import { MockMethod } from 'vite-plugin-mock' + +export default [ + { + url: '/bookmark/api/v1/bookmark/count', + method: 'get', + response: () => { + return { + count: 53, + } + } + } +] as MockMethod[] diff --git a/src/api/blog.ts b/src/api/blog.ts index 65dcd41..d024b01 100644 --- a/src/api/blog.ts +++ b/src/api/blog.ts @@ -92,5 +92,24 @@ const sortBlogs = (data: Object, btId: string) => { }) } +const countBlogs = () => { + return service({ + url: '/wiki/api/v1/author/blogs/count', + method: 'GET', + headers: headers, + }) +} -export { listAll, updateBtName, putBlogType, removeBlogType, sortBlogTypes, getContent, putBlog, updateContent, deleteContent, sortBlogs } \ No newline at end of file +export { + listAll, + updateBtName, + putBlogType, + removeBlogType, + sortBlogTypes, + getContent, + putBlog, + updateContent, + deleteContent, + sortBlogs, + countBlogs +} \ No newline at end of file diff --git a/src/api/bookmark.ts b/src/api/bookmark.ts index 41794eb..2f5cf50 100644 --- a/src/api/bookmark.ts +++ b/src/api/bookmark.ts @@ -49,10 +49,18 @@ const delete_bookmarks = (params: Object) => { }) } +const bookmarks_count = () => { + return service({ + url: '/wiki/api/v1/author/blogs/count', + method: 'GET', + }) +} + export { search_bookmark, put_bookmark, delete_bookmark, delete_bookmarks, - update_bookmark + update_bookmark, + bookmarks_count } diff --git a/src/assets/dashboard.png b/src/assets/dashboard.png new file mode 100644 index 0000000..64981d0 Binary files /dev/null and b/src/assets/dashboard.png differ diff --git a/src/components/layout/NavBar.vue b/src/components/layout/NavBar.vue index 3b8f3ab..865b987 100644 --- a/src/components/layout/NavBar.vue +++ b/src/components/layout/NavBar.vue @@ -52,54 +52,12 @@ - \ No newline at end of file diff --git a/src/view/dashboard/dashboardTable/index.vue b/src/view/dashboard/dashboardTable/index.vue new file mode 100644 index 0000000..3be86af --- /dev/null +++ b/src/view/dashboard/dashboardTable/index.vue @@ -0,0 +1,122 @@ + + + + 更新日志 + + + + + {{ key+ 1 }} + + {{ item.message }} + {{ item.from }} + + + + + + + + \ No newline at end of file diff --git a/src/view/dashboard/index.vue b/src/view/dashboard/index.vue index 55531ec..1226716 100644 --- a/src/view/dashboard/index.vue +++ b/src/view/dashboard/index.vue @@ -1,15 +1,392 @@ - + + + + + 早安,管理员,请开始一天的工作吧 + {{ weatherInfo }} + + + + + + + + wiki数量 ({{ statistics.wiki_count }}) + + + + + + + + bookmark数量 ({{ statistics.bookmark_count }}) + + + + + + + + {{ time }} + + + + + 期货交易时间  + + +   9:00-11:30   + + +   13:30-15:00   + + +   21:00-23:00 + + + + + + + + + + + 快捷入口 + + + + + + + + + + + {{ card.label }} + + + + + + + + + + 数据统计 + + + + + + + + + + + + + + - \ No newline at end of file
{{ card.label }}