diff --git a/mock/cloud.ts b/mock/cloud.ts deleted file mode 100644 index f9c8f49..0000000 --- a/mock/cloud.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { MockMethod } from 'vite-plugin-mock' - -export default [ - { - url: '/cloud/api/v1/file/list', - method: 'get', - response: ({ body, query }) => { - return [ - { - server_filename: "java实战.pdf", - path: "/", - isDir: 0, - size: 1000 - }, - { - server_filename: "天道.pdf", - path: "/", - isDir: 0, - size: 1000 - }, - { - server_filename: "我得音乐", - path: "/", - isDir: 1, - size: 10001 - - }, - ] - } - }, -] as MockMethod[] diff --git a/src/api/calendar.ts b/src/api/calendar.ts index 8c3fe17..d047529 100644 --- a/src/api/calendar.ts +++ b/src/api/calendar.ts @@ -16,10 +16,21 @@ const post_event = (data: { }) } -const get_event = () => { +/** + * 查询事件(按月份 + 分页) + * @param params.month yyyy-MM(必填,null 时后端默认当前月) + * @param params.page 页码(从 1 开始,默认 1) + * @param params.pageSize 每页大小(默认 10,上限 100) + */ +const get_event = (params?: { + month?: string + page?: number + pageSize?: number +}) => { return service({ url: '/calendar/api/v1/events', - method: 'GET' + method: 'GET', + params }) } diff --git a/src/api/cloud.ts b/src/api/cloud.ts deleted file mode 100644 index 6a20f55..0000000 --- a/src/api/cloud.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { service } from '../utils/request' - -const headers = { - 'Content-Type': 'application/json;charsetset=UTF-8' -} - -const getFileList = (url: string) => { - return service({ - url: '/cloud/api/v1/file/list', - method: 'GET', - params: { url: url }, - headers: headers - }) -} - -export { getFileList } \ No newline at end of file diff --git a/src/components/layout/SideBar.vue b/src/components/layout/SideBar.vue index eb7ba32..28f0d03 100644 --- a/src/components/layout/SideBar.vue +++ b/src/components/layout/SideBar.vue @@ -21,9 +21,6 @@ - - - diff --git a/src/components/login/login.vue b/src/components/login/login.vue index 4fb5bb4..bb48c7e 100644 --- a/src/components/login/login.vue +++ b/src/components/login/login.vue @@ -1,22 +1,73 @@ + diff --git a/src/router/index.ts b/src/router/index.ts index d3e366f..7013878 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -43,13 +43,6 @@ const routes: Array = [ name: '日历' } }, - { - path: '/cloud', - component: () => import('@/view/cloud/index.vue'), - meta: { - name: '个人云盘' - } - }, { path: '/market', component: () => import('@/view/recommend/index.vue'), diff --git a/src/view/blog/index.vue b/src/view/blog/index.vue index 6b3acce..bbc4d62 100644 --- a/src/view/blog/index.vue +++ b/src/view/blog/index.vue @@ -1,61 +1,137 @@ - \ No newline at end of file + +.blog-card { + cursor: pointer; + transition: all 0.2s ease; + border-radius: 10px; + + :deep(.el-card__body) { + padding: 18px 20px; + } +} + +.blog-card-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 16px; + margin-bottom: 10px; +} + +.blog-card-title { + margin: 0; + font-size: 18px; + font-weight: 600; + color: #303133; + flex: 1; + /* 单行省略 */ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + transition: color 0.2s; +} +.blog-card:hover .blog-card-title { color: #409eff; } + +.blog-card-actions { + display: flex; + gap: 6px; + flex-shrink: 0; +} + +.blog-card-preview { + margin: 0 0 12px; + font-size: 14px; + line-height: 1.6; + color: #606266; + /* 两行省略 */ + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + min-height: 44px; +} + +.blog-card-meta { + display: flex; + align-items: center; + gap: 16px; + font-size: 12px; + color: #909399; + flex-wrap: wrap; +} +.meta-item { + display: inline-flex; + align-items: center; + gap: 4px; +} + +.pagination-wrap { + display: flex; + justify-content: flex-end; + margin-top: 20px; + padding: 8px 0; +} + diff --git a/src/view/calendar/index.vue b/src/view/calendar/index.vue index 05e1738..bf6f013 100644 --- a/src/view/calendar/index.vue +++ b/src/view/calendar/index.vue @@ -21,13 +21,37 @@ - 待办事项 - +
+ 待办事项 + + + + + + +
+ + + + + + + @@ -59,14 +83,14 @@ - - - \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index acf8e5d..696c56f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -83,10 +83,6 @@ export default defineConfig(({ mode, command }) => { target: 'http://localhost:8088', changeOrigin: true, }, - '^/cloud/api/.*': { - target: 'http://localhost:8089', - changeOrigin: true, - }, '^/wiki/api/.*': { target: 'http://localhost:8090', changeOrigin: true,