diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml index 9430e6d..ae193d0 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml @@ -1,36 +1,36 @@ -#本地开发环境 - lj: - db: - host: localhost - password: 1243969857 - redis: - host: localhost - port: 6379 - password: 1243969857 - rabbitmq: - host: localhost - port: 5672 - username: guest - password: guest - minio: - endpoint: http://localhost:9000 - accessKey: minioadmin - secretKey: minioadmin +##本地开发环境 +# lj: +# db: +# host: localhost +# password: lzt&264610 +# redis: +# host: localhost +# port: 6379 +# password: 123456 +# rabbitmq: +# host: localhost +# port: 5672 +# username: guest +# password: guest +# minio: +# endpoint: http://localhost:9000 +# accessKey: minioadmin +# secretKey: minioadmin -#lj: -# db: -# host: 192.168.59.129 -# password: Forely123! -# redis: -# host: 192.168.59.129 -# port: 6379 -# password: Forely123! -# rabbitmq: -# host: 192.168.59.129 -# port: 5672 -# username: admin -# password: Forely123! -# minio: -# endpoint: http://192.168.59.129:9000 -# accessKey: forely -# secretKey: Forely123! +lj: + db: + host: 192.168.125.128 + password: MySQL@5678 + redis: + host: 192.168.125.128 + port: 6379 + password: Redis@9012 + rabbitmq: + host: 192.168.125.128 + port: 5672 + username: rabbit_admin + password: Rabbit@3456 + minio: + endpoint: http://192.168.125.128:9000 + accessKey: minio_admin + secretKey: Minio@1234 diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue index 04a03ff..a783cc5 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue @@ -216,7 +216,8 @@ async function login() { userStore.login({ avatar:require ('@/assets/default-avatar/boy_1.png'), - userName: '珈人一号', + username: loginForm.value.userFlag, // 使用用户标识作为用户名 + password: loginForm.value.password, userid:1 }); diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js index 87083b6..6434b80 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js @@ -171,7 +171,7 @@ export const usePostDetailStore = defineStore("postDetail", { }, // 发送评论或回复 async sendComment(newCommentData) { - if (!content || !this.post?.postId) return; + if (!newCommentData.content || !this.post?.postId) return; const RequestData = { id: null, postId: newCommentData.postId, // 帖子ID @@ -202,7 +202,7 @@ export const usePostDetailStore = defineStore("postDetail", { repliesLoading: false, }; // 新增评论后刷新评论列表或插入到对应位置 - if (!parentCommentId) { + if (!newCommentData.parentCommentId) { // 一级评论,插入到最前面 this.comments.unshift(commentObj); this.post.commentCount = (this.post.commentCount || 0) + 1; // 更新帖子评论数 diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/user.js b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/user.js index 25e761c..8a624d1 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/user.js +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/user.js @@ -7,6 +7,13 @@ export const useUserStore = defineStore('user', { avatar: '', // 用户头像 URL username: '', // 用户名 userid: 0, // 用户 ID + moto:'',// 用户简介 + phone: '', // 用户手机号 + email: '', // 用户邮箱 + studentID: '', // 学号 + college: '', // 学院 + gender: 0, // 性别 0: 未知, 1: 男, 2: 女 + password: '' }, }), actions: { diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/utils/request.js b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/utils/request.js index d49f1d1..beb9a31 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/utils/request.js +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/utils/request.js @@ -26,7 +26,7 @@ request.interceptors.request.use( const token = localStorage.getItem('accessToken'); const refreshToken = localStorage.getItem('refreshToken'); if (token) { - config.headers['Authorization'] = token; + config.headers['Authorization'] = `Bearer ${token}`; config.headers['X-Refresh-Token'] = refreshToken; } } diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/ChangeInformation.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/ChangeInformation.vue index bb2a919..1be8a30 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/ChangeInformation.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/ChangeInformation.vue @@ -6,137 +6,179 @@

头像

- - 当前头像 - - 新头像预览 + 当前头像 + 新头像预览
- -

{{ errors.avatar }}

- -
- - -

{{ errors.nickname }}

+
+ +
+ + +

{{ errors.username }}

+
+ +
+ + +

{{ errors.phone }}

+
+
+ +
+ +
+ + +

{{ errors.email }}

+
+ +
+ + +

{{ errors.studentId }}

+
+
+ +
+ +
+ + +

{{ errors.gender }}

+
+ +
+ + +

{{ errors.college }}

+
-

{{ errors.bio }}

+

{{ errors.moto }}

+
+ + +
+ + +

{{ errors.password }}

-
\ No newline at end of file diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/UserPage.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/UserPage.vue index a193679..37e7ac6 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/UserPage.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/UserPage.vue @@ -6,10 +6,23 @@ 用户头像
-

{{ userInfo.userName }}

-

ONLINE

-

{{ userInfo.motto || '暂无个性签名' }}

-
+

{{ userInfo.username }}

+

ONLINE

+
+
+ + +
+
+ + +
+
+
@@ -189,6 +202,28 @@ const goToPostDetail = (postId) => { .user-details { display: flex; flex-direction: column; + align-items: flex-start; +} + +.user-info-list { + margin-top: 8px; + width: 100%; +} + +.user-info-row { + display: flex; + align-items: center; + margin-bottom: 4px; +} + +.user-info-label { + font-weight: bold; + color: #333; + min-width: 48px; +} + +.user-info-value { + color: #444; } .username {