From 96fcbe49808619cc3f931ad2e5e1fdce98c705a2 Mon Sep 17 00:00:00 2001 From: kola-web Date: Wed, 6 Nov 2024 18:05:40 +0800 Subject: [PATCH] =?UTF-8?q?bug=E5=A4=84=E7=90=86=20&=20=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=81=94=E8=B0=83=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/doctorAvatar/index.wxml | 16 ++- src/echart/components/homeLevel1/index.scss | 2 +- src/echart/components/homeLevel2/index.scss | 2 +- src/echart/components/homeLevel3/index.scss | 2 +- src/echart/components/homeLevel4/index.scss | 2 +- src/module1/pages/casesDetail/index.scss | 11 +- src/module1/pages/casesDetail/index.ts | 12 +-- src/module1/pages/casesDetail/index.wxml | 11 +- src/module1/pages/casesFeedback/index.ts | 6 +- src/module1/pages/changePhone/index.ts | 78 +++++++------- src/module1/pages/entryCases/index.ts | 25 +++-- src/module1/pages/entryCasesResult/index.wxml | 2 +- src/module1/pages/invite/index.json | 5 +- src/module1/pages/invite/index.scss | 7 +- src/module1/pages/invite/index.ts | 51 ++++++++- src/module1/pages/invite/index.wxml | 26 +++-- src/module1/pages/login/index.ts | 12 ++- src/module1/pages/loginProtool/index.ts | 12 ++- src/module1/pages/loginProtool/index.wxml | 5 +- src/module1/pages/setCaseDoctor/index.ts | 10 +- src/module1/pages/userInfo/index.scss | 66 +++++++++++- src/module1/pages/userInfo/index.ts | 145 +++++++++++++++++++++++++- src/module1/pages/userInfo/index.wxml | 88 +++++++++------- src/pages/cases/index.scss | 3 + src/pages/cases/index.wxml | 2 +- src/pages/my/index.scss | 2 +- src/pages/my/index.ts | 29 +++++- src/pages/my/index.wxml | 34 +++--- 28 files changed, 493 insertions(+), 173 deletions(-) diff --git a/src/components/doctorAvatar/index.wxml b/src/components/doctorAvatar/index.wxml index a4d14d8..20f3df3 100644 --- a/src/components/doctorAvatar/index.wxml +++ b/src/components/doctorAvatar/index.wxml @@ -1,5 +1,15 @@ - - - + + + diff --git a/src/echart/components/homeLevel1/index.scss b/src/echart/components/homeLevel1/index.scss index ba0b200..10cd45d 100644 --- a/src/echart/components/homeLevel1/index.scss +++ b/src/echart/components/homeLevel1/index.scss @@ -43,7 +43,7 @@ .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; diff --git a/src/echart/components/homeLevel2/index.scss b/src/echart/components/homeLevel2/index.scss index 29fbb6d..95a11b6 100644 --- a/src/echart/components/homeLevel2/index.scss +++ b/src/echart/components/homeLevel2/index.scss @@ -63,7 +63,7 @@ .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; diff --git a/src/echart/components/homeLevel3/index.scss b/src/echart/components/homeLevel3/index.scss index e60a5af..d1dcf8b 100644 --- a/src/echart/components/homeLevel3/index.scss +++ b/src/echart/components/homeLevel3/index.scss @@ -63,7 +63,7 @@ .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; diff --git a/src/echart/components/homeLevel4/index.scss b/src/echart/components/homeLevel4/index.scss index 4039b04..e91d99f 100644 --- a/src/echart/components/homeLevel4/index.scss +++ b/src/echart/components/homeLevel4/index.scss @@ -63,7 +63,7 @@ .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; diff --git a/src/module1/pages/casesDetail/index.scss b/src/module1/pages/casesDetail/index.scss index daf00bc..977e9b5 100644 --- a/src/module1/pages/casesDetail/index.scss +++ b/src/module1/pages/casesDetail/index.scss @@ -55,6 +55,9 @@ page { &.status3 { color: rgba(153, 153, 153, 1); } + &.status4 { + color: #54e2b4; + } } } .fold { @@ -162,7 +165,7 @@ page { .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; @@ -331,7 +334,7 @@ page { position: relative; border-radius: 16rpx 16rpx 16rpx 16rpx; border: 2rpx solid #ffffff; - background-color: #fffdfd; + background:#fffdfd linear-gradient(to bottom, #e5f5f7 0%, #ffffff 100%) no-repeat top center/100% 200rpx; .li-options { margin-bottom: -32rpx; display: flex; @@ -496,13 +499,13 @@ page { .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; background-color: rgba(250, 229, 206, 1); } - .specialty{ + .specialty { margin-top: 14rpx; display: flex; gap: 12rpx; diff --git a/src/module1/pages/casesDetail/index.ts b/src/module1/pages/casesDetail/index.ts index eb19a16..26a72fc 100644 --- a/src/module1/pages/casesDetail/index.ts +++ b/src/module1/pages/casesDetail/index.ts @@ -45,12 +45,6 @@ Page({ fold: false, }, onLoad(options) { - if (options.feedback === "1") { - wx.showToast({ - icon: "none", - title: "病历反馈成功!", - }); - } this.setData({ id: options.id, beforeClose1: (e: any) => { @@ -202,6 +196,7 @@ Page({ handleShowRejectReason() { this.setData({ showRejectReason: !this.data.showRejectReason, + moreShow: false, }); }, @@ -241,7 +236,7 @@ Page({ const labelIds = this.data.labelIds; const newLabelId = labelIds.includes(params.value) ? labelIds.filter((item: any) => item !== params.value) - : [...labelIds, ...params.value]; + : [...labelIds, params.value]; this.setData({ labelIds: newLabelId, }); @@ -346,6 +341,7 @@ Page({ handleToggleMore() { this.setData({ moreShow: !this.data.moreShow, + showRejectReason: false, }); }, @@ -540,7 +536,7 @@ Page({ }, handleRoom() { wx.navigateTo({ - url: `/module1/pages/chatRoom/index?id=${this.data.id}`, + url: `/module1/pages/chatRoom/index?id=${this.data.detail.roomId}`, }); }, handleCreateRoomInvite() { diff --git a/src/module1/pages/casesDetail/index.wxml b/src/module1/pages/casesDetail/index.wxml index 841e924..3871725 100644 --- a/src/module1/pages/casesDetail/index.wxml +++ b/src/module1/pages/casesDetail/index.wxml @@ -7,7 +7,7 @@ {{detail.caseStatusName}} {{detail.caseStatusName}} {{detail.caseStatusName}} - {{detail.caseStatusName}} + {{detail.caseStatusName}} 已公开 @@ -149,7 +149,7 @@ {{item.createDoctorInfo.cityName}}{{item.createDoctorInfo.countyName?'/':''}}{{item.createDoctorInfo.countyName}} - + - + {{item.SpecialtyName}} @@ -466,19 +466,18 @@ use-slot title="" show="{{ show6 }}" - bind:close="onClose" show-confirm-button="{{false}}" confirm-button-color="rgba(0, 180, 197, 1)" > - + 确认创建聊天室 邀约并创建 您可邀约一位您的合作医生讨论病历 直接创建 - 取消 + 取消 diff --git a/src/module1/pages/casesFeedback/index.ts b/src/module1/pages/casesFeedback/index.ts index 7c73c1c..a36e59e 100644 --- a/src/module1/pages/casesFeedback/index.ts +++ b/src/module1/pages/casesFeedback/index.ts @@ -213,9 +213,9 @@ Page({ caseId, isOpen, }, - }).then(() => { - wx.redirectTo({ - url: `/module1/pages/casesDetail/index?id=${caseId}&feedback=1`, + }).then((res) => { + wx.reLaunch({ + url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`, }); }); }, diff --git a/src/module1/pages/changePhone/index.ts b/src/module1/pages/changePhone/index.ts index c57e9e6..d8edcc5 100644 --- a/src/module1/pages/changePhone/index.ts +++ b/src/module1/pages/changePhone/index.ts @@ -1,77 +1,73 @@ -const app = getApp() -let timer = null as null | number +const app = getApp(); +let timer = null as null | number; Page({ data: { - mobile: '', - code: '', + mobile: "", + code: "", - codeText: '发送验证码', + codeText: "发送验证码", }, onLoad() {}, getCode() { - if (timer) return - const mobile = this.data.mobile + if (timer) return; + const mobile = this.data.mobile; if (!mobile) { wx.showToast({ - title: '手机号不能为空', - icon: 'none', - }) - return + title: "手机号不能为空", + icon: "none", + }); + return; } // 验证手机号 if (!/^(13\d|14[579]|15[0-3,5-9]|166|17[0135-8]|18\d|19[89])\d{8}$/.test(mobile)) { wx.showToast({ - title: '手机号格式不正确', - icon: 'none', - }) - return + title: "手机号格式不正确", + icon: "none", + }); + return; } wx.ajax({ - method: 'POST', - url: '?r=zd/login/send-verify-code', + method: "POST", + url: "?r=takeda/login/send-verify-code", data: { mobile, }, - }).then((res) => { + }).then(() => { wx.showToast({ - icon: 'none', - title: '验证码已发送~', - }) - let time = 60 + icon: "none", + title: "验证码已发送~", + }); + let time = 60; timer = setInterval(() => { - time-- + time--; this.setData({ codeText: `${time}s后重新发送`, - }) + }); if (time <= 0) { - clearInterval(timer as number) - timer = null + clearInterval(timer as number); + timer = null; this.setData({ - codeText: '发送验证码', - }) + codeText: "发送验证码", + }); } - }, 1000) - }) + }, 1000); + }); }, handleSubmit() { - const { mobile, code } = this.data - const { registrationSource, registChannel, regBusinessId } = app.globalData + const { mobile, code } = this.data; wx.ajax({ - method: 'POST', - url: '?r=zd/account/update-telephone', + method: "POST", + url: "?r=takeda/account/update-telephone", data: { mobile, code, - registrationSource, - registChannel, - regBusinessId, }, }).then((_res) => { - wx.navigateBack() - }) + wx.navigateBack(); + }); }, handleBack() { - wx.navigateBack() + wx.navigateBack(); }, -}) +}); diff --git a/src/module1/pages/entryCases/index.ts b/src/module1/pages/entryCases/index.ts index a1cadbe..df0c368 100644 --- a/src/module1/pages/entryCases/index.ts +++ b/src/module1/pages/entryCases/index.ts @@ -25,15 +25,15 @@ Page({ edit: true, }, onLoad(options) { - app.waitLogin().then(() => { + app.waitLogin().then(async () => { this.getVisit(); - this.getDoctorDict(); this.getInviteDoctorList(); app.getUserInfo(this, (res) => { this.setData({ DoctorLevel: res.DoctorLevel, }); }); + await this.getDoctorDict(); if (options.id) { this.setData({ caseId: options.id, @@ -75,19 +75,22 @@ Page({ files: res.caseFiles, deptId: res.caseDeptId[0] || "", labelIds: res.caseLabels.map((item) => item.labelId), + labelList: this.data.deptList.find((item) => item.value === res.caseDeptId[0])?.options || [], }); }); }, getDoctorDict() { - wx.ajax({ - method: "GET", - url: "?r=takeda/reg/doctor-dict", - data: {}, - }).then((res) => { - this.setData({ - deptList: res.DoctorSpecialtyLabel, + return wx + .ajax({ + method: "GET", + url: "?r=takeda/reg/doctor-dict", + data: {}, + }) + .then((res) => { + this.setData({ + deptList: res.DoctorSpecialtyLabel, + }); }); - }); }, getInviteDoctorList() { wx.ajax({ @@ -248,7 +251,7 @@ Page({ const labelIds = this.data.labelIds; const newLabelId = labelIds.includes(params.value) ? labelIds.filter((item: any) => item !== params.value) - : [...labelIds, ...params.value]; + : [...labelIds, params.value]; this.setData({ labelIds: newLabelId, }); diff --git a/src/module1/pages/entryCasesResult/index.wxml b/src/module1/pages/entryCasesResult/index.wxml index a31a867..683a45b 100644 --- a/src/module1/pages/entryCasesResult/index.wxml +++ b/src/module1/pages/entryCasesResult/index.wxml @@ -4,6 +4,6 @@ 病历提交后医生将收到消息提醒 查看病历详情 返回病历列表 - + 关注公众号接收病历反馈消息 diff --git a/src/module1/pages/invite/index.json b/src/module1/pages/invite/index.json index a97367d..d672488 100644 --- a/src/module1/pages/invite/index.json +++ b/src/module1/pages/invite/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "van-nav-bar": "@vant/weapp/nav-bar/index", + "van-icon": "@vant/weapp/icon/index" + } } diff --git a/src/module1/pages/invite/index.scss b/src/module1/pages/invite/index.scss index a12fdc6..264a38a 100644 --- a/src/module1/pages/invite/index.scss +++ b/src/module1/pages/invite/index.scss @@ -1,3 +1,8 @@ +.van-hairline--bottom { + &::after { + border: none; + } +} .page { padding: 0 32rpx 200rpx; .title { @@ -6,7 +11,7 @@ height: 250rpx; } .container-wrap { - margin: 140rpx 30rpx 0; + margin: 100rpx 30rpx 0; padding: 12rpx; border-radius: 48rpx 48rpx 48rpx 48rpx; border: 2rpx solid #ffffff; diff --git a/src/module1/pages/invite/index.ts b/src/module1/pages/invite/index.ts index f77c697..5ac7c11 100644 --- a/src/module1/pages/invite/index.ts +++ b/src/module1/pages/invite/index.ts @@ -1,8 +1,53 @@ -const app = getApp() +const app = getApp(); Page({ data: { menuButtonInfo: {}, + userInfo: {}, + DoctorTitleType: {}, + codeUrl: "", }, - onLoad() {}, -}) + onLoad() { + app.waitLogin().then(() => { + app.getUserInfo(this); + this.getDoctorDict(); + const { url, loginState } = app.globalData; + this.setData({ + codeUrl: `${url}?r=takeda/account/mp-info&loginState=${loginState}`, + }); + }); + }, + getDoctorDict() { + wx.ajax({ + method: "GET", + url: "?r=takeda/reg/doctor-dict", + data: {}, + }).then((res) => { + this.setData({ + DoctorTitleType: res.DoctorTitleType, + }); + }); + }, + handleSave() { + const { codeUrl } = this.data; + wx.downloadFile({ + url: codeUrl, + success: (res) => { + wx.showShareImageMenu({ + path: res.tempFilePath, + }); + }, + }); + }, + handleShare(){ + wx.showToast({ + icon:"none", + title:"请长按图片转发给好友", + }) + }, + handleBack(){ + wx.navigateBack() + } +}); + +export {}; diff --git a/src/module1/pages/invite/index.wxml b/src/module1/pages/invite/index.wxml index 310a1e1..677497f 100644 --- a/src/module1/pages/invite/index.wxml +++ b/src/module1/pages/invite/index.wxml @@ -1,3 +1,6 @@ + + + - + - 徐萌 - 主任医师 + {{userInfo.Name}} + {{userInfo.OtherTitle}} + {{DoctorTitleType[userInfo.TitleType]}} - 北京天坛医院 - 三甲 + {{userInfo.HospitalName}} + {{userInfo.HospitalClassificationName}}{{userInfo.HospitalName}} - + 扫码进入 - 保存到手机 - + 保存到手机 + diff --git a/src/module1/pages/login/index.ts b/src/module1/pages/login/index.ts index 71620a9..237e4d3 100644 --- a/src/module1/pages/login/index.ts +++ b/src/module1/pages/login/index.ts @@ -8,8 +8,13 @@ Page({ code: "", protool: false, codeText: "发送验证码", + isProtocol: false, + }, + onLoad() { + if(!this.data.isProtocol){ + this.handleNavProtool() + } }, - onLoad() {}, getCode() { if (timer) return; const mobile = this.data.mobile; @@ -58,7 +63,10 @@ Page({ handleSubmit() { const { mobile, code, protool } = this.data; if (!protool) { - this.handleNavProtool() + wx.showToast({ + title: "请先勾选协议", + icon: "none", + }); return; } if (!mobile) { diff --git a/src/module1/pages/loginProtool/index.ts b/src/module1/pages/loginProtool/index.ts index 7b2b8da..eb324ca 100644 --- a/src/module1/pages/loginProtool/index.ts +++ b/src/module1/pages/loginProtool/index.ts @@ -2,8 +2,13 @@ Page({ data: { menuButtonInfo: {}, wait: true, + ismy: false, + }, + onLoad(options) { + this.setData({ + ismy: options.ismy === "1", + }); }, - onLoad() {}, handleScrollToLower(e) { if (e.detail.direction === "bottom") { this.setData({ @@ -16,6 +21,7 @@ Page({ const prevPage = pages[pages.length - 2]; prevPage.setData({ protool: false, + isProtocol: true, }); wx.navigateBack(); }, @@ -24,9 +30,13 @@ Page({ const prevPage = pages[pages.length - 2]; prevPage.setData({ protool: true, + isProtocol: true, }); wx.navigateBack(); }, + handleBack() { + wx.navigateBack(); + }, }); export {}; diff --git a/src/module1/pages/loginProtool/index.wxml b/src/module1/pages/loginProtool/index.wxml index 5663768..76d2d3a 100644 --- a/src/module1/pages/loginProtool/index.wxml +++ b/src/module1/pages/loginProtool/index.wxml @@ -48,7 +48,10 @@ sit vitae, reprehenderit laudantium veniam corporis quisquam quas fugiat. Beatae molestias quos unde neque et, similique cumque. - + + 关闭 + + 不同意 请上滑阅读完成 同意 diff --git a/src/module1/pages/setCaseDoctor/index.ts b/src/module1/pages/setCaseDoctor/index.ts index 0488116..6db356f 100644 --- a/src/module1/pages/setCaseDoctor/index.ts +++ b/src/module1/pages/setCaseDoctor/index.ts @@ -163,7 +163,7 @@ Page({ }, handlePopupDetail(e) { const { index } = e.currentTarget.dataset; - const { list, hospitalClassification } = this.data; + const { list } = this.data; const item: any = list[index]; this.setData({ showDetail: true, @@ -173,7 +173,7 @@ Page({ DoctorName: item.doctorName, DoctorTitleName: item.doctorTitleName || item.doctorOtherTitle, HospitalName: item.hospitalName, - HospitalClassificationName: hospitalClassification[item.HospitalClassification], + HospitalClassificationName: item.hospitalClassificationName, HospitalLevelName: item.hospitalLevelName, CityName: item.cityName, CountyName: item.countyName, @@ -260,9 +260,9 @@ Page({ dealDoctorId: DoctorId, ...params, }, - }).then(() => { - wx.redirectTo({ - url: `/module1/pages/casesDetail/index?id=${caseId}&feedback=1`, + }).then((res) => { + wx.reLaunch({ + url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`, }); }); return; diff --git a/src/module1/pages/userInfo/index.scss b/src/module1/pages/userInfo/index.scss index c6feb73..447069f 100644 --- a/src/module1/pages/userInfo/index.scss +++ b/src/module1/pages/userInfo/index.scss @@ -73,7 +73,71 @@ page { } } -.popup-brief { + +.popup1 { + padding: 32rpx 30rpx 84rpx; + .title { + display: flex; + justify-content: center; + font-size: 36rpx; + color: rgba(40, 48, 49, 1); + font-weight: bold; + } + .textarea { + padding: 30rpx; + margin-top: 32rpx; + width: 100%; + height: 216rpx; + box-sizing: border-box; + background: #f7f8f9; + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #f8f9f9; + font-size: 32rx; + } + .sub-title { + padding: 32rpx 0 16rpx; + font-size: 32rpx; + color: #141515; + } + .tags { + display: flex; + flex-wrap: wrap; + gap: 20rpx; + .tag { + padding: 6rpx 44rpx; + font-size: 32rpx; + color: rgba(133, 133, 133, 1); + line-height: 44rpx; + background-color: #fff; + border: 1px solid #f6f6f6; + border-radius: 8rpx; + background: #f6f6f6; + &.active { + background-color: #fff; + border-color: rgba(1, 180, 197, 1); + color: rgba(1, 180, 197, 1); + } + } + &.tags1 { + .tag { + border-radius: 90rpx; + } + } + } + .submit { + margin-top: 32rpx; + height: 84rpx; + display: flex; + justify-content: center; + align-items: center; + background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); + font-size: 36rpx; + color: #fff; + border-radius: 64rpx 64rpx 64rpx 64rpx; + } +} + +.popup2 { padding: 32rpx 30rpx 84rpx; .title { display: flex; diff --git a/src/module1/pages/userInfo/index.ts b/src/module1/pages/userInfo/index.ts index 5a8bf2a..c18c967 100644 --- a/src/module1/pages/userInfo/index.ts +++ b/src/module1/pages/userInfo/index.ts @@ -1,11 +1,144 @@ -const _app = getApp(); +const app = getApp(); Page({ data: { - popupBriefShow: false, - popupSpecialtyShow: false, + show1: false, + show2: false, + + userInfo: {}, + DepartmentName: "", + + deptList: [] as any, + labelList: [] as any, + + Img: "", + Name: "", + DepartmentId: [], + SpecialtyId: [], + Introduce: "", + }, + onShow() { + app.waitLogin().then(() => { + this.getUserInfo(); + this.getDoctorDict(); + }); + }, + getUserInfo() { + app.getUserInfo(this, (userInfo) => { + userInfo.encryptionTel = userInfo.Telephone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2"); + this.setData({ + userInfo, + Img: userInfo.Img, + Name: userInfo.Name, + Introduce: userInfo.Introduce, + DepartmentId: userInfo.DepartmentId, + SpecialtyId: userInfo.SpecialtyId, + DepartmentName: userInfo.Department.reduce((pre, cur) => { + return `${pre}${pre ? "," : ""}${cur.DepartmentName}`; + }, ""), + SpecialtyName: userInfo.Specialty.reduce((pre, cur) => { + return `${pre}${pre ? "," : ""}${cur.SpecialtyName}`; + }, ""), + }); + }); + }, + getDoctorDict() { + wx.ajax({ + method: "GET", + url: "?r=takeda/reg/doctor-dict", + data: {}, + }).then((res) => { + this.setData({ + deptList: res.DoctorSpecialtyLabel, + }); + }); + }, + handleFile(e) { + this.setData({ + Img: e.detail.imgUrl, + }); + this.handleSubmit(); + }, + handleShowDept() { + this.setData({ + show1: true, + }); + }, + handleDept(e) { + const { params } = e.currentTarget.dataset; + const DepartmentId = this.data.DepartmentId; + const newDeptId: any = DepartmentId.includes(params.value) + ? DepartmentId.filter((item) => item !== params.value) + : [...DepartmentId, params.value]; + const newDeptName = this.data.deptList + .filter((item) => newDeptId.includes(item.value)) + .map((item) => item.label) + .join(","); + const labelList = this.data.deptList + .filter((item) => newDeptId.includes(item.value)) + .reduce((pre, cur) => { + return [...pre, ...cur.options]; + }, []); + this.setData({ + DepartmentId: newDeptId, + deptName: newDeptName || "全部", + labelList, + SpecialtyId: [], + }); + }, + handleLabel(e) { + const { params } = e.currentTarget.dataset; + const { SpecialtyId, labelList } = this.data; + const newLabelId = SpecialtyId.includes(params.value) + ? SpecialtyId.filter((item) => item !== params.value) + : [...SpecialtyId, params.value]; + let labelName = ""; + labelList.forEach((item) => { + if (newLabelId.includes(item.value)) { + labelName = `${labelName}${labelName ? "," : ""}${item.label}`; + } + }); + + this.setData({ + SpecialtyId: newLabelId, + labelName: labelName || "全部", + }); + }, + handleIntroduce() { + this.setData({ + show2: true, + }); + }, + onClose() { + this.setData({ + show1: false, + show2: false, + }); + }, + handleSubmit() { + const { Img, Name, Introduce, DepartmentId, SpecialtyId } = this.data; + if (DepartmentId.length && !SpecialtyId.length) { + wx.showToast({ + title: "请选择标签", + icon: "none", + }); + return; + } + wx.ajax({ + method: "POST", + url: "?r=takeda/doctor/update-info", + data: { + Img, + Name, + Introduce, + DepartmentId, + SpecialtyId, + }, + }).then(() => { + this.getUserInfo(); + }); + this.onClose(); }, - onLoad() {}, changePhone() { wx.navigateTo({ url: "/module1/pages/changePhone/index", @@ -26,7 +159,7 @@ Page({ wx.ajax({ method: "POST", url: "?r=takeda/account/reg-logout", - }).then((res) => { + }).then(() => { wx.reLaunch({ url: "/module1/pages/login/index", }); @@ -36,3 +169,5 @@ Page({ }); }, }); + +export {} diff --git a/src/module1/pages/userInfo/index.wxml b/src/module1/pages/userInfo/index.wxml index daafbed..b9e1f84 100644 --- a/src/module1/pages/userInfo/index.wxml +++ b/src/module1/pages/userInfo/index.wxml @@ -1,88 +1,106 @@ + - - + + 姓名 - 刘大庆 + {{userInfo.Name}} 电话 - 139****6754 + {{userInfo.encryptionTel}} 医院 - 北京天坛医院 + {{userInfo.HospitalName}} 科室 - + - 消化科 + {{DepartmentName || '无'}} - + 专长 - - 高血压;心脏病 + + {{SpecialtyName || '无'}} - + 医生简介 - 医生简介信息 + {{userInfo.Introduce || '无'}} 退出登录 -更换手机号 +更换手机号 注销账号 - - 医生简介 - - 保存 + + 选择标签 + 所属科室 + + + {{item.label}} + + + 标签 + + + {{item.label}} + + + 确定 - - 医生专长 - - 瓣膜病 - 心律失常 - 心衰 - 心肌病 - - 保存 + + 医生简介 + + 保存 diff --git a/src/pages/cases/index.scss b/src/pages/cases/index.scss index f755ad9..f895c35 100644 --- a/src/pages/cases/index.scss +++ b/src/pages/cases/index.scss @@ -221,6 +221,9 @@ page { &.status3 { color: rgba(153, 153, 153, 1); } + &.status4 { + color: #54E2B4; + } } } .option { diff --git a/src/pages/cases/index.wxml b/src/pages/cases/index.wxml index 1f33a82..8266513 100644 --- a/src/pages/cases/index.wxml +++ b/src/pages/cases/index.wxml @@ -181,7 +181,7 @@ {{item.statusName}} {{item.statusName}} {{item.statusName}} - {{item.statusName}} + {{item.statusName}} 已公开 diff --git a/src/pages/my/index.scss b/src/pages/my/index.scss index 3c8ae81..292b0a4 100644 --- a/src/pages/my/index.scss +++ b/src/pages/my/index.scss @@ -58,7 +58,7 @@ page { .site { display: inline-block; padding: 0 8rpx; - font-size: 28rpx; + font-size: 24rpx; line-height: 32rpx; color: rgba(148, 87, 30, 1); border-radius: 4rpx; diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index 1f5e44f..1b2d17d 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -1,12 +1,16 @@ const app = getApp(); Page({ - data: {}, + data: { + userInfo: {}, + DoctorTitleType: {}, + }, onLoad() { this.getTabBar().setData({ active: 4, }); app.waitLogin().then(() => { + this.getDoctorDict(); app.getUserInfo(this, (userInfo) => { this.getTabBar().setData({ userInfo, @@ -14,11 +18,32 @@ Page({ }); }); }, + getDoctorDict() { + wx.ajax({ + method: "GET", + url: "?r=takeda/reg/doctor-dict", + data: {}, + }).then((res) => { + this.setData({ + DoctorTitleType: res.DoctorTitleType, + }); + }); + }, handleUserInfo() { wx.navigateTo({ url: "/module1/pages/userInfo/index", }); }, + handleProtocol() { + wx.navigateTo({ + url: "/module1/pages/loginProtool/index?ismy=1", + }); + }, + handleInvite() { + wx.navigateTo({ + url: "/module1/pages/invite/index", + }); + }, }); -export {} +export {}; diff --git a/src/pages/my/index.wxml b/src/pages/my/index.wxml index 13a58e9..104b918 100644 --- a/src/pages/my/index.wxml +++ b/src/pages/my/index.wxml @@ -3,35 +3,31 @@ style="background: url({{imageUrl}}my-bg.png?r={{Timestamp}}) no-repeat top center/100% 642rpx;padding-top:{{menuButtonInfo.bottom+30}}px;" > - + - 徐萌 + {{userInfo.Name}} - 主治医师 - - 心内科 + {{userInfo.OtherTitle}} + {{DoctorTitleType[userInfo.TitleType]}} + + + {{depart.DepartmentName}} + - 北京天坛医院 - 三甲 - 广州市/番禺区 + {{userInfo.HospitalName}} + {{userInfo.HospitalClassificationName}}{{userInfo.HospitalName}} + {{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}} - + - 心律失常 - 心律失常 - 心律失常 - 心律失常 + {{item.SpecialtyName}} - + 我的专属邀约码 @@ -47,7 +43,7 @@ - + 隐私与合规协议