diff --git a/Yi.BBS.Vue3/src/components/TreeArticleInfo.vue b/Yi.BBS.Vue3/src/components/TreeArticleInfo.vue
index f41cd5e3..ea72196c 100644
--- a/Yi.BBS.Vue3/src/components/TreeArticleInfo.vue
+++ b/Yi.BBS.Vue3/src/components/TreeArticleInfo.vue
@@ -6,6 +6,8 @@
:expand-on-click-node="false"
node-key="id"
:default-expand-all='true'
+ :highlight-current="true"
+ :current-node-key="currentNodeKey"
>
@@ -28,9 +30,13 @@
diff --git a/Yi.BBS.Vue3/src/views/Article.vue b/Yi.BBS.Vue3/src/views/Article.vue
index 10e3c3af..cf4c0965 100644
--- a/Yi.BBS.Vue3/src/views/Article.vue
+++ b/Yi.BBS.Vue3/src/views/Article.vue
@@ -12,7 +12,7 @@
style="width: 100%; margin-bottom: 0.8rem; margin-left: 0">添加子文章
+ @handleNodeClick="handleNodeClick" :currentNodeKey="currentNodeKey"/>
@@ -83,7 +83,8 @@
-
+
+
-
{{ `${i + 1} : ${item}`
}}
@@ -134,23 +135,26 @@ const items = [{ user: "用户1" }, { user: "用户2" }, { user: "用户3" }];
const articleData = ref([]);
//主题内容
const discuss = ref({});
-
+//当前默认选择的子文章
+const currentNodeKey=route.params.articleId;
//目录数据
const catalogueData = ref([]);
//子文章初始化
const loadArticleData = async () => {
+
articleData.value = await articleall(route.params.discussId);
}
//主题初始化
const loadDiscuss = async (isRewrite) => {
+
if (isRewrite) {
//跳转路由
router.push(`/article/${route.params.discussId}`);
}
discuss.value = await discussGet(route.params.discussId);
- if (route.params.articleId != undefined) {
+ if (route.params.articleId != "") {
const respose = await articleGet(route.params.articleId);
discuss.value.content = respose.content;
}
diff --git a/Yi.BBS.Vue3/src/views/EditArticle.vue b/Yi.BBS.Vue3/src/views/EditArticle.vue
index 78429bc7..2ef44f6d 100644
--- a/Yi.BBS.Vue3/src/views/EditArticle.vue
+++ b/Yi.BBS.Vue3/src/views/EditArticle.vue
@@ -125,11 +125,15 @@ const submit = async (formEl) => {
//主题创建
if (route.query.operType == "create") {
- await discussAdd(discuss);
+ const response= await discussAdd(discuss);
+ var routerPer = { path: `/article/${response.id}` };
+ router.push(routerPer);
}
//主题更新
else if (route.query.operType == "update") {
await discussUpdate(route.query.discussId, discuss);
+ var routerPer = { path: `/article/${route.query.discussId}` };
+ router.push(routerPer);
}
}
@@ -142,16 +146,21 @@ const submit = async (formEl) => {
article.parentId=route.query.parentArticleId
//文章创建
if (route.query.operType == "create") {
- await articleAdd(article);
+ const response= await articleAdd(article);
+ var routerPer = { path: `/article/${route.query.discussId}/${response.id}` };
+ router.push(routerPer);
}
//文章更新
else if (route.query.operType == "update") {
await articleUpdate(route.query.articleId, article);
+
+ var routerPer = { path: `/article/${route.query.discussId}/${route.query.articleId}` };
+ router.push(routerPer);
}
}
//添加成功后跳转到该页面
- var routerPer = { path: `/discuss/${discuss.plateId}` };
- router.push(routerPer);
+ // var routerPer = { path: `/discuss/${discuss.plateId}` };
+ // router.push(routerPer);
// ruleFormRef.value.resetFields();
// discuss.plateId = route.query.plateId;
}
diff --git a/Yi.BBS.Vue3/src/views/Login.vue b/Yi.BBS.Vue3/src/views/Login.vue
index 30fa9299..7810a7b3 100644
--- a/Yi.BBS.Vue3/src/views/Login.vue
+++ b/Yi.BBS.Vue3/src/views/Login.vue
@@ -1,8 +1,8 @@
- 这个是登录页面
+
登录-欢迎
- 登录
+ 登录
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db
index 9d30001f..cea6ac78 100644
Binary files a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db differ
diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db
index 9d30001f..cea6ac78 100644
Binary files a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db differ