Merge commit 'cecb26e762fe652537571972fecca17a576e7cf1' into dev-wdb
This commit is contained in:
commit
91db27cca7
@ -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;
|
||||
|
||||
@ -43,10 +43,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-12 border-primary qrcode p-15 mx-auto rounded" @click="previewImage()">
|
||||
<image v-if="qrcode" class="h-full w-full" :src="qrcode"></image>
|
||||
<image v-if="qrcode" class="h-full w-full" :show-menu-by-longpress="true" :src="qrcode"></image>
|
||||
</view>
|
||||
<view class="mt-12 text-base text-center text-dark">
|
||||
点击识别下方二维码,加我为好友
|
||||
长按识别二维码,加我为好友
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -9,9 +9,8 @@
|
||||
@change="change($event)" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template #footer>
|
||||
<button-footer :showCancel="customerId" cancelText="删除" confirmText="保存" @cancel="unBindArchive()"
|
||||
<button-footer :showCancel="customerId ? true : false" cancelText="删除" confirmText="保存" @cancel="unBindArchive()"
|
||||
@confirm="confirm()" />
|
||||
</template>
|
||||
</full-page>
|
||||
@ -57,9 +56,6 @@ 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 }
|
||||
});
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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' ? '未阅读' : '查看' }}
|
||||
</text>
|
||||
<uni-icons type="right" size="14" :color="item.status === 'UNREAD' ? '#ef4444' : '#9ca3af'"></uni-icons>
|
||||
</view>
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -36,19 +36,11 @@
|
||||
</view>
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="flex flex-nowrap pb-5">
|
||||
<view
|
||||
v-for="i in customers"
|
||||
:key="i._id"
|
||||
class="customer-card flex-shrink-0 mr-15 relative"
|
||||
:class="current && i._id === current._id ? 'current-customer' : ''"
|
||||
@click="toggle(i)"
|
||||
>
|
||||
<view v-for="i in customers" :key="i._id" class="customer-card flex-shrink-0 mr-15 relative"
|
||||
:class="current && i._id === current._id ? 'current-customer' : ''" @click="toggle(i)">
|
||||
<!-- 关系标签 -->
|
||||
<view
|
||||
v-if="i.relationship"
|
||||
class="relationship-tag"
|
||||
:class="i.relationship === '本人' ? 'tag-blue' : 'tag-green'"
|
||||
>
|
||||
<view v-if="i.relationship" class="relationship-tag"
|
||||
:class="i.relationship === '本人' ? 'tag-blue' : 'tag-green'">
|
||||
{{ i.relationship }}
|
||||
</view>
|
||||
<view class="flex flex-col items-center">
|
||||
@ -62,27 +54,18 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选中状态底部条和三角 -->
|
||||
<view
|
||||
v-if="current && i._id === current._id"
|
||||
class="active-indicator"
|
||||
>
|
||||
<view v-if="current && i._id === current._id" class="active-indicator">
|
||||
<view class="active-bar"></view>
|
||||
<view class="active-triangle"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view
|
||||
v-if="canAuth"
|
||||
class="px-10 py-5 mt-5 flex items-center bg-danger rounded-sm"
|
||||
>
|
||||
<view v-if="canAuth" class="px-10 py-5 mt-5 flex items-center bg-danger rounded-sm">
|
||||
<view class="mr-5 w-0 flex-grow text-base text-white">
|
||||
点击右侧授权按钮, 我们将更精准的为您服务
|
||||
</view>
|
||||
<view
|
||||
class="px-12 py-5 text-base rounded-sm text-dark bg-white"
|
||||
@click="auth()"
|
||||
>
|
||||
<view class="px-12 py-5 text-base rounded-sm text-dark bg-white" @click="auth()">
|
||||
授权
|
||||
</view>
|
||||
</view>
|
||||
@ -92,32 +75,18 @@
|
||||
<view class="info-content">
|
||||
<view class="flex items-center justify-between mb-8">
|
||||
<view class="info-title">个人基本信息</view>
|
||||
<image
|
||||
class="arrow-icon-small"
|
||||
src="/static/home/arrow-right-blue.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image class="arrow-icon-small" src="/static/home/arrow-right-blue.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view v-if="baseInfoError" class="text-sm text-danger"
|
||||
>请完善您的个人信息</view
|
||||
>
|
||||
<view v-if="baseInfoError" class="text-sm text-danger">请完善您的个人信息</view>
|
||||
<view v-else class="info-subtitle">完善个人信息</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="hasHealthTemp"
|
||||
class="ml-10 info-card-new flex-grow"
|
||||
@click="toHealthList()"
|
||||
>
|
||||
<view v-if="hasHealthTemp" class="ml-10 info-card-new flex-grow" @click="toHealthList()">
|
||||
<view class="info-bg info-bg-health"></view>
|
||||
<view class="info-content">
|
||||
<view class="flex items-center justify-between mb-8">
|
||||
<view class="info-title">健康信息</view>
|
||||
<image
|
||||
class="arrow-icon-small"
|
||||
src="/static/home/arrow-right-blue.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image class="arrow-icon-small" src="/static/home/arrow-right-blue.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="info-subtitle">上传健康档案</view>
|
||||
</view>
|
||||
@ -181,11 +150,7 @@ const baseInfo = computed(() =>
|
||||
? 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,12 +166,10 @@ 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
|
||||
url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId
|
||||
}&id=${current.value._id}&name=${encodeURIComponent(name)}`,
|
||||
});
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<view v-for="i in teamates" :key="i.userid"
|
||||
class="member-card flex flex-shrink-0 min-w-120 mr-15 p-15"
|
||||
@click="toHomePage(i)">
|
||||
<image class="flex-shrink-0 avatar mr-10" :src="i.avatar || '/static/default-avatar.svg'" />
|
||||
<image class="flex-shrink-0 avatar mr-10" :src="i.avatar || '/static/default-avatar.png'" />
|
||||
<view class="flex-grow flex flex-col justify-between">
|
||||
<view>
|
||||
<view class="member-name leading-normal h-24 text-base font-semibold text-dark whitespace-nowrap">
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<view class="doctor-info">
|
||||
<image class="logo" src="/static/logo-plain.png" mode="aspectFill" />
|
||||
<view class="doctor-name">柚健康</view>
|
||||
<view class="login-tip">生命全周期健康管理伙伴</view>
|
||||
<view class="login-tip">全周期健康管理伙伴</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="team" class="doctor-avatar">
|
||||
@ -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;
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const emit = defineEmits(['accept', 'reject']);
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const emit = defineEmits(['apply']);
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const emit = defineEmits(['cancel']);
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ export default function useGroupAvatars() {
|
||||
const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] }
|
||||
const teamStore = useTeamStore()
|
||||
const patientDefaultAvatar = '/static/default-patient-avatar.png'
|
||||
const teamMemberDefaultAvatar = '/static/default-avatar.svg'
|
||||
const teamMemberDefaultAvatar = '/static/default-avatar.png'
|
||||
|
||||
/**
|
||||
* 获取单个群聊的头像列表
|
||||
|
||||
@ -49,8 +49,8 @@ export default function useGroupChat(groupID) {
|
||||
if (!member) {
|
||||
// 如果找不到成员信息,根据是否为团队成员返回默认头像
|
||||
// 患者(userId为当前账户openid)使用 default-patient-avatar.png
|
||||
// 其他情况使用 default-avatar.svg
|
||||
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.svg'
|
||||
// 其他情况使用 default-avatar.png
|
||||
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.png'
|
||||
}
|
||||
|
||||
// 如果有头像且不为空字符串,返回头像
|
||||
@ -59,8 +59,8 @@ export default function useGroupChat(groupID) {
|
||||
}
|
||||
|
||||
// 否则根据是否为团队成员返回默认头像
|
||||
// 患者使用 default-patient-avatar.png,团队成员使用 default-avatar.svg
|
||||
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
|
||||
// 患者使用 default-patient-avatar.png,团队成员使用 default-avatar.png
|
||||
return member.isTeamMember ? '/static/default-avatar.png' : '/static/default-patient-avatar.png'
|
||||
}
|
||||
|
||||
// 获取群聊信息和成员头像
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-center h-full bg-white">
|
||||
<view>
|
||||
<view class="flex flex-col justify-center items-center h-full bg-white">
|
||||
<image class="service-qrcode" :show-menu-by-longpress="true" src="/static/service-qrcode.jpg" />
|
||||
<!-- <view>
|
||||
<view class="mb-10 text-dark text-lg font-semibold text-center mb-10">
|
||||
柚康企微客服
|
||||
</view>
|
||||
@ -13,7 +14,7 @@
|
||||
<view class="mt-10 px-15 text-base text-dark leading-normal text-center">
|
||||
我们将为您提供软件使用咨询服务,并支持补充病历、宣教、问卷、回访等多种工作模板。
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -22,5 +23,8 @@ const options = { margin: 10 }
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Using global styles from App.vue */
|
||||
.service-qrcode {
|
||||
width: 750rpx;
|
||||
height: 977rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view v-if="member" class="flex flex-col h-full items-center justify-center">
|
||||
<view class="business-card">
|
||||
<view class="flex">
|
||||
<image class="mr-10 avatar" :src="member.avatar || '/static/default-avatar.svg'"></image>
|
||||
<image class="mr-10 avatar" :src="member.avatar || '/static/default-avatar.png'"></image>
|
||||
<view class="w-0 flex-grow leading-normal">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-5 text-lg font-semibold text-dark">{{ member.anotherName }}</view>
|
||||
@ -12,10 +12,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-12 border-primary qrcode p-15 mx-auto rounded" @click="previewImage()">
|
||||
<image v-if="qrcode" class="h-full w-full" :src="qrcode"></image>
|
||||
<image v-if="qrcode" class="h-full w-full" :show-menu-by-longpress="true" :src="qrcode"></image>
|
||||
</view>
|
||||
<view class="mt-12 text-base text-center text-dark">
|
||||
点击识别下方二维码,加我为好友
|
||||
长按识别二维码,加我为好友
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -53,10 +53,10 @@
|
||||
</view>
|
||||
<view v-if="qrcode" class="p-15 mt-12 leading-normal bg-white shadow-lg">
|
||||
<view class="text-lg font-semibold text-center text-dark">
|
||||
点击识别下方二维码,加我为好友
|
||||
长按识别下方二维码,加我为好友
|
||||
</view>
|
||||
<view class="mt-12 border-primary qrcode p-15 mx-auto rounded" @click="previewImage()">
|
||||
<image :src="qrcode" class="h-full w-full"></image>
|
||||
<image :src="qrcode" :show-menu-by-longpress="true" class="h-full w-full"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="safe-bottom-padding"></view>
|
||||
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="team.teamTroduce" class="mt-12 text-base text-dark leading-normal break-all pre-wrap">
|
||||
<view class="flex items-center justify-between mt-12" @click="showAllIntroduce = !showAllIntroduce">
|
||||
<view class="text-dark font-semibold">团队介绍</view>
|
||||
<uni-icons :type="showAllIntroduce ? 'up' : 'down'" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view v-if="team.teamTroduce" class="mt-10 text-base text-dark leading-normal break-all pre-wrap"
|
||||
:class="showAllIntroduce ? '' : 'line-clamp-2'" @click="showAllIntroduce = !showAllIntroduce">
|
||||
{{ team.teamTroduce }}
|
||||
</view>
|
||||
<template v-if="teammate.leaders.length">
|
||||
@ -20,7 +25,7 @@
|
||||
</view>
|
||||
<view v-for="i in teammate.leaders" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm"
|
||||
@click="toHomePage(i.userid)">
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'"></image>
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'"></image>
|
||||
<view class="w-0 flex-grow leading-normal">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view>
|
||||
@ -45,7 +50,7 @@
|
||||
</view>
|
||||
<view v-for="i in teammate.members" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm"
|
||||
@click="toHomePage(i.userid)">
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'"></image>
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'"></image>
|
||||
<view class="w-0 flex-grow leading-normal">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view>
|
||||
@ -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 : [];
|
||||
|
||||
BIN
static/service-qrcode.jpg
Normal file
BIN
static/service-qrcode.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@ -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()) {
|
||||
|
||||
@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
if (timer) clearTimeout(timer);
|
||||
timer = setTimeout(() => {
|
||||
callback(...args);
|
||||
setTimeout(() => {
|
||||
cd = false;
|
||||
timer = null;
|
||||
}, delay);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user