-
+
+
+
+
+
{{ blog.title }}
+
+
+
![Poster Avatar]()
+
+
{{ posterInfo?.username || '' }}
+
{{ blog.post_date }}
+
+
+
+
+
+ 加载中...
+
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index cc26c64..f4b8dea 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -31,6 +31,7 @@ import Editor from "../pages/Editor.vue";
import NotFound from "../pages/errorPages/notFound.vue";
import Test_page from "../pages/Test_page.vue";
+import SingleBlog_page from "../pages/blogPages/SingleBlog_page.vue";
const routes = [
{path: '/404',
@@ -52,6 +53,11 @@ const routes = [
name: 'Blog',
component: Blog_home,
meta: {title: '博客'}
+ }, {
+ path: '/blog/:id',
+ name: 'Blogs',
+ component: SingleBlog_page,
+ meta: {title: '博客'}
}, {
path: '/projects',
name: 'Projects',
diff --git a/src/store/index.js b/src/store/index.js
index 862e090..10c4fb4 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -12,6 +12,7 @@ const store = createStore({
editStore: {},
editAutoSave: {on: true, interval: 30000},
demosLocal: {},
+ sessionStore: {},
},
mutations: {
toggleTheme(state) {
@@ -41,6 +42,12 @@ const store = createStore({
deleteLocalDemoValue(state, obj) {
delete state.demosLocal[obj.demo][obj.value];
},
+ setSessionValue(state, obj) {
+ state.sessionStore[obj.key] = {...state.sessionStore[obj.key], ...obj.value}
+ },
+ deleteSessionValue(state, obj) {
+ delete state.sessionStore[obj.key][obj.value];
+ },
saveEdit(state, obj) {
state.editStore = {...state.editStore, ...obj};
},
diff --git a/src/utils/imageResource.js b/src/utils/imageResource.js
index 36f8184..3ce3f6f 100644
--- a/src/utils/imageResource.js
+++ b/src/utils/imageResource.js
@@ -2,4 +2,8 @@ import {getDomain} from "./getDomain.js";
export function blogImage(id) {
return `https://${getDomain()}/data/blog/images/${id}`;
+}
+
+export function userProfile(id) {
+ return `https://${getDomain()}/data/user/profile/${id}`
}
\ No newline at end of file
评论区域待实现
+不允许评论
+