From e5460ae3cccf5658cbaa024559029f237f5ae587 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com>
Date: Sun, 26 Mar 2023 16:22:49 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E6=88=90=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E3=80=81=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E3=80=81=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Yi.BBS.Vue3/src/App.vue | 13 +-
Yi.BBS.Vue3/src/apis/configApi.js | 9 ++
Yi.BBS.Vue3/src/components/AgreeInfo.vue | 55 ++++++++
Yi.BBS.Vue3/src/components/BottomInfo.vue | 10 +-
Yi.BBS.Vue3/src/components/DisscussCard.vue | 7 +-
Yi.BBS.Vue3/src/components/UserSelectInfo.vue | 129 ++++++++++++++++++
Yi.BBS.Vue3/src/layout/AppHeader.vue | 4 +-
Yi.BBS.Vue3/src/stores/config.js | 22 +++
Yi.BBS.Vue3/src/utils/request.js | 4 +
Yi.BBS.Vue3/src/views/Article.vue | 4 +-
Yi.BBS.Vue3/src/views/Discuss.vue | 5 +
Yi.BBS.Vue3/src/views/EditArticle.vue | 9 ++
Yi.BBS.Vue3/src/views/Login.vue | 4 +-
Yi.BBS.Vue3/src/views/profile/UserInfo.vue | 4 +-
.../DictionaryService.cs | 3 +-
.../DictionaryTypeService.cs | 2 +-
.../DataSeeds/BbsConfigDataSeed.cs | 37 +++++
.../BBS/Yi.BBS.Domain/DomainSwaggerDoc.xml | 5 +
.../project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db | Bin 352256 -> 352256 bytes
.../Dtos/Discuss/DiscussGetListOutputDto.cs | 24 ++--
.../Forum/Dtos/Discuss/DiscussGetOutputDto.cs | 2 +
.../Dtos/Discuss/DiscussUpdateInputVo.cs | 1 +
.../Forum/DiscussService.cs | 7 +
.../Forum/ConstClasses/DiscussConst.cs | 2 +-
.../bbs/Yi.BBS.Domain/DomainSwaggerDoc.xml | 5 +
.../Forum/Entities/DiscussEntity.cs | 7 +
.../project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db | Bin 352256 -> 352256 bytes
.../Identity/Dtos/User/UserGetListInputVo.cs | 2 +
.../Identity/UserService.cs | 5 +
.../src/components/Pagination/index.vue | 2 +-
Yi.RuoYi.Vue3/src/utils/request.js | 3 +
.../src/views/ERP/material/index.vue | 2 +-
.../src/views/ERP/purchase/index.vue | 4 +-
Yi.RuoYi.Vue3/src/views/ERP/stock/index.vue | 2 +-
.../src/views/ERP/supplier/index.vue | 2 +-
Yi.RuoYi.Vue3/src/views/ERP/unit/index.vue | 2 +-
.../src/views/ERP/warehouse/index.vue | 2 +-
Yi.RuoYi.Vue3/src/views/bbs/article/index.vue | 2 +-
Yi.RuoYi.Vue3/src/views/monitor/job/index.vue | 2 +-
Yi.RuoYi.Vue3/src/views/monitor/job/log.vue | 2 +-
.../src/views/monitor/logininfor/index.vue | 2 +-
.../src/views/monitor/online/index.vue | 2 +-
.../src/views/monitor/operlog/index.vue | 2 +-
.../src/views/system/config/index.vue | 2 +-
Yi.RuoYi.Vue3/src/views/system/dict/data.vue | 2 +-
Yi.RuoYi.Vue3/src/views/system/dict/index.vue | 3 +-
.../src/views/system/notice/index.vue | 2 +-
Yi.RuoYi.Vue3/src/views/system/post/index.vue | 2 +-
.../src/views/system/role/authUser.vue | 2 +-
Yi.RuoYi.Vue3/src/views/system/role/index.vue | 2 +-
.../src/views/system/role/selectUser.vue | 2 +-
.../src/views/system/user/authRole.vue | 2 +-
Yi.RuoYi.Vue3/src/views/system/user/index.vue | 2 +-
.../src/views/tool/gen/importTable.vue | 2 +-
Yi.RuoYi.Vue3/src/views/tool/gen/index.vue | 2 +-
55 files changed, 386 insertions(+), 51 deletions(-)
create mode 100644 Yi.BBS.Vue3/src/apis/configApi.js
create mode 100644 Yi.BBS.Vue3/src/components/AgreeInfo.vue
create mode 100644 Yi.BBS.Vue3/src/components/UserSelectInfo.vue
create mode 100644 Yi.BBS.Vue3/src/stores/config.js
create mode 100644 Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs
diff --git a/Yi.BBS.Vue3/src/App.vue b/Yi.BBS.Vue3/src/App.vue
index cf631c70..a4a6f782 100644
--- a/Yi.BBS.Vue3/src/App.vue
+++ b/Yi.BBS.Vue3/src/App.vue
@@ -7,10 +7,21 @@
\ No newline at end of file
diff --git a/Yi.BBS.Vue3/src/components/DisscussCard.vue b/Yi.BBS.Vue3/src/components/DisscussCard.vue
index 9466d325..f2e96544 100644
--- a/Yi.BBS.Vue3/src/components/DisscussCard.vue
+++ b/Yi.BBS.Vue3/src/components/DisscussCard.vue
@@ -41,8 +41,8 @@
{{ discuss.creationTime }}
-
-
+
+
浏览数:{{ discuss.seeNum ?? 0 }}
@@ -69,6 +69,7 @@
import { h, ref, toRef, onMounted ,reactive} from 'vue'
import { useRouter } from 'vue-router'
import AvatarInfo from './AvatarInfo.vue';
+import AgreeInfo from './AgreeInfo.vue'
import { operate } from '@/apis/agreeApi'
const props = defineProps(['discuss','badge'])
diff --git a/Yi.BBS.Vue3/src/components/UserSelectInfo.vue b/Yi.BBS.Vue3/src/components/UserSelectInfo.vue
new file mode 100644
index 00000000..cfc6df6d
--- /dev/null
+++ b/Yi.BBS.Vue3/src/components/UserSelectInfo.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Yi.BBS.Vue3/src/layout/AppHeader.vue b/Yi.BBS.Vue3/src/layout/AppHeader.vue
index 513b80e9..3d3bc0f5 100644
--- a/Yi.BBS.Vue3/src/layout/AppHeader.vue
+++ b/Yi.BBS.Vue3/src/layout/AppHeader.vue
@@ -8,7 +8,7 @@
>
-
Yi意社区
+
{{configStore.name}}
主页
学习
@@ -56,6 +56,8 @@ import AvatarInfo from '@/components/AvatarInfo.vue'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import useUserStore from '@/stores/user.js'
+import useConfigStore from "@/stores/config";
+const configStore= useConfigStore();
const router = useRouter()
const userStore =useUserStore();
const activeIndex = ref('1')
diff --git a/Yi.BBS.Vue3/src/stores/config.js b/Yi.BBS.Vue3/src/stores/config.js
new file mode 100644
index 00000000..5d1c0c7d
--- /dev/null
+++ b/Yi.BBS.Vue3/src/stores/config.js
@@ -0,0 +1,22 @@
+import {getAll} from '@/apis/configApi'
+import { defineStore } from 'pinia'
+const useConfigStore = defineStore('config',
+ {
+ state: () => ({
+ data: []
+ }),
+ getters: {
+ name:(state)=>state.data.filter(s=> s.configKey=='bbs.site.name').map(x=>x.configValue)[0],
+ author:(state)=>state.data.filter(s=> s.configKey=='bbs.site.author').map(x=>x.configValue)[0],
+ icp:(state)=>state.data.filter(s=> s.configKey=='bbs.site.icp').map(x=>x.configValue)[0],
+ bottom:(state)=>state.data.filter(s=>s.configKey=='bbs.site.bottom').map(x=>x.configValue)[0]
+ },
+ actions: {
+ // 登录
+ async getConfig() {
+ const response = await getAll();
+ this.data = response.data.items;
+ },
+ },
+ })
+export default useConfigStore;
diff --git a/Yi.BBS.Vue3/src/utils/request.js b/Yi.BBS.Vue3/src/utils/request.js
index 9e2c64e5..ed4b6120 100644
--- a/Yi.BBS.Vue3/src/utils/request.js
+++ b/Yi.BBS.Vue3/src/utils/request.js
@@ -20,11 +20,15 @@ const myaxios = axios.create({
// }
// }],
})
+
+
+
// 请求拦截器
myaxios.interceptors.request.use(function (config) {
if (getToken()) {
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
+
return config;
}, function (error) {
return Promise.reject(error);
diff --git a/Yi.BBS.Vue3/src/views/Article.vue b/Yi.BBS.Vue3/src/views/Article.vue
index 533ac54c..aa607e5a 100644
--- a/Yi.BBS.Vue3/src/views/Article.vue
+++ b/Yi.BBS.Vue3/src/views/Article.vue
@@ -49,7 +49,7 @@
- 4
+
0
分享
操作
@@ -134,7 +134,7 @@ import CommentInfo from "@/components/CommentInfo.vue";
import BottomInfo from '@/components/BottomInfo.vue'
import TreeArticleInfo from "@/components/TreeArticleInfo.vue";
import { useRoute, useRouter } from "vue-router";
-
+import AgreeInfo from '@/components/AgreeInfo.vue'
import { get as discussGet, del as discussDel } from "@/apis/discussApi.js";
import { all as articleall, del as articleDel, get as articleGet } from "@/apis/articleApi.js";
//数据定义
diff --git a/Yi.BBS.Vue3/src/views/Discuss.vue b/Yi.BBS.Vue3/src/views/Discuss.vue
index 0a4f267c..03bc6733 100644
--- a/Yi.BBS.Vue3/src/views/Discuss.vue
+++ b/Yi.BBS.Vue3/src/views/Discuss.vue
@@ -213,4 +213,9 @@ display: flex;
.collapse-list >>> .el-collapse-item__header {
border-bottom-color: #F0F2F5 !important;
}
+
+.el-divider
+{
+ margin: 0.5rem 0;
+}
\ No newline at end of file
diff --git a/Yi.BBS.Vue3/src/views/EditArticle.vue b/Yi.BBS.Vue3/src/views/EditArticle.vue
index 84992439..5a47f2ac 100644
--- a/Yi.BBS.Vue3/src/views/EditArticle.vue
+++ b/Yi.BBS.Vue3/src/views/EditArticle.vue
@@ -18,6 +18,10 @@
部分用户可见
+
+
+
+
@@ -59,6 +63,7 @@