diff --git a/.env.development b/.env.development index cce72c5..255b496 100644 --- a/.env.development +++ b/.env.development @@ -5,5 +5,6 @@ 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 +MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/' MP_SURVEY_URL= 'https://www.youcan365.com/surveyDev/#/pages/survey/survey' \ No newline at end of file diff --git a/.env.ip b/.env.ip index 22cd3e5..fa56a3e 100644 --- a/.env.ip +++ b/.env.ip @@ -5,5 +5,6 @@ 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 +MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/' MP_SURVEY_URL= 'https://www.youcan365.com/surveyDev/#/pages/survey/survey' diff --git a/.env.localhost b/.env.localhost index 3d46ace..25cc623 100644 --- a/.env.localhost +++ b/.env.localhost @@ -5,5 +5,6 @@ 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 +MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/' MP_SURVEY_URL= 'https://www.youcan365.com/surveyDev/#/pages/survey/survey' \ No newline at end of file diff --git a/pages/home/work-home.vue b/pages/home/work-home.vue index 2c8d760..eead162 100644 --- a/pages/home/work-home.vue +++ b/pages/home/work-home.vue @@ -34,7 +34,7 @@ - 邀请 + 邀请患者 diff --git a/pages/login/redirect-page.vue b/pages/login/redirect-page.vue index cbe9bd4..81338bb 100644 --- a/pages/login/redirect-page.vue +++ b/pages/login/redirect-page.vue @@ -61,8 +61,8 @@ useLoad(options => { acc[key] = value; return acc; }, {}) - if (data.type === 'inviteTeam') { - getTeam(data.teamId) + if (options.type === 'inviteTeam' || data.type === 'inviteTeam') { + getTeam(data.teamId || options.teamId) } }) diff --git a/pages/work/profile.vue b/pages/work/profile.vue index fc0a9bf..fd7b405 100644 --- a/pages/work/profile.vue +++ b/pages/work/profile.vue @@ -18,7 +18,7 @@ - {{ jobStr }} @@ -27,7 +27,7 @@ - + {{ formData.title }} @@ -97,23 +97,27 @@ const jobStr = computed(() => { return jobs[0] && job[jobs[0]] ? job[jobs[0]] : ""; }); const rule = computed(() => { - if ( - doctorInfo.value && - ["verified", "verifying"].includes(doctorInfo.value.verifyStatus) - ) { - return { - anotherName: { name: "姓名 (不可修改)", required: false, disabled: true }, - job: { name: "岗位 (不可修改)", disabled: true }, - title: { name: "职称 (不可修改)", disabled: true }, - dept: { name: "科室 (不可修改)", disabled: true }, - }; - } - return { + const data = { anotherName: { name: "姓名", required: true, disabled: false }, job: { name: "岗位", disabled: false }, title: { name: "职称", disabled: false }, dept: { name: "科室", disabled: false }, - }; + } + if (doctorInfo.value && ["verified", "verifying"].includes(doctorInfo.value.verifyStatus)) { + data.anotherName.name = "姓名 (不可修改)"; + data.anotherName.required = false; + data.anotherName.disabled = true; + + data.job.name = "岗位 (不可修改)"; + data.job.disabled = true; + + data.title.name = doctorInfo.value.verifyStatus === 'verified' ? "职称 (不可修改)" : "职称"; + data.title.disabled = doctorInfo.value.verifyStatus === 'verified'; + + data.dept.name = doctorInfo.value.verifyStatus === 'verified' ? "科室 (不可修改)" : "科室"; + data.dept.disabled = doctorInfo.value.verifyStatus === 'verified'; + } + return data }); const deptNames = computed(() => { const hlwDepts = formData.value.hlwDepts || []; @@ -126,20 +130,6 @@ const genderOptions = [ { label: "女", value: "1" }, ]; -// 打开科室选择 -const openDepartmentSelect = () => { - uni.navigateTo({ - url: "/pages/work/department-select", - events: { - deptSelected: ({ name, deptId }) => { - formData.value.department = name || ""; - formData.value.departmentName = name || ""; - formData.value.departmentId = deptId || ""; - }, - }, - }); -}; - function back() { const pages = getCurrentPages(); if (pages.length > 1) { @@ -172,7 +162,7 @@ function onChange({ title, value }) { function changeJob(e) { const data = jobOptions[e.detail.value]; - form.value.job = data.value; + form.value.job = [data.value]; } function changeTitle(e) { @@ -195,6 +185,7 @@ function toCert() { } function selectDept() { + if(rule.value.dept.disabled) return; const eventName = `selectDept_${Date.now()}` const deptIds = (formData.value.hlwDepts || []).map(i => i.deptId).filter(Boolean).join(',') uni.navigateTo({ diff --git a/pages/work/team/detail/team-detail.vue b/pages/work/team/detail/team-detail.vue index b7d2b20..1f07569 100644 --- a/pages/work/team/detail/team-detail.vue +++ b/pages/work/team/detail/team-detail.vue @@ -23,10 +23,10 @@ {{ i.anotherName }} - 创建人 - + --> 团队负责人 @@ -206,5 +206,4 @@ useShow(() => { overflow: hidden; } - \ No newline at end of file diff --git a/pages/work/team/invite/invite-patient.vue b/pages/work/team/invite/invite-patient.vue index 3b5b296..ad71337 100644 --- a/pages/work/team/invite/invite-patient.vue +++ b/pages/work/team/invite/invite-patient.vue @@ -68,6 +68,9 @@ import { getInvitePatientPoster } from './base-poster-data'; import emptyData from "@/components/empty-data.vue"; import renamePopup from "./rename-popup.vue"; +const env = __VITE_ENV__; +const inviteQrcode = env.MP_INVITE_PATIENT_QRCODE; + const options = { margin: 10 } const painterRef = ref() const poster = ref({}) @@ -99,7 +102,9 @@ async function getTeams() { id: i._id, teamId: i.teamId, name: i.name, - qrcode: i.qrcodes && i.qrcodes[0] && i.qrcodes[0].qrcode ? i.qrcodes[0].qrcode : '' + qrcode: `${inviteQrcode}?teamId=${i.teamId}&corpId=${i.corpId}` + // qrcode: i.qrcodes && i.qrcodes[0] && i.qrcodes[0].qrcode ? i.qrcodes[0].qrcode : '' + })) : []; if (teamId.value) { const idx = arr.findIndex(i => i.teamId === teamId.value); @@ -160,22 +165,6 @@ async function saveImage(action = 'save') { } } -// 分享到朋友圈 -function onShareTimeline() { - if (!team.value) { - return { - title: '邀请患者加入团队', - path: '/pages/work/team/invite/invite-patient' - }; - } - - return { - title: `邀请您加入${team.value.name}`, - query: `teamId=${team.value.teamId}`, - imageUrl: team.value.qrcode || '' - }; -} - onLoad(opts => { teamId.value = opts.teamId || ''; }) diff --git a/pages/work/team/invite/invite-teammate.vue b/pages/work/team/invite/invite-teammate.vue index bb6b4f8..73ad092 100644 --- a/pages/work/team/invite/invite-teammate.vue +++ b/pages/work/team/invite/invite-teammate.vue @@ -20,7 +20,7 @@ - + @@ -31,6 +31,7 @@