diff --git a/components/group-avatar.vue b/components/group-avatar.vue index 44b83a7..6d8ab1d 100644 --- a/components/group-avatar.vue +++ b/components/group-avatar.vue @@ -25,7 +25,7 @@ const props = defineProps({ } }) -const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.svg')) +const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.png')) const size = computed(() => { const val = Number.isInteger(props.size) && props.size > 0 ? props.size : 144; diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue index aab9a26..fb88a63 100644 --- a/pages/archive/edit-archive.vue +++ b/pages/archive/edit-archive.vue @@ -86,6 +86,31 @@ function confirm() { } } +/** + * 产品要求, 编辑的情况下 姓名、身份证号、性别、年龄、出生年月 + * 建档成功或者绑定档案成功后,姓名、身份证号、性别、年龄、出生年月。如果有内容的都不允许修改。没有内容的则允许编辑。 + * @param data + */ +async function setDisabledTitles(data) { + const list = ['mobile']; + if (data.name) { + list.push('name'); + } + if (data.idCard) { + list.push('idCard'); + } + if (data.sex) { + list.push('sex'); + } + if (data.age) { + list.push('age'); + } + if (data.birthday) { + list.push('birthday'); + } + disableTitles.value = list; +} + async function addArchive() { if (loading.value) return; loading.value = true; @@ -163,6 +188,7 @@ async function getCustomer() { const res = await api('getCustomerByCustomerId', { customerId: customerId.value }); if (res && res.success && res.data) { customer.value = res.data; + setDisabledTitles(res.data) } else { await toast(res?.message || '查询档案信息失败'); uni.navigateBack(); diff --git a/pages/home/consult.vue b/pages/home/consult.vue index 103cf6a..fef1079 100644 --- a/pages/home/consult.vue +++ b/pages/home/consult.vue @@ -111,7 +111,19 @@ function handleItemClick(item) { // 确认选择咨询人 async function handleConsultantConfirm(customer) { - console.log("选择的咨询人:", customer); + const teamIds = customer && Array.isArray(customer.teamId) ? customer.teamId : []; + if (!teamIds.includes(props.teamId)) { + const res = await api("authCustomerToTeam", { + corpId: props.team.corpId, + teamId: props.team.teamId, + id: customer._id, + }); + if (res && res.success) { + uni.$emit("reloadTeamCustomers"); + } else { + toast(res?.message || "授权团队失败"); + } + } // 调用创建咨询群组接口 uni.showLoading({ title: "创建咨询中..." }); try { diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 0a04704..dbbaf5c 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -18,19 +18,11 @@ - + - + {{ i.relationship }} @@ -40,27 +32,18 @@ - + - + 点击右侧授权按钮, 我们将更精准的为您服务 - + 授权 @@ -70,32 +53,18 @@ 个人基本信息 - + - 请完善您的个人信息 + 请完善您的个人信息 完善个人信息 - + 健康信息 - + 上传健康档案 @@ -154,16 +123,12 @@ const hasHealthTemp = computed( ); const baseInfo = computed(() => qrcode.value && - qrcode.value.teamFileds && - Array.isArray(qrcode.value.teamFileds.baseInfo) + qrcode.value.teamFileds && + Array.isArray(qrcode.value.teamFileds.baseInfo) ? qrcode.value.teamFileds.baseInfo : [] ); -const baseInfoError = computed(() => { - const requiredTitles = baseInfo.value - .map((i) => i.title); - return current.value && requiredTitles.some((i) => !current.value[i]); -}); +const baseInfoError = computed(() => current.value && baseInfo.value.some((i) => i.title && !current.value[i.title])); function fillBaseInfo() { if (canAuth.value) { @@ -179,13 +144,11 @@ function toHealthList() { if (canAuth.value) { toast("请先授权本服务团队"); } else { - const name = `${current.value.name} ${ - current.value.relationship ? `(${current.value.relationship})` : "" - }`; + const name = `${current.value.name} ${current.value.relationship ? `(${current.value.relationship})` : "" + }`; uni.navigateTo({ - url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${ - props.corpId - }&id=${current.value._id}&name=${encodeURIComponent(name)}`, + url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId + }&id=${current.value._id}&name=${encodeURIComponent(name)}`, }); } } diff --git a/pages/home/team-mate.vue b/pages/home/team-mate.vue index 3645836..16ef2c6 100644 --- a/pages/home/team-mate.vue +++ b/pages/home/team-mate.vue @@ -13,7 +13,7 @@ - + diff --git a/pages/message/components/consult-accept.vue b/pages/message/components/consult-accept.vue index c593baa..a32bec6 100644 --- a/pages/message/components/consult-accept.vue +++ b/pages/message/components/consult-accept.vue @@ -13,7 +13,6 @@ diff --git a/pages/team/friend.vue b/pages/team/friend.vue index c9551da..085a936 100644 --- a/pages/team/friend.vue +++ b/pages/team/friend.vue @@ -2,7 +2,7 @@ - + {{ member.anotherName }} diff --git a/pages/team/team-detail.vue b/pages/team/team-detail.vue index c780553..eaed240 100644 --- a/pages/team/team-detail.vue +++ b/pages/team/team-detail.vue @@ -20,7 +20,7 @@ - + {{ i.anotherName }} @@ -45,7 +45,7 @@ - + {{ i.anotherName }} @@ -83,7 +83,7 @@ const { memberJob, memberList: list } = useJob(); const memberList = computed(() => team.value && Array.isArray(team.value.memberList) ? team.value.memberList : []) -const avatarList = computed(() => memberList.value.map(i => i.avatar || '/static/default-avatar.svg').filter(Boolean)) +const avatarList = computed(() => memberList.value.map(i => i.avatar || '/static/default-avatar.png').filter(Boolean)) const teammate = computed(() => { const memberLeaderList = team.value && Array.isArray(team.value.memberLeaderList) ? team.value.memberLeaderList : []; diff --git a/static/service-qrcode.jpg b/static/service-qrcode.jpg new file mode 100644 index 0000000..52fe741 Binary files /dev/null and b/static/service-qrcode.jpg differ diff --git a/store/account.js b/store/account.js index 9441b40..34e0620 100644 --- a/store/account.js +++ b/store/account.js @@ -111,6 +111,8 @@ export default defineStore("accountStore", () => { const corpId = account.value?.corpId; const unionid = account.value?.unionid; const openid = account.value?.openid; + console.clear() + console.log('corpId', corpId, ',unionid', unionid, ',openid', openid) if (!(corpId && unionid && openid) || externalUserId.value) return; const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId }, false); if (res && res.success && typeof res.data === 'string' && res.data.trim()) { diff --git a/utils/conversation-merger.js b/utils/conversation-merger.js index 78aa260..186bf5a 100644 --- a/utils/conversation-merger.js +++ b/utils/conversation-merger.js @@ -144,7 +144,7 @@ function mergeConversationData(conversation, groupDetailsMap) { name: formatConversationName(groupDetail), // 更新头像(优先使用已有头像,避免闪动) - avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.svg' + avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.png' } } diff --git a/utils/tim-chat.js b/utils/tim-chat.js index 2571c51..80131f5 100644 --- a/utils/tim-chat.js +++ b/utils/tim-chat.js @@ -2625,7 +2625,7 @@ class TimChatManager { conversationID, groupID, name: patientName ? `${patientName}的问诊` : groupName || '问诊群聊', - avatar: '/static/default-avatar.svg', + avatar: '/static/default-avatar.png', lastMessage, lastMessageTime, unreadCount: conversation.unreadCount || 0, @@ -2638,7 +2638,7 @@ class TimChatManager { conversationID: conversation.conversationID, groupID: conversation.conversationID?.replace('GROUP', '') || '', name: '问诊群聊', - avatar: '/static/default-avatar.svg', + avatar: '/static/default-avatar.png', lastMessage: '暂无消息', lastMessageTime: Date.now(), unreadCount: 0,