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/archive-result.vue b/pages/archive/archive-result.vue
index a6af733..152a4fd 100644
--- a/pages/archive/archive-result.vue
+++ b/pages/archive/archive-result.vue
@@ -43,10 +43,10 @@
-
+
- 点击识别下方二维码,加我为好友
+ 长按识别二维码,加我为好友
diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue
index aab9a26..1a27bb6 100644
--- a/pages/archive/edit-archive.vue
+++ b/pages/archive/edit-archive.vue
@@ -9,9 +9,8 @@
@change="change($event)" />
-
-
@@ -57,10 +56,7 @@ const verifyVisible = ref(false);
const visible = ref(false);
const formData = computed(() => {
- if (customerId.value) {
- return { ...customer.value, ...form.value }
- }
- return { ...customer.value, ...form.value, mobile: account.value?.mobile }
+ return { ...customer.value, ...form.value, mobile: account.value?.mobile }
});
function change({ title, value }) {
@@ -86,6 +82,46 @@ function confirm() {
}
}
+/**
+ * 产品要求, 建档页面:与联系人关系:默认选中“本人”,证件类型:默认选中“身份证”
+ */
+function preProcessFrom() {
+ const relationItem = formItems.value.find(item => item.title === 'relationship');
+ const range = relationItem && Array.isArray(relationItem.range) ? relationItem.range : [];
+ if (range.includes('本人')) {
+ form.value.relationship = '本人';
+ }
+ const cardTypeItem = formItems.value.find(item => item.title === 'cardType');
+ const cardTypeRange = cardTypeItem && Array.isArray(cardTypeItem.range) ? relationItem.range : [];
+ if (cardTypeRange.includes('身份证')) {
+ form.value.cardType = '身份证';
+ }
+}
+
+/**
+ * 产品要求, 编辑的情况下 姓名、身份证号、性别、年龄、出生年月
+ * 建档成功或者绑定档案成功后,姓名、身份证号、性别、年龄、出生年月。如果有内容的都不允许修改。没有内容的则允许编辑。
+ */
+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;
@@ -135,6 +171,10 @@ async function init() {
}
}
await getBaseForm();
+ if (!customerId.value) {
+ preProcessFrom()
+ }
+
}
async function getArchives() {
@@ -153,6 +193,11 @@ async function getBaseForm() {
const res = await api('getTeamBaseInfo', { corpId: corpId.value, teamId: teamId.value });
if (res && res.success) {
formItems.value = Array.isArray(res.data) ? res.data : [];
+ const mobileIndex = formItems.value.findIndex(item => item.title === 'mobile');
+ if (mobileIndex > -1) {
+ formItems.value[mobileIndex].appendText = `(授权手机号不可修改)`;
+ }
+
} else {
toast(res?.message || '查询失败');
return Promise.reject()
@@ -163,6 +208,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/article/article-list.vue b/pages/article/article-list.vue
index ed0c095..f38b23b 100644
--- a/pages/article/article-list.vue
+++ b/pages/article/article-list.vue
@@ -53,7 +53,7 @@
class="text-sm mr-2"
:class="item.status === 'UNREAD' ? 'text-red-500' : 'text-gray-400'"
>
- {{ item.status === 'UNREAD' ? '未阅读' : '已阅读' }}
+ {{ item.status === 'UNREAD' ? '未阅读' : '查看' }}
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 89ef64a..5016a14 100644
--- a/pages/home/customer-archive.vue
+++ b/pages/home/customer-archive.vue
@@ -36,19 +36,11 @@
-
+
-
+
{{ i.relationship }}
@@ -62,27 +54,18 @@
-
+
-
+
点击右侧授权按钮, 我们将更精准的为您服务
-
+
授权
@@ -92,32 +75,18 @@
个人基本信息
-
+
- 请完善您的个人信息
+ 请完善您的个人信息
完善个人信息
-
+
健康信息
-
+
上传健康档案
@@ -176,16 +145,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) {
@@ -201,13 +166,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/login/login.vue b/pages/login/login.vue
index e6b85c0..8cd5e68 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -14,7 +14,7 @@
柚健康
- 生命全周期健康管理伙伴
+ 全周期健康管理伙伴
@@ -216,12 +216,12 @@ onLoad((opts) => {
}
.doctor-card {
- height: 398rpx;
+ /* min-height: 300rpx; */
background: #fff;
border-radius: 24rpx;
background: linear-gradient(180deg, #dbe8ff 0%, #fff 50.25%);
box-shadow: 0 8rpx 32rpx rgba(59, 124, 255, 0.08);
- padding: 100rpx 24rpx 0rpx 24rpx;
+ padding: 100rpx 24rpx 60rpx 24rpx;
display: flex;
flex-direction: column;
align-items: center;
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..5681332 100644
--- a/pages/team/friend.vue
+++ b/pages/team/friend.vue
@@ -2,7 +2,7 @@
-
+
{{ member.anotherName }}
@@ -12,10 +12,10 @@
-
+
- 点击识别下方二维码,加我为好友
+ 长按识别二维码,加我为好友
diff --git a/pages/team/homepage.vue b/pages/team/homepage.vue
index 9e30862..0488e51 100644
--- a/pages/team/homepage.vue
+++ b/pages/team/homepage.vue
@@ -53,10 +53,10 @@
- 点击识别下方二维码,加我为好友
+ 长按识别下方二维码,加我为好友
-
+
@@ -99,9 +99,9 @@ const services = computed(() => {
})
function callNumber() {
- if (member.value && member.value.callNumber) {
+ if (member.value && member.value.externalContact) {
uni.makePhoneCall({
- phoneNumber: member.value.callNumber
+ phoneNumber: member.value.externalContact
})
}
}
diff --git a/pages/team/team-detail.vue b/pages/team/team-detail.vue
index c780553..b861d8c 100644
--- a/pages/team/team-detail.vue
+++ b/pages/team/team-detail.vue
@@ -11,7 +11,12 @@
-
+
+ 团队介绍
+
+
+
{{ team.teamTroduce }}
@@ -20,7 +25,7 @@
-
+
{{ i.anotherName }}
@@ -45,7 +50,7 @@
-
+
{{ i.anotherName }}
@@ -79,11 +84,12 @@ const corpId = ref('');
const teamId = ref('');
const team = ref(null);
const corpName = ref('');
+const showAllIntroduce = ref(false);
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 7f46c00..c43d123 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 74ae03f..45f723b 100644
--- a/utils/tim-chat.js
+++ b/utils/tim-chat.js
@@ -2626,7 +2626,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,
@@ -2639,7 +2639,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,
diff --git a/utils/useDebounce.js b/utils/useDebounce.js
index c04dc1b..d05a5f4 100644
--- a/utils/useDebounce.js
+++ b/utils/useDebounce.js
@@ -1,12 +1,11 @@
-export default function useDebounce(callback, delay = 1000) {
- let cd = false;
+export default function useDebounce(callback, delay = 500) {
+ let timer = null
return (...args) => {
- if (cd) return;
- cd = true;
- callback(...args);
- setTimeout(() => {
- cd = false;
+ if (timer) clearTimeout(timer);
+ timer = setTimeout(() => {
+ callback(...args);
+ timer = null;
}, delay);
}
}
\ No newline at end of file