From a291cddecd7830cd427283f7f52ed1c5539bdd25 Mon Sep 17 00:00:00 2001 From: username <2971861643@qq.com> Date: Mon, 27 May 2024 21:26:22 +0800 Subject: [PATCH] 12 --- src/api/list.js | 6 ++--- src/components/navigationBar.vue | 2 +- src/router/index.js | 2 +- src/views/labelPage.vue | 44 ++++---------------------------- src/views/particulars/list.vue | 30 ++++++++++++---------- 5 files changed, 26 insertions(+), 58 deletions(-) diff --git a/src/api/list.js b/src/api/list.js index f3ffdb7..0465f06 100644 --- a/src/api/list.js +++ b/src/api/list.js @@ -1,9 +1,9 @@ import request from '../utils/request' -export function getlist (data) { +export function getlist (id) { return request({ - url: '/tags/:id', + url: `/list/${id}`, method: 'get', - data: data + params: { id } }) } diff --git a/src/components/navigationBar.vue b/src/components/navigationBar.vue index e174eb6..5b175a8 100644 --- a/src/components/navigationBar.vue +++ b/src/components/navigationBar.vue @@ -78,7 +78,7 @@ export default { // 清除Vuex中的状态(如果有的话) this.$store.commit('logout') // 重定向到登录页面 - this.$router.push({ path: '/login' }) + this.$router.push({ path: '/' }) this.$message({ message: '退出成功', type: 'success' diff --git a/src/router/index.js b/src/router/index.js index 1ded41d..6189e82 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -136,7 +136,7 @@ const routes = [ // name: 'pythonContent', // component: pythonContent // }, - { path: '/note/:id', component: NoteDetail } + { path: '/list/:id', component: NoteDetail } ] const router = new VueRouter({ diff --git a/src/views/labelPage.vue b/src/views/labelPage.vue index 4581fe9..c05afdf 100644 --- a/src/views/labelPage.vue +++ b/src/views/labelPage.vue @@ -11,8 +11,8 @@
- - - - - - - - - -
将文件拖到此处,或点击上传
-
- 只能上传jpg/png文件,且不超过500kb -
-
-
- - - 取 消 - 确 定 - -
- - - 我来啦! - - + @@ -82,17 +51,14 @@ export default { } }, created () { - this.fetchNote() + this.fetchTags() }, methods: { - fetchNote () { + fetchTags () { getTags().then(res => { this.items = res.data }) }, - open () { - // this.drawer = true - }, openDialog () { this.dialogVisible = true }, diff --git a/src/views/particulars/list.vue b/src/views/particulars/list.vue index 06eaffa..8c55059 100644 --- a/src/views/particulars/list.vue +++ b/src/views/particulars/list.vue @@ -1,34 +1,36 @@