-
![空]()
+
{{ user.username }}
{{ user.birth }}
diff --git a/src/pages/blogPages/SingleBlog_page.vue b/src/pages/blogPages/SingleBlog_page.vue
index 472599b..e8e6f95 100644
--- a/src/pages/blogPages/SingleBlog_page.vue
+++ b/src/pages/blogPages/SingleBlog_page.vue
@@ -7,7 +7,7 @@ import router from "../../router/index.js";
import swal from "../../utils/sweetalert.js";
import Like_button from "../../components/Like_button.vue";
import store from "../../store/index.js";
-import Blog_rootComment from "../../components/Blog_rootComment.vue";
+import Blog_rootComment from "../../components/Blog_comment.vue";
import {getInfoWithPages} from "../../utils/getInfoWithPages.js";
import Blog_commentDisplay from "../../components/Blog_commentDisplay.vue";
import Profile_display from "../../components/Profile_display.vue";
@@ -20,13 +20,6 @@ const blog = ref(
{
complete: false
}
- // {
- // complete: true,
- // title: 'asd',
- // content: `${'asdasd'.repeat(999)}`,
- // allowComment: true,
- // post_date: 'asd',
- // }
)
const posterInfo = ref(null)
const interactInfo = ref({
@@ -50,17 +43,26 @@ const checkWindowSize = () => {
// 在组件挂载时获取数据
onMounted(async () => {
- // setTimeout(() => {
- // interactInfo.value.likes = 114;
- // interactInfo.value.liked = true;
- // interactInfo.value.complete = true;
- // }, 100);
checkWindowSize();
window.addEventListener('resize', checkWindowSize);
+
+ // setTimeout(() => { // 测试测试
+ // interactInfo.value.likes = 114;
+ // interactInfo.value.liked = true;
+ // interactInfo.value.complete = true;
+ // blog.value = {
+ // complete: true,
+ // title: 'asd',
+ // content: `${'asdasd'.repeat(99)}`,
+ // allow_comments: 1,
+ // post_date: 'asd',
+ // }
+ // }, 100);
+ // return;
+
// 获取博客数据
try {
const blogResponse = await api.get(`/blogs/${id}`);
- console.log(blogResponse)
if (blogResponse.code === 1) {
await router.push('/404')
return;
@@ -69,7 +71,6 @@ onMounted(async () => {
blog.value = blogResponse.data;
document.title = blog.value.title + ' CYBER 博客';
blog.value.complete = true;
- console.log(blog.value)
setTimeout(() => {
interactInfo.value.likes = blog.value.likes;
@@ -195,7 +196,7 @@ const submitComment = async () => {