fix: 问题修复

This commit is contained in:
huxuejian 2026-02-04 18:30:18 +08:00
parent b9385ebf02
commit 4a21b23133
8 changed files with 54 additions and 89 deletions

View File

@ -1,7 +1,7 @@
MP_API_BASE_URL=http://192.168.60.2:8080
MP_IMAGE_URL=https://patient.youcan365.com
MP_CACHE_PREFIX=development
MP_WX_APP_ID=wx93af55767423938e
MP_WX_APP_ID=wx1d8337a40c11d66c
MP_CORP_ID=wwe3fb2faa52cf9dfb
MP_TIM_SDK_APP_ID=1600123876
MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate

View File

@ -37,3 +37,6 @@ export const statusClassNames = {
cancelled: "text-gray",
expired: "text-gray",
}
export const titleList = ['主任医师', '副主任医师', '主治医师', '住院医师', '护士长', '主管护师', '护师', '护士', '技师', '其他']

View File

@ -93,6 +93,9 @@ function confirm() {
}
function toService() {
uni.navigateTo({
url: '/pages/work/service/contact-service'
})
close()
}

View File

@ -63,7 +63,7 @@ function remind() {
function toHome() {
uni.switchTab({
url: "/pages/work/work",
url: "/pages/home/work-home",
});
}

View File

@ -39,7 +39,7 @@ async function toJoinTeam(teamId) {
if (res && res.success) {
await toast('加入团队成功');
return uni.switchTab({
url: '/pages/work/work'
url: '/pages/home/work-home'
})
} else {
await toast(res?.message || '加入团队失败')

View File

@ -2,97 +2,53 @@
<full-page>
<view class="p-15">
<view class="bg-white px-10 mb-10 rounded">
<form-input
:form="formData"
:required="rule.anotherName.required"
wordLimit="10"
title="anotherName"
:name="rule.anotherName.name"
@change="onChange($event)"
/>
<form-input :form="formData" :required="rule.anotherName.required" wordLimit="10" title="anotherName"
:name="rule.anotherName.name" @change="onChange($event)" />
<common-cell title="avatar" name="头像">
<view
class="flex-grow flex items-center justify-end"
@click="chooseAvatar()"
>
<image
v-if="formData.avatar"
class="avatar mr-5 rounded-full"
:src="formData.avatar"
/>
<image
v-else
class="avatar mr-5 rounded-full"
src="/static/home/avatar.svg"
/>
<view class="flex-grow flex items-center justify-end" @click="chooseAvatar()">
<image v-if="formData.avatar" class="avatar mr-5 rounded-full" :src="formData.avatar" />
<image v-else class="avatar mr-5 rounded-full" src="/static/home/avatar.svg" />
<uni-icons color="#999" type="right" size="16" />
</view>
</common-cell>
<form-select
:form="formData"
name="性别"
title="gender"
:range="genderOptions"
@change="onChange($event)"
/>
<form-input
:form="formData"
disableChange
wordLimit="11"
title="mobile"
name="手机号 (不可修改)"
/>
<form-select :form="formData" name="性别" title="gender" :range="genderOptions" @change="onChange($event)" />
<form-input :form="formData" disableChange wordLimit="11" title="mobile" name="手机号 (不可修改)" />
</view>
<view class="bg-white px-10 mb-10 rounded">
<!-- 填写认证资料的时候岗位必填 -->
<common-cell
:required="type === 'cert'"
title="job"
:name="rule.job.name"
>
<view
class="flex-grow flex items-center justify-end"
@click="selectJob()"
>
<view v-if="jobStr" class="text-base text-base">{{ jobStr }}</view>
<!-- <view class="mr-5 rounded-full" style="width: 64rpx;height: 64rpx;background: red;"></view> -->
<uni-icons color="#999" type="right" size="16" />
</view>
</common-cell>
<common-cell title="title" :name="rule.title.name">
<common-cell :required="type === 'cert'" title="job" :name="rule.job.name">
<picker mode="selector" :disable="rule.job.disable" :range="jobOptions" range-key="name"
@change="changeJob($event)">
<view class="flex-grow flex items-center justify-end">
<!-- <view class="mr-5 rounded-full" style="width: 64rpx;height: 64rpx;background: red;"></view> -->
<view v-if="jobStr" class="text-base text-base">{{ jobStr }}</view>
<uni-icons color="#999" type="right" size="16" />
</view>
</picker>
</common-cell>
<common-cell title="jobName" :name="rule.jobName.name">
<picker mode="selector" :disable="rule.jobName.disable" :range="jobNameOptions"
@change="changeJobName($event)">
<view class="flex-grow flex items-center justify-end">
<view class="text-base text-base">{{ formData.jobName }}</view>
<uni-icons color="#999" type="right" size="16" />
</view>
</picker>
</common-cell>
<common-cell title="dept" :name="rule.dept.name">
<view class="flex-grow flex items-center justify-end">
<!-- <view class="mr-5 rounded-full" style="width: 64rpx;height: 64rpx;background: red;"></view> -->
<uni-icons color="#999" type="right" size="16" />
</view>
</common-cell>
</view>
<view class="bg-white rounded">
<form-textarea
autoHeight
:border="false"
:form="formData"
title="intro"
name="个人介绍"
:wordLimit="300"
@change="onChange($event)"
/>
<form-textarea autoHeight :border="false" :form="formData" title="memberTroduce" name="个人介绍" :wordLimit="300"
@change="onChange($event)" />
</view>
</view>
<template #footer>
<button-footer
:cancelText="cancelText"
:confirmText="confirmText"
@confirm="save()"
@cancel="back()"
/>
<button-footer :cancelText="cancelText" :confirmText="confirmText" @confirm="save()" @cancel="back()" />
</template>
</full-page>
</template>
@ -100,6 +56,7 @@
<script setup>
import { computed, ref } from "vue";
import { storeToRefs } from "pinia";
import { titleList } from "@/baseData";
import useGuard from "@/hooks/useGuard.js";
import useAccountStore from "@/store/account.js";
import api from "@/utils/api.js";
@ -118,6 +75,8 @@ const { useLoad, useShow } = useGuard();
const { getDoctorInfo } = useAccountStore();
const job = { assistant: "医生助理", doctor: "医生" };
const jobOptions = [{ name: '医生', value: 'doctor' }, { name: '医生助理', value: 'assistant' }, { name: '无', value: '' }];
const jobNameOptions = [...titleList, '无'];
const form = ref({});
const inviteTeamId = ref("");
@ -145,14 +104,14 @@ const rule = computed(() => {
return {
anotherName: { name: "姓名 (不可修改)", required: false, disabled: true },
job: { name: "岗位 (不可修改)", disabled: true },
title: { name: "职称 (不可修改)", disabled: true },
jobName: { name: "职称 (不可修改)", disabled: true },
dept: { name: "科室 (不可修改)", disabled: true },
};
}
return {
anotherName: { name: "姓名", required: true, disabled: false },
job: { name: "岗位", disabled: false },
title: { name: "职称", disabled: false },
jobName: { name: "职称", disabled: false },
dept: { name: "科室", disabled: false },
};
});
@ -183,7 +142,7 @@ function back() {
uni.navigateBack();
} else {
uni.switchTab({
url: "/pages/work/work",
url: "/pages/home/work-home",
});
}
}
@ -207,15 +166,14 @@ function onChange({ title, value }) {
form.value[title] = value;
}
function selectJob() {
if (rule.value.job.disabled) return;
uni.showActionSheet({
itemList: ["医生", "医生助理", "无"],
success: ({ tapIndex }) => {
const job = ["doctor", "assistant"][tapIndex];
form.value.job = job ? [job] : [];
},
});
function changeJob(e) {
const data = jobOptions[e.detail.value];
form.value.job = data.value;
}
function changeJobName(e) {
const data = titleList[e.detail.value];
form.value.jobName = data || '';
}
function toCert() {

View File

@ -5,7 +5,7 @@
柚康企微客服
</view>
<view class="flex justify-center overflow-hidden">
<uqrcode :canvas-id="`qrcode-${idx}`" value="https://uqrcode.cn/doc" :options="options"></uqrcode>
<uqrcode canvas-id="qrcode" value="暂无二维码" :options="options"></uqrcode>
</view>
<view class="mt-10 px-15 text-base text-dark leading-normal text-center">
扫码或长按添加柚康企微客服

View File

@ -18,7 +18,7 @@
成员: {{ i.memberList && i.memberList.length ? i.memberList.length : 0 }}
</view>
<view class="min-w-120 text-base text-dark">
患者: 200
患者: {{ i.customerCount }}
</view>
</view>
</view>
@ -61,13 +61,14 @@ function toDetail(team) {
}
async function getTeams() {
const res = await api('getJoinedTeams', { corpId: account.value?.corpId, mateId: doctorInfo.value?.userid });
const res = await api('getJoinedTeams', { corpId: account.value?.corpId, mateId: doctorInfo.value?.userid, countCustomer: 'YES' });
const arr = res && Array.isArray(res.data) ? res.data.map(i => ({
id: i._id,
teamId: i.teamId,
name: i.name,
memberList: i.memberList,
creator: i.creator
creator: i.creator,
customerCount: i.customerCount > 0 ? i.customerCount : 0
})) : [];
list.value = arr;
}