diff --git a/src/router.js b/src/router.js index 18a8be1..5e44998 100644 --- a/src/router.js +++ b/src/router.js @@ -28,6 +28,11 @@ const router = createRouter({ name: "me", component: () => import("@/views/blog/me.vue"), }, + { + path: "/articles", + name: "articles", + component: () => import("@/views/blog/articles.vue"), + } ], }, { diff --git a/src/store/details.js b/src/store/details.js index 32bba99..31f93f6 100644 --- a/src/store/details.js +++ b/src/store/details.js @@ -75,7 +75,7 @@ export const projectStore = defineStore("project", { export const viewDetailsStore = defineStore("viewDetails", { state: () => ({ detail: { - a_id: "", + id: "", title: "", content: "", created: "", @@ -84,7 +84,7 @@ export const viewDetailsStore = defineStore("viewDetails", { }), actions: { setViewDetails(data) { - this.detail.a_id = data.a_id; + this.detail.id = data.id; this.detail.title = data.title; this.detail.content = data.content; this.detail.created = data.created; diff --git a/src/views/blog/articles.vue b/src/views/blog/articles.vue new file mode 100644 index 0000000..227fcac --- /dev/null +++ b/src/views/blog/articles.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/views/blog/blog.vue b/src/views/blog/blog.vue index 4a2f3de..9629a47 100644 --- a/src/views/blog/blog.vue +++ b/src/views/blog/blog.vue @@ -5,7 +5,7 @@ 首页 - 文章 + 文章