From 34eefab0bbf35ebf329dc3dce010ef3c80c5f5b5 Mon Sep 17 00:00:00 2001 From: kola-web Date: Thu, 10 Jul 2025 18:45:31 +0800 Subject: [PATCH] =?UTF-8?q?2.0bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 58 +++++++++++++++++++------------- src/components/popup/index.scss | 1 + src/components/popup/index.wxml | 17 ++++------ src/components/popupDoctor/index.scss | 2 +- src/doctor/pages/changeTel/index.wxml | 2 +- src/doctor/pages/login/index.ts | 2 +- src/doctor/pages/my/index.ts | 2 +- src/images/icon22.png | Bin 1548 -> 3670 bytes src/pages/applyFrom/index.wxml | 6 ++-- src/pages/my/index.ts | 2 +- src/pages/start/index.ts | 8 ++++- src/patient/pages/askPatient/index.scss | 6 ++++ src/patient/pages/askPatient/index.ts | 19 ++++++++++- src/patient/pages/askPatient/index.wxml | 2 +- src/patient/pages/bindDoctor/index.ts | 4 +++ src/patient/pages/changeTel/index.wxml | 2 +- src/patient/pages/doctorList/index.ts | 7 ++++ src/patient/pages/doctorList/index.wxml | 2 ++ src/patient/pages/entryInfo/index.json | 3 +- src/patient/pages/entryInfo/index.ts | 3 ++ src/patient/pages/entryInfo/index.wxml | 11 +++--- src/patient/pages/family/index.scss | 3 +- src/patient/pages/familyList/index.scss | 6 ++-- src/patient/pages/familyList/index.ts | 2 +- src/patient/pages/familyList/index.wxml | 6 ++-- src/patient/pages/familyScan/index.ts | 18 ++++++---- src/patient/pages/familyScan/index.wxml | 4 +-- src/patient/pages/index/index.scss | 9 +++-- src/patient/pages/index/index.ts | 10 +++++- src/patient/pages/index/index.wxml | 13 ++++--- src/patient/pages/login/index.json | 4 ++- src/patient/pages/login/index.scss | 7 +++- src/patient/pages/login/index.ts | 17 ++++++++-- src/patient/pages/login/index.wxml | 18 +++++++--- src/patient/pages/my/index.ts | 2 +- src/patient/pages/my/index.wxml | 12 +++---- src/patient/pages/userInfo/index.ts | 9 +++-- typings/index.d.ts | 2 +- 38 files changed, 206 insertions(+), 95 deletions(-) diff --git a/src/app.ts b/src/app.ts index ee0714e..b5e631d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -115,28 +115,40 @@ App({ }) }, checkLoginType(type: 0 | 1 | 2) { - const { loginType, isLogin } = this.globalData.initLoginInfo - if (!isLogin) { - if (type === 0) { - return true - } else { - wx.reLaunch({ - url: '/pages/index/index', - }) - } + const { loginType, isLogin, isReg } = this.globalData.initLoginInfo + + if (type === 0) { + return true + } + + if (isLogin !== 1) { + wx.reLaunch({ + url: '/pages/index/index', + }) return false } - if (loginType === type) { - return true + if (isReg !== 1) { + const typePageUrl = { + 1: '/patient/pages/entryInfo/index', + 2: '/doctor/pages/login/index', + }[loginType as 1 | 2] + wx.reLaunch({ + url: typePageUrl, + }) + return false } - const typePageUrl = { - 1: '/patient/pages/index/index', - 2: '/doctor/pages/index/index', - }[loginType as 1 | 2] - wx.reLaunch({ - url: typePageUrl, - }) - return false + + if (loginType !== type) { + const typePageUrl = { + 1: '/patient/pages/index/index', + 2: '/doctor/pages/index/index', + }[loginType as 1 | 2] + wx.reLaunch({ + url: typePageUrl, + }) + } + + return true }, mpBehavior(data: { PageName: string }) { wx.ajax({ @@ -150,11 +162,11 @@ App({ }) }, - getUserInfo(type: 1 | 2 | 3 = 1) { + getUserInfo(type: 0 | 1 | 2 = 0) { const url = { - 1: '?r=wtx/user/userinfo', - 2: '?r=wtx/account/info', - 3: '?r=wtx/doctor/account/info', + 0: '?r=wtx/user/userinfo', + 1: '?r=wtx/account/info', + 2: '?r=wtx/doctor/account/info', }[type] return wx.ajax({ method: 'GET', diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss index fa8185c..2e322c7 100644 --- a/src/components/popup/index.scss +++ b/src/components/popup/index.scss @@ -898,6 +898,7 @@ color: rgba(161, 164, 172, 1); } .tag { + vertical-align: 2rpx; display: inline-block; font-size: 20rpx; color: rgba(255, 255, 255, 1); diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml index 6192668..891cca1 100644 --- a/src/components/popup/index.wxml +++ b/src/components/popup/index.wxml @@ -235,7 +235,7 @@ 取消 - 提交 + 确定 @@ -256,15 +256,12 @@ - + - 王青 + {{params.name}} - 北京积水潭医院龙泽院区 - 三甲 + {{params.hostipal}} + {{params.className}}{{params.levelName}} @@ -296,8 +293,8 @@ - 取消 - 确定 + 取消 + 确定 diff --git a/src/components/popupDoctor/index.scss b/src/components/popupDoctor/index.scss index e77322b..cc1b327 100644 --- a/src/components/popupDoctor/index.scss +++ b/src/components/popupDoctor/index.scss @@ -56,7 +56,7 @@ .col { .content { margin-right: 8rpx; - display: inline-block; + display: inline; font-size: 32rpx; color: rgba(1, 1, 5, 1); max-height: 30vh; diff --git a/src/doctor/pages/changeTel/index.wxml b/src/doctor/pages/changeTel/index.wxml index 7f6067e..4101d77 100644 --- a/src/doctor/pages/changeTel/index.wxml +++ b/src/doctor/pages/changeTel/index.wxml @@ -26,5 +26,5 @@ - + diff --git a/src/doctor/pages/login/index.ts b/src/doctor/pages/login/index.ts index 20c77bc..a4f11a9 100644 --- a/src/doctor/pages/login/index.ts +++ b/src/doctor/pages/login/index.ts @@ -100,7 +100,7 @@ Page({ } }, submitCallback() { - app.getUserInfo(3).then(() => { + app.getUserInfo(2).then(() => { wx.reLaunch({ url: `/doctor/pages/index/index`, }) diff --git a/src/doctor/pages/my/index.ts b/src/doctor/pages/my/index.ts index e7a7747..2c2c281 100644 --- a/src/doctor/pages/my/index.ts +++ b/src/doctor/pages/my/index.ts @@ -11,7 +11,7 @@ Page({ }, onLoad() { app.waitLogin().then(() => { - app.getUserInfo(3).then((userInfo) => { + app.getUserInfo(2).then((userInfo) => { this.setData({ userInfo, // 数字变红 diff --git a/src/images/icon22.png b/src/images/icon22.png index a4ac5fa9f97ddef06d7a92f7bf55ed94d0eba907..80d2f0f9323ebc98dd7be7f5ec86dfe0a15c7237 100644 GIT binary patch literal 3670 zcmV-c4yo~pP)@~0dr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pt6NyA3A2-Sd?U#f~;n+7NVJTVNz zzX4iWQRKwzZX()NCiBztw0MIP75~PicilTCPAe(}WSIU;c$#@G{ESXHMaU5rJqnQ{Ol7&Ly zUL{S$FTMJ4)s~u16Nv;qbF2@$cE#GVP$>LqSr#&Xt8UKJ3eW={RTKs3% @@ -34,7 +34,7 @@ - {{BirthMonth}} + {{BirthMonth}} @@ -48,7 +48,7 @@ - {{ProvinceName ? ProvinceName+ '/' : ProvinceName }}{{CityName}} + {{ProvinceName ? ProvinceName+ '/' : ProvinceName }}{{CityName}} diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index eda2551..79a97df 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -8,7 +8,7 @@ Page({ showPatient: false, }, - onLoad() { + onShow() { app.waitLogin().then(() => { app.mpBehavior({ PageName: 'BTN_MY_NAV' }) app.getUserInfo().then((userInfo) => { diff --git a/src/pages/start/index.ts b/src/pages/start/index.ts index c63c7c7..50cfc26 100644 --- a/src/pages/start/index.ts +++ b/src/pages/start/index.ts @@ -16,8 +16,14 @@ Page({ }) } if (initLoginInfo.loginType === 1) { + if (initLoginInfo.isReg === 1) { + wx.reLaunch({ + url: '/patient/pages/index/index', + }) + return + } wx.reLaunch({ - url: '/patient/pages/index/index', + url: '/patient/pages/entryInfo/login', }) } if (initLoginInfo.loginType === 2) { diff --git a/src/patient/pages/askPatient/index.scss b/src/patient/pages/askPatient/index.scss index 7e6f965..7258338 100644 --- a/src/patient/pages/askPatient/index.scss +++ b/src/patient/pages/askPatient/index.scss @@ -45,14 +45,20 @@ page { } .name { margin: -20rpx auto 0; + padding: 0 0.5em; width: 116rpx; height: 36rpx; line-height: 36rpx; font-size: 24rpx; color: rgba(255, 255, 255, 1); text-align: center; + box-sizing: border-box; background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); border-radius: 35rpx 35rpx 35rpx 35rpx; + max-width: 5em; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } } } diff --git a/src/patient/pages/askPatient/index.ts b/src/patient/pages/askPatient/index.ts index 21be853..86c2ce4 100644 --- a/src/patient/pages/askPatient/index.ts +++ b/src/patient/pages/askPatient/index.ts @@ -56,7 +56,7 @@ Page({ userInfo: {}, }, onLoad() { - app.waitLogin().then(() => { + app.waitLogin({ type: 1 }).then(() => { app.mpBehavior({ PageName: 'PG_FAQ' }) app.getUserInfo().then((userInfo) => { this.setData({ @@ -68,6 +68,11 @@ Page({ this.getMessageList() }) }, + onShow() { + if (app.globalData.loginState) { + this.getBindDoctorList() + } + }, getBindDoctorList() { wx.ajax({ method: 'GET', @@ -266,6 +271,13 @@ Page({ messageList, }) }, + handleSendDate() { + this.setData({ + popupShow: true, + popupType: 'selectDoctor', + popupParams: {}, + }) + }, handleQuestionTab(e) { const { index } = e.currentTarget.dataset this.setData({ @@ -288,6 +300,11 @@ Page({ url: '/patient/pages/doctorList/index', }) }, + handlePopupCancel() { + this.setData({ + popupShow: false, + }) + }, handleBack() { wx.navigateBack() }, diff --git a/src/patient/pages/askPatient/index.wxml b/src/patient/pages/askPatient/index.wxml index bbc6b07..64d0447 100644 --- a/src/patient/pages/askPatient/index.wxml +++ b/src/patient/pages/askPatient/index.wxml @@ -124,7 +124,7 @@ 我要提问 - + 出诊时间 diff --git a/src/patient/pages/bindDoctor/index.ts b/src/patient/pages/bindDoctor/index.ts index 8c72fce..b2d9dea 100644 --- a/src/patient/pages/bindDoctor/index.ts +++ b/src/patient/pages/bindDoctor/index.ts @@ -73,6 +73,10 @@ Page({ }) }, handlePopupOk() { + const { popupType } = this.data + if (popupType === 'bindDoctor') { + wx.navigateBack() + } this.handlePopupCancel() }, handlePopupCancel() { diff --git a/src/patient/pages/changeTel/index.wxml b/src/patient/pages/changeTel/index.wxml index 7f6067e..4101d77 100644 --- a/src/patient/pages/changeTel/index.wxml +++ b/src/patient/pages/changeTel/index.wxml @@ -26,5 +26,5 @@ - + diff --git a/src/patient/pages/doctorList/index.ts b/src/patient/pages/doctorList/index.ts index ed75b9b..1f27ce8 100644 --- a/src/patient/pages/doctorList/index.ts +++ b/src/patient/pages/doctorList/index.ts @@ -3,6 +3,12 @@ const app = getApp() Page({ data: { doctorList: [], + + pagination: { + page: 1, + pages: 1, + count: 1, + }, }, onShow() { app.waitLogin({ type: 1 }).then(() => { @@ -17,6 +23,7 @@ Page({ }).then((res) => { this.setData({ doctorList: res, + ['pagination.count']: res.length, }) }) }, diff --git a/src/patient/pages/doctorList/index.wxml b/src/patient/pages/doctorList/index.wxml index 4f507a2..60a1360 100644 --- a/src/patient/pages/doctorList/index.wxml +++ b/src/patient/pages/doctorList/index.wxml @@ -20,5 +20,7 @@ {{item.introduce}} + + diff --git a/src/patient/pages/entryInfo/index.json b/src/patient/pages/entryInfo/index.json index 5d0894b..35e99ca 100644 --- a/src/patient/pages/entryInfo/index.json +++ b/src/patient/pages/entryInfo/index.json @@ -1,6 +1,7 @@ { "navigationStyle": "custom", "usingComponents": { - "pickerArea": "/components/pickerArea/index" + "pickerArea": "/components/pickerArea/index", + "navbar": "/components/navbar/index" } } diff --git a/src/patient/pages/entryInfo/index.ts b/src/patient/pages/entryInfo/index.ts index 6ef8102..b6f9a11 100644 --- a/src/patient/pages/entryInfo/index.ts +++ b/src/patient/pages/entryInfo/index.ts @@ -95,6 +95,9 @@ Page({ }) }) }, + handleBack() { + wx.navigateBack() + }, }) export {} diff --git a/src/patient/pages/entryInfo/index.wxml b/src/patient/pages/entryInfo/index.wxml index d8405c8..79a2163 100644 --- a/src/patient/pages/entryInfo/index.wxml +++ b/src/patient/pages/entryInfo/index.wxml @@ -1,3 +1,6 @@ + + + - {{birthMonth}} + {{birthMonth}} @@ -41,12 +44,12 @@ - {{provinceName ? provinceName+ '/' : provinceName }}{{cityName}} + {{provinceName ? provinceName+ '/' : provinceName }}{{cityName}} 立即加入 - 取消 + 取消 diff --git a/src/patient/pages/family/index.scss b/src/patient/pages/family/index.scss index 747b374..04f504c 100644 --- a/src/patient/pages/family/index.scss +++ b/src/patient/pages/family/index.scss @@ -7,7 +7,7 @@ page { .container { margin-top: 184rpx; position: relative; - background: linear-gradient(292deg, #ffffff 0%, #fff3f2 100%); + background: linear-gradient( 291deg, #FFFFFF 0%, #FFFCFC 55%, #FFF7F7 100%); border-radius: 24rpx 24rpx 24rpx 24rpx; border: 2rpx solid #ffffff; padding: 136rpx 40rpx 48rpx; @@ -43,6 +43,7 @@ page { display: block; width: 296rpx; height: 296rpx; + border-radius: 50%; } .tip { margin-top: 22rpx; diff --git a/src/patient/pages/familyList/index.scss b/src/patient/pages/familyList/index.scss index b13b220..d18c9d6 100644 --- a/src/patient/pages/familyList/index.scss +++ b/src/patient/pages/familyList/index.scss @@ -13,6 +13,8 @@ page { justify-content: space-between; .wrap { .w-header { + display: flex; + align-items: center; .name { display: inline; font-size: 32rpx; @@ -30,13 +32,13 @@ page { border-radius: 4rpx; } } - .date{ + .date { margin-top: 20rpx; font-size: 28rpx; color: rgba(161, 164, 172, 1); } } - .unbind{ + .unbind { flex-shrink: 0; padding: 32rpx 0 32rpx 32rpx; font-size: 28rpx; diff --git a/src/patient/pages/familyList/index.ts b/src/patient/pages/familyList/index.ts index 09bd388..e525c65 100644 --- a/src/patient/pages/familyList/index.ts +++ b/src/patient/pages/familyList/index.ts @@ -8,7 +8,7 @@ Page({ onLoad() { app.waitLogin().then(() => { this.getList() - app.getUserInfo(2).then((res) => { + app.getUserInfo(1).then((res) => { this.setData({ userInfo: res, }) diff --git a/src/patient/pages/familyList/index.wxml b/src/patient/pages/familyList/index.wxml index 3ac24a3..4548ea6 100644 --- a/src/patient/pages/familyList/index.wxml +++ b/src/patient/pages/familyList/index.wxml @@ -2,9 +2,9 @@ - ID:{{userInfo.PatientId}} - ID:{{userInfo.PatientId}}亲友 - {{item.RelationType === '1' ? '本人': '亲友'}} + {{userInfo.PatientName}} + {{userInfo.PatientName}}亲友 + 本人 绑定时间:{{item.BindPatientTime}} diff --git a/src/patient/pages/familyScan/index.ts b/src/patient/pages/familyScan/index.ts index b123e8c..ae56c92 100644 --- a/src/patient/pages/familyScan/index.ts +++ b/src/patient/pages/familyScan/index.ts @@ -20,6 +20,12 @@ Page({ }, onShow() { app.waitLogin().then(() => { + if (app.globalData.initLoginInfo.loginType === 2) { + wx.reLaunch({ + url: '/doctor/pages/index/index', + }) + return + } app.getUserInfo().then(() => { this.getMpPatientInfo() }) @@ -35,12 +41,10 @@ Page({ loading: true, }).then((res) => { let RelationType = res.HasSelf == 1 ? '2' : '' - if (!res.PatientId) { - if (!this.data.ignoreAgreement) { - wx.navigateTo({ - url: `/patient/pages/login/index?page=/patient/pages/familyScan/index`, - }) - } + if (!res.isLogin) { + wx.navigateTo({ + url: `/patient/pages/login/index?back=1`, + }) } this.setData({ mpPatientInfo: res, @@ -59,7 +63,7 @@ Page({ resetBind: true, }) }, - handleSwitchRType(e) { + handleSwitchType(e) { const { type } = e.currentTarget.dataset this.setData({ RelationType: type, diff --git a/src/patient/pages/familyScan/index.wxml b/src/patient/pages/familyScan/index.wxml index 4cc26f7..98f8bbd 100644 --- a/src/patient/pages/familyScan/index.wxml +++ b/src/patient/pages/familyScan/index.wxml @@ -55,7 +55,7 @@ 请选择您的身份? 本人 - + 亲友 diff --git a/src/patient/pages/index/index.scss b/src/patient/pages/index/index.scss index 05ae735..b228022 100644 --- a/src/patient/pages/index/index.scss +++ b/src/patient/pages/index/index.scss @@ -105,13 +105,14 @@ page { } .name { margin: -20rpx auto 0; - padding: 4rpx 20rpx; + padding: 4rpx 0.5em; font-size: 20rpx; color: #fff; line-height: 24rpx; background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); border-radius: 28rpx 28rpx 28rpx 28rpx; - max-width: 4em; + max-width: 5em; + box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -127,8 +128,10 @@ page { } .name { margin: -20rpx auto 0; - padding: 4rpx 20rpx; + padding: 4rpx 0.5em; + width: 5em; font-size: 20rpx; + box-sizing: border-box; color: rgba(161, 164, 172, 1); line-height: 24rpx; } diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index ab510c6..f800e57 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -20,7 +20,7 @@ Page({ }, onLoad() { app.waitLogin().then(() => { - app.getUserInfo(2).then((userInfo) => { + app.getUserInfo(1).then((userInfo) => { this.setData({ userInfo, Days: userInfo.Days.replace( @@ -38,6 +38,11 @@ Page({ }) }) }, + onShow() { + if (app.globalData.loginState) { + this.getBindDoctorList() + } + }, getBindDoctorList() { wx.ajax({ method: 'GET', @@ -152,6 +157,9 @@ Page({ }, handlePopupCancel() { const { popupType } = this.data + if (popupType === 'bindDoctor') { + this.getBindDoctorList() + } if (popupType === 'conformBindDoctorQuestion') { wx.ajax({ method: 'POST', diff --git a/src/patient/pages/index/index.wxml b/src/patient/pages/index/index.wxml index 9ab00a0..2547669 100644 --- a/src/patient/pages/index/index.wxml +++ b/src/patient/pages/index/index.wxml @@ -7,10 +7,7 @@ > - + Hi!{{userInfo.PatientName}} @@ -24,7 +21,13 @@ - + {{item.doctorName}} diff --git a/src/patient/pages/login/index.json b/src/patient/pages/login/index.json index 17c750f..613b839 100644 --- a/src/patient/pages/login/index.json +++ b/src/patient/pages/login/index.json @@ -1,6 +1,8 @@ { "navigationStyle": "custom", "usingComponents": { - "van-divider": "@vant/weapp/divider/index" + "van-divider": "@vant/weapp/divider/index", + "navbar": "/components/navbar/index", + "van-checkbox": "@vant/weapp/checkbox/index" } } diff --git a/src/patient/pages/login/index.scss b/src/patient/pages/login/index.scss index dd5b225..bdb046f 100644 --- a/src/patient/pages/login/index.scss +++ b/src/patient/pages/login/index.scss @@ -106,12 +106,17 @@ margin-top: -8rpx; transform: scale(0.8); } + .wx-checkbox-input.wx-checkbox-input-checked { + background: rgba(246, 74, 58, 1); + border-color: rgba(246, 74, 58, 1); + color: #ffffff; + } } .link { color: rgba(246, 74, 58, 1); } } - .family-tip{ + .family-tip { margin-top: 58rpx; font-size: 28rpx; color: rgba(246, 74, 58, 1); diff --git a/src/patient/pages/login/index.ts b/src/patient/pages/login/index.ts index 75df527..c10239b 100644 --- a/src/patient/pages/login/index.ts +++ b/src/patient/pages/login/index.ts @@ -12,8 +12,14 @@ Page({ check1: false, check2: false, check3: false, + + backPage: false, + }, + onLoad(options) { + this.setData({ + backPage: options.back === '1', + }) }, - onLoad() {}, getCode() { if (timer) return const mobile = this.data.mobile @@ -101,8 +107,10 @@ Page({ } }, submitCallback() { - app.getUserInfo(2).then((res) => { - if (res.PatientId) { + app.getUserInfo(1).then((res) => { + if (this.data.backPage) { + wx.navigateBack() + } else if (res.PatientId) { wx.reLaunch({ url: `/patient/pages/index/index`, }) @@ -118,6 +126,9 @@ Page({ showTel: !this.data.showTel, }) }, + handleBack() { + wx.navigateBack() + }, }) export {} diff --git a/src/patient/pages/login/index.wxml b/src/patient/pages/login/index.wxml index 26aa6c3..f657b7b 100644 --- a/src/patient/pages/login/index.wxml +++ b/src/patient/pages/login/index.wxml @@ -1,10 +1,20 @@ + + + 欢迎加入愈见守护 - + 或者 @@ -39,7 +49,7 @@ - + 我特此同意 《个人信息及隐私协议政策》 @@ -47,7 +57,7 @@ - + 我特此同意 《用户协议》 @@ -55,7 +65,7 @@ - + 我特此同意 《个人信息共享知情同意书》 diff --git a/src/patient/pages/my/index.ts b/src/patient/pages/my/index.ts index 6635fd9..04bd0a6 100644 --- a/src/patient/pages/my/index.ts +++ b/src/patient/pages/my/index.ts @@ -11,7 +11,7 @@ Page({ }, onLoad() { app.waitLogin().then(() => { - app.getUserInfo().then((userInfo) => { + app.getUserInfo(1).then((userInfo) => { this.setData({ userInfo, // 数字变红 diff --git a/src/patient/pages/my/index.wxml b/src/patient/pages/my/index.wxml index 30bc15b..4e98397 100644 --- a/src/patient/pages/my/index.wxml +++ b/src/patient/pages/my/index.wxml @@ -8,7 +8,7 @@ - 你好 + {{userInfo.PatientName}} 今天是陪伴您的第 @@ -27,6 +27,11 @@ 个人信息 + + + 我的亲友 + + @@ -35,11 +40,6 @@ - - - 我的亲友 - - diff --git a/src/patient/pages/userInfo/index.ts b/src/patient/pages/userInfo/index.ts index 50ba5cd..0f35aad 100644 --- a/src/patient/pages/userInfo/index.ts +++ b/src/patient/pages/userInfo/index.ts @@ -16,7 +16,7 @@ Page({ }, onLoad() { app.waitLogin().then(() => { - app.getUserInfo(2).then((userInfo) => { + app.getUserInfo(1).then((userInfo) => { this.setData({ name: userInfo.PatientName, birthMonth: userInfo.PatientBirth, @@ -51,8 +51,11 @@ Page({ provinceId, cityId, }, - }).then((res) => { - console.log('res: ', res) + }).then(() => { + wx.showToast({ + icon: 'none', + title: '保存成功', + }) }) }, handleTel() { diff --git a/typings/index.d.ts b/typings/index.d.ts index da41466..624cda7 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -44,7 +44,7 @@ interface IAppOption { [propName: string]: any } - getUserInfo: (type?: 1 | 2 | 3) => Promise + getUserInfo: (type?: 0 | 1 | 2) => Promise startLogin: (callback?: () => void) => void waitLogin: (params?: { type?: 0 | 1 | 2 | 'any' }) => Promise checkLoginType: (type: 0 | 1 | 2) => boolean