Compare commits

..

2 Commits

Author SHA1 Message Date
huxuejian
744b1ee76b Merge remote-tracking branch 'origin/dev-wdb' 2026-02-05 11:28:48 +08:00
5bcdbf80cd no message 2026-02-05 11:26:53 +08:00
10 changed files with 58 additions and 31 deletions

View File

@ -1,5 +1,5 @@
MP_API_BASE_URL=https://patient.youcan365.com MP_API_BASE_URL=https://patient.youcan365.com
MP_CACHE_PREFIX=development MP_CACHE_PREFIX=development
MP_WX_APP_ID=wx93af55767423938e MP_WX_APP_ID=wx6ee11733526b4f04
MP_TIM_SDK_APP_ID=1600123876 MP_TIM_SDK_APP_ID=1600123876
MP_CORP_ID=wwe3fb2faa52cf9dfb MP_CORP_ID=wwe3fb2faa52cf9dfb

View File

@ -1,5 +1,5 @@
MP_API_BASE_URL=http://localhost:8080 MP_API_BASE_URL=http://localhost:8080
MP_CACHE_PREFIX=development MP_CACHE_PREFIX=development
MP_WX_APP_ID=wx93af55767423938e MP_WX_APP_ID=wx6ee11733526b4f04
MP_TIM_SDK_APP_ID=1600123876 MP_TIM_SDK_APP_ID=1600123876
MP_CORP_ID=wwe3fb2faa52cf9dfb MP_CORP_ID=wwe3fb2faa52cf9dfb

View File

@ -50,7 +50,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx93af55767423938e", "appid" : "wx6ee11733526b4f04",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },

View File

@ -41,14 +41,14 @@
{ {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "健康", "navigationBarTitleText": "健康",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/login/redirect-page", "path": "pages/login/redirect-page",
"style": { "style": {
"navigationBarTitleText": "健康" "navigationBarTitleText": "健康"
} }
}, },
{ {

View File

@ -382,22 +382,23 @@ $primary-color: #0877F1;
background: #fff; background: #fff;
border-top: 1rpx solid #e0e0e0; border-top: 1rpx solid #e0e0e0;
position: relative; position: relative;
z-index: 200; // 确保输入区域在评价卡片之上但在弹窗之下 z-index: 200;
// padding: 32rpx 16rpx 28rpx 16rpx; padding-bottom: env(safe-area-inset-bottom);
} }
.input-toolbar { .input-toolbar {
display: flex; display: flex;
align-items: flex-end; align-items: center;
padding: 28rpx 0 28rpx 0; padding: 16rpx 20rpx;
gap: 12rpx; gap: 12rpx;
padding-left: 20rpx;
padding-right: 20rpx;
} }
.voice-toggle-btn{
.voice-toggle-btn {
width: 56rpx;
height: 56rpx; height: 56rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
flex-shrink: 0; flex-shrink: 0;
padding: 0; padding: 0;
} }
@ -407,6 +408,7 @@ $primary-color: #0877F1;
height: 56rpx; height: 56rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
flex-shrink: 0; flex-shrink: 0;
padding: 0; padding: 0;
} }
@ -418,7 +420,7 @@ $primary-color: #0877F1;
font-weight: 600; font-weight: 600;
border: none; border: none;
border-radius: 40rpx; border-radius: 40rpx;
height: 64rpx; height: 56rpx;
min-width: 112rpx; min-width: 112rpx;
padding: 0 32rpx; padding: 0 32rpx;
box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08); box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08);
@ -441,18 +443,33 @@ $primary-color: #0877F1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-width: 0; min-width: 0;
max-width: calc(100vw - 280rpx);
} }
.text-input, .text-input {
.voice-input-btn {
flex: 1; flex: 1;
padding: 26rpx 46rpx; padding: 16rpx 24rpx;
background-color: #f3f5fa; background-color: #f3f5fa;
border-radius: 20rpx; border-radius: 20rpx;
margin: 0 16rpx; margin: 0;
font-size: 28rpx; font-size: 28rpx;
min-height: 80rpx; min-height: 56rpx;
max-height: 200rpx;
border: none;
outline: none;
box-sizing: border-box;
line-height: 1.5;
color: #333;
vertical-align: middle;
}
.voice-input-btn {
flex: 1;
padding: 16rpx 24rpx;
background-color: #f3f5fa;
border-radius: 20rpx;
margin: 0;
font-size: 28rpx;
min-height: 56rpx;
max-height: 200rpx; max-height: 200rpx;
border: none; border: none;
outline: none; outline: none;
@ -462,13 +479,13 @@ $primary-color: #0877F1;
} }
.voice-input-btn { .voice-input-btn {
height: 80rpx; height: 56rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 46rpx; padding: 0 24rpx;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 56rpx;
} }
.more-panel { .more-panel {
@ -1031,6 +1048,7 @@ $primary-color: #0877F1;
.text-input:-ms-input-placeholder, .text-input:-ms-input-placeholder,
.text-input::placeholder { .text-input::placeholder {
line-height: 1.5; line-height: 1.5;
vertical-align: middle;
} }
.voice-input-btn::-webkit-input-placeholder, .voice-input-btn::-webkit-input-placeholder,
@ -1038,7 +1056,7 @@ $primary-color: #0877F1;
.voice-input-btn::-moz-placeholder, .voice-input-btn::-moz-placeholder,
.voice-input-btn:-ms-input-placeholder, .voice-input-btn:-ms-input-placeholder,
.voice-input-btn::placeholder { .voice-input-btn::placeholder {
line-height: 80rpx; line-height: 56rpx;
text-align: center; text-align: center;
} }

View File

@ -152,6 +152,9 @@ const sendTextMessage = async () => {
await sendMessage("text", inputText.value); await sendMessage("text", inputText.value);
inputText.value = ""; inputText.value = "";
//
uni.hideKeyboard();
}; };
@ -333,7 +336,7 @@ const goToArticleList = () => {
const morePanelButtons = [ const morePanelButtons = [
{ text: "照片", icon: "/static/icon/zhaopian.png", action: showImagePicker }, { text: "照片", icon: "/static/icon/zhaopian.png", action: showImagePicker },
{ text: "宣教", icon: "/static/icon/xuanjiaowenzhang.png", action: goToArticleList }, // { text: "", icon: "/static/icon/xuanjiaowenzhang.png", action: goToArticleList },
]; ];
function handleInputFocus() { function handleInputFocus() {

View File

@ -9,7 +9,8 @@ import useTeamStore from '@/store/team.js'
export default function useGroupAvatars() { export default function useGroupAvatars() {
const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] } const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] }
const teamStore = useTeamStore() const teamStore = useTeamStore()
const patientDefaultAvatar = '/static/default-avatar.svg' const patientDefaultAvatar = '/static/default-patient-avatar.png'
const teamMemberDefaultAvatar = '/static/default-avatar.svg'
/** /**
* 获取单个群聊的头像列表 * 获取单个群聊的头像列表
@ -36,10 +37,10 @@ export default function useGroupAvatars() {
// 提取头像列表(过滤掉空头像,使用默认头像替代) // 提取头像列表(过滤掉空头像,使用默认头像替代)
const avatarList = Object.values(memberMap) const avatarList = Object.values(memberMap)
.map(member => { .map(member => {
// 如果成员有头像且不为空,使用成员头像;否则使用默认头像 // 如果成员有头像且不为空,使用成员头像;否则使用团队成员默认头像
return (member.avatar && member.avatar.trim() !== '') return (member.avatar && member.avatar.trim() !== '')
? member.avatar ? member.avatar
: patientDefaultAvatar : teamMemberDefaultAvatar
}) })
// 添加患者默认头像 // 添加患者默认头像

View File

@ -1,7 +1,9 @@
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { onShow, onUnload } from '@dcloudio/uni-app' import { onShow, onUnload } from '@dcloudio/uni-app'
import { storeToRefs } from 'pinia'
import api from '@/utils/api.js' import api from '@/utils/api.js'
import useTeamStore from '@/store/team.js' import useTeamStore from '@/store/team.js'
import useAccountStore from '@/store/account.js'
/** /**
* 群聊hook - 管理群聊成员和头像 * 群聊hook - 管理群聊成员和头像
@ -13,6 +15,7 @@ export default function useGroupChat(groupID) {
const teamMemberIds = ref([]) // 存储团队成员的userId列表 const teamMemberIds = ref([]) // 存储团队成员的userId列表
const patientId = ref('') // 存储患者ID const patientId = ref('') // 存储患者ID
const teamStore = useTeamStore() const teamStore = useTeamStore()
const { openid } = storeToRefs(useAccountStore())
// 群聊成员映射 // 群聊成员映射
const chatMember = computed(() => { const chatMember = computed(() => {
@ -45,8 +48,9 @@ export default function useGroupChat(groupID) {
const member = chatMember.value[userId] const member = chatMember.value[userId]
if (!member) { if (!member) {
// 如果找不到成员信息,根据是否为团队成员返回默认头像 // 如果找不到成员信息,根据是否为团队成员返回默认头像
// 团队成员和患者都使用 default-avatar.svg // 患者userId为当前账户openid使用 default-patient-avatar.png
return '/static/default-avatar.svg' // 其他情况使用 default-avatar.svg
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.svg'
} }
// 如果有头像且不为空字符串,返回头像 // 如果有头像且不为空字符串,返回头像
@ -54,8 +58,9 @@ export default function useGroupChat(groupID) {
return member.avatar return member.avatar
} }
// 否则使用默认头像 // 否则根据是否为团队成员返回默认头像
return '/static/default-avatar.svg' // 患者使用 default-patient-avatar.png团队成员使用 default-avatar.svg
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
} }
// 获取群聊信息和成员头像 // 获取群聊信息和成员头像

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB