From c7e5b0504c639e220d849f9c6a97f9b6a118c2be Mon Sep 17 00:00:00 2001 From: yangzhe Date: Tue, 20 Jan 2026 14:46:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=81=8A=E5=A4=A9):=20=20=E6=95=99?= =?UTF-8?q?=E5=B8=88=E4=BF=A1=E6=81=AFcard=E6=B7=BB=E5=8A=A0=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E7=BB=9F=E8=AE=A1=E6=A0=87=E7=AD=BE=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/index.vue | 60 ++++++++++++++++++++++++++++++++++++++------ store/index.js | 30 +++++++++++----------- 2 files changed, 67 insertions(+), 23 deletions(-) diff --git a/pages/chat/index.vue b/pages/chat/index.vue index 22b4f95..64053b2 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -27,14 +27,29 @@ :src="receiverHeadSculptureUrl" >
-
{{ vuex_msgUser.name }}
+
+
{{ vuex_msgUser.name }}
+
+ + 今日已回复{{ + vuex_msgUser.todayNumberOfReplies || 0 + }}人 +
+
- {{ vuex_msgUser.collegeName }} + + + 江西新能源科技职业学院
@@ -442,11 +457,42 @@ export default { gap: 16rpx; flex: 1; - .teacher-name { - font-family: PingFang SC; - font-weight: bold; - font-size: 36rpx; - color: #333333; + .teacher-header { + display: flex; + align-items: center; + + .teacher-name { + font-family: PingFang SC; + font-weight: bold; + font-size: 36rpx; + color: #333333; + height: 52rpx; + line-height: 50rpx; + margin-right: 20rpx; + } + + .reply-tag { + display: flex; + align-items: center; + background-color: #eaedfc; + border-radius: 24rpx; + padding: 10rpx 24rpx; + // height: 48rpx; + box-sizing: border-box; + + .reply-icon { + width: 24rpx; + height: 24rpx; + margin-right: 8rpx; + } + + text { + font-size: 24rpx; + color: #4f6aff; + line-height: 1; + letter-spacing: 1rpx; + } + } } .teacher-school, diff --git a/store/index.js b/store/index.js index eb6a1f3..64735c9 100644 --- a/store/index.js +++ b/store/index.js @@ -498,9 +498,13 @@ const store = new Vuex.Store({ dialogueManagementId !== "00000000-0000-0000-0000-000000000000" ) { // 有会话ID,直接进入会话 - commit("set_MsgUser", { ...user }); - uni.navigateTo({ - url: `/pages/chat/index`, + Vue.prototype.$u.api.GetReceiverUserInfoApi({ Id: id }).then((res) => { + if (res.succeed && res.data) { + commit("set_MsgUser", { ...res.data, dialogueManagementId }); + uni.navigateTo({ + url: `/pages/chat/index`, + }); + } }); return; } @@ -514,19 +518,13 @@ const store = new Vuex.Store({ const resId = res1.data?.dialogueManagementId || ""; if (res1 && res1.succeed) { - // 获取接收者信息,这里没啥用(先注释) - // Vue.prototype.$u.api.GetReceiverUserInfoApi({ Id: id }).then((res) => { - // if (res.succeed && res.data) { - // commit("set_MsgUser", { ...res.data, dialogueManagementId }); - // uni.navigateTo({ - // url: `/pages/chat/index`, - // }); - // return; - // } - // }); - commit("set_MsgUser", { ...user, dialogueManagementId: resId }); - uni.navigateTo({ - url: `/pages/chat/index`, + Vue.prototype.$u.api.GetReceiverUserInfoApi({ Id: id }).then((res) => { + if (res.succeed && res.data) { + commit("set_MsgUser", { ...res.data, dialogueManagementId: resId }); + uni.navigateTo({ + url: `/pages/chat/index`, + }); + } }); return; }