Compare commits
2 Commits
5ddc8fa9f2
...
744b1ee76b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
744b1ee76b | ||
| 5bcdbf80cd |
@ -1,5 +1,5 @@
|
||||
MP_API_BASE_URL=https://patient.youcan365.com
|
||||
MP_CACHE_PREFIX=development
|
||||
MP_WX_APP_ID=wx93af55767423938e
|
||||
MP_WX_APP_ID=wx6ee11733526b4f04
|
||||
MP_TIM_SDK_APP_ID=1600123876
|
||||
MP_CORP_ID=wwe3fb2faa52cf9dfb
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
MP_API_BASE_URL=http://localhost:8080
|
||||
MP_CACHE_PREFIX=development
|
||||
MP_WX_APP_ID=wx93af55767423938e
|
||||
MP_WX_APP_ID=wx6ee11733526b4f04
|
||||
MP_TIM_SDK_APP_ID=1600123876
|
||||
MP_CORP_ID=wwe3fb2faa52cf9dfb
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx93af55767423938e",
|
||||
"appid" : "wx6ee11733526b4f04",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
|
||||
@ -41,14 +41,14 @@
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "柚健康",
|
||||
"navigationBarTitleText": "健康柚",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/redirect-page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "柚健康"
|
||||
"navigationBarTitleText": "健康柚"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -382,22 +382,23 @@ $primary-color: #0877F1;
|
||||
background: #fff;
|
||||
border-top: 1rpx solid #e0e0e0;
|
||||
position: relative;
|
||||
z-index: 200; // 确保输入区域在评价卡片之上,但在弹窗之下
|
||||
// padding: 32rpx 16rpx 28rpx 16rpx;
|
||||
z-index: 200;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.input-toolbar {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding: 28rpx 0 28rpx 0;
|
||||
align-items: center;
|
||||
padding: 16rpx 20rpx;
|
||||
gap: 12rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.voice-toggle-btn {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@ -407,6 +408,7 @@ $primary-color: #0877F1;
|
||||
height: 56rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@ -418,7 +420,7 @@ $primary-color: #0877F1;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 40rpx;
|
||||
height: 64rpx;
|
||||
height: 56rpx;
|
||||
min-width: 112rpx;
|
||||
padding: 0 32rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08);
|
||||
@ -441,18 +443,33 @@ $primary-color: #0877F1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 0;
|
||||
max-width: calc(100vw - 280rpx);
|
||||
}
|
||||
|
||||
.text-input,
|
||||
.voice-input-btn {
|
||||
.text-input {
|
||||
flex: 1;
|
||||
padding: 26rpx 46rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #f3f5fa;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 16rpx;
|
||||
margin: 0;
|
||||
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;
|
||||
border: none;
|
||||
outline: none;
|
||||
@ -462,13 +479,13 @@ $primary-color: #0877F1;
|
||||
}
|
||||
|
||||
.voice-input-btn {
|
||||
height: 80rpx;
|
||||
height: 56rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 46rpx;
|
||||
padding: 0 24rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
.more-panel {
|
||||
@ -1031,6 +1048,7 @@ $primary-color: #0877F1;
|
||||
.text-input:-ms-input-placeholder,
|
||||
.text-input::placeholder {
|
||||
line-height: 1.5;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.voice-input-btn::-webkit-input-placeholder,
|
||||
@ -1038,7 +1056,7 @@ $primary-color: #0877F1;
|
||||
.voice-input-btn::-moz-placeholder,
|
||||
.voice-input-btn:-ms-input-placeholder,
|
||||
.voice-input-btn::placeholder {
|
||||
line-height: 80rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@ -152,6 +152,9 @@ const sendTextMessage = async () => {
|
||||
|
||||
await sendMessage("text", inputText.value);
|
||||
inputText.value = "";
|
||||
|
||||
// 收起键盘
|
||||
uni.hideKeyboard();
|
||||
};
|
||||
|
||||
|
||||
@ -333,7 +336,7 @@ const goToArticleList = () => {
|
||||
|
||||
const morePanelButtons = [
|
||||
{ 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() {
|
||||
|
||||
@ -9,7 +9,8 @@ import useTeamStore from '@/store/team.js'
|
||||
export default function useGroupAvatars() {
|
||||
const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] }
|
||||
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)
|
||||
.map(member => {
|
||||
// 如果成员有头像且不为空,使用成员头像;否则使用默认头像
|
||||
// 如果成员有头像且不为空,使用成员头像;否则使用团队成员默认头像
|
||||
return (member.avatar && member.avatar.trim() !== '')
|
||||
? member.avatar
|
||||
: patientDefaultAvatar
|
||||
: teamMemberDefaultAvatar
|
||||
})
|
||||
|
||||
// 添加患者默认头像
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import { onShow, onUnload } from '@dcloudio/uni-app'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import api from '@/utils/api.js'
|
||||
import useTeamStore from '@/store/team.js'
|
||||
import useAccountStore from '@/store/account.js'
|
||||
|
||||
/**
|
||||
* 群聊hook - 管理群聊成员和头像
|
||||
@ -13,6 +15,7 @@ export default function useGroupChat(groupID) {
|
||||
const teamMemberIds = ref([]) // 存储团队成员的userId列表
|
||||
const patientId = ref('') // 存储患者ID
|
||||
const teamStore = useTeamStore()
|
||||
const { openid } = storeToRefs(useAccountStore())
|
||||
|
||||
// 群聊成员映射
|
||||
const chatMember = computed(() => {
|
||||
@ -45,8 +48,9 @@ export default function useGroupChat(groupID) {
|
||||
const member = chatMember.value[userId]
|
||||
if (!member) {
|
||||
// 如果找不到成员信息,根据是否为团队成员返回默认头像
|
||||
// 团队成员和患者都使用 default-avatar.svg
|
||||
return '/static/default-avatar.svg'
|
||||
// 患者(userId为当前账户openid)使用 default-patient-avatar.png
|
||||
// 其他情况使用 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 '/static/default-avatar.svg'
|
||||
// 否则根据是否为团队成员返回默认头像
|
||||
// 患者使用 default-patient-avatar.png,团队成员使用 default-avatar.svg
|
||||
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
|
||||
}
|
||||
|
||||
// 获取群聊信息和成员头像
|
||||
|
||||
BIN
static/default-patient-avatar.png
Normal file
BIN
static/default-patient-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Loading…
x
Reference in New Issue
Block a user