diff --git a/README.md b/README.md index 03c5787..161960e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ images svn 地址 svn://39.106.86.127:28386/projects/xd/proj_src/shop/frontend/web/xd svn://39.106.86.127:28386/projects/xd/proj_src/branches/dev_v2.0/shop/frontend/web/xd/ -(/images/)(\S\*(?=["|'])) +(/images/)(\S*(?=["|'])) {{imageUrl}}$2?t={{Timestamp}} ui问题 @@ -29,5 +29,3 @@ wx.showModal({ 审核账号 18910233000 1111 - - diff --git a/project.private.config.json b/project.private.config.json index ed437cb..4eec130 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -23,11 +23,18 @@ "miniprogram": { "list": [ { + "name": "患者-个人信息", + "pathName": "patient/pages/personalInformation/index", + "query": "bottom=1", + "scene": null, + "launchMode": "default" + }, + { "name": "patient/pages/liveResult/index", "pathName": "patient/pages/liveResult/index", "query": "id=30&rewardScore=undefined", - "scene": null, - "launchMode": "default" + "launchMode": "default", + "scene": null }, { "name": "医生-患者详情", diff --git a/src/app.ts b/src/app.ts index f6f4c28..0849a06 100644 --- a/src/app.ts +++ b/src/app.ts @@ -365,7 +365,7 @@ App({ } else if (AuditStatus == 2) { urlKey = 'reject' } - let navUrl = { + const navUrl = { enterInfo: '/patient/pages/enterInfo/index', noCert: '/patient/pages/enterInfo/index', reject: '/patient/pages/enterInfo/index', @@ -433,7 +433,7 @@ App({ .map(([key, value]) => `${key}=${value}`) .join('&') wx.reLaunch({ - url: '/doctor/pages/d_trans/index?path=' + encodeURIComponent(`/${url}?${params}`), + url: `/doctor/pages/d_trans/index?path=${encodeURIComponent(`/${url}?${params}`)}`, }) return false } @@ -489,7 +489,7 @@ App({ self?.setData({ zdUserInfo: res, }) - const { doctorId, inviteChan } = this.globalData.scene + const { doctorId, inviteChan, proMethodId } = this.globalData.scene if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) { wx.ajax({ method: 'POST', @@ -503,6 +503,16 @@ App({ this.getZdUserInfo(self, update, callback) }) } + if (proMethodId) { + wx.ajax({ + method: 'POST', + url: '?r=zd/account/set-user-promotion-method', + showMsg: false, + data: { + promotionMethodId: proMethodId, + }, + }) + } callback(res) }) }, diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss index 991ea24..ebcddcd 100644 --- a/src/components/popup/index.scss +++ b/src/components/popup/index.scss @@ -182,10 +182,20 @@ .popup8 { width: 590rpx; height: 880rpx; + position: relative; .p-img { width: 100%; height: 100%; } + .code{ + position: absolute; + top: 372rpx; + left: 50%; + transform: translateX(-50%); + border-radius: 24rpx; + width: 300rpx; + height: 300rpx; + } } .close { diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml index 11b8a54..64adf4b 100644 --- a/src/components/popup/index.wxml +++ b/src/components/popup/index.wxml @@ -58,7 +58,7 @@ - + 要删除这张照片吗 ? @@ -68,7 +68,8 @@ - + + - - + + 为更好地为您提供健康管理服务 diff --git a/src/images/icon81.png b/src/images/icon81.png new file mode 100644 index 0000000..c31422d Binary files /dev/null and b/src/images/icon81.png differ diff --git a/src/patient/pages/enterInfo/index.scss b/src/patient/pages/enterInfo/index.scss index fcba2e3..4b5c7ac 100644 --- a/src/patient/pages/enterInfo/index.scss +++ b/src/patient/pages/enterInfo/index.scss @@ -8,7 +8,7 @@ height: 512rpx; } .page-container { - padding-bottom: 260rpx; + padding-bottom: 300rpx; position: absolute; width: 100%; top: 0; @@ -117,7 +117,7 @@ font-size: 32rpx; color: #333; background: #f6f8f9; - border-radius: 116rpx; + border-radius: 16rpx; } .input-place { color: rgba(173, 172, 178, 1); @@ -146,7 +146,7 @@ display: flex; align-items: center; justify-content: center; - border-radius: 116rpx; + border-radius: 16rpx; background: rgba(246, 248, 249, 1); .icon { width: 64rpx; @@ -168,7 +168,7 @@ display: flex; align-items: center; justify-content: center; - border-radius: 150rpx; + border-radius: 16rpx; box-sizing: border-box; border: 2rpx solid rgba(246, 248, 249, 1); background-color: rgba(246, 248, 249, 1); @@ -181,11 +181,11 @@ } .upload { margin-top: 24rpx; - width: 100%; + width: 208rpx; .upload-container { position: relative; - width: calc(100vw - 80rpx); - height: 334rpx; + width: 208rpx; + height: 208rpx; border-radius: 16rpx; background: #f6f8f9; overflow: hidden; @@ -208,7 +208,7 @@ display: flex; align-items: center; justify-content: center; - .d-icon{ + .d-icon { width: 26rpx; height: 26rpx; } diff --git a/src/patient/pages/enterInfo/index.ts b/src/patient/pages/enterInfo/index.ts index b69cc73..f5a92ac 100644 --- a/src/patient/pages/enterInfo/index.ts +++ b/src/patient/pages/enterInfo/index.ts @@ -12,6 +12,9 @@ Page({ diagnoseType: '', IsGraves: '', HasTedSurgery: '', + isKnowTituyo: '', + isUseTituyo: '', + prescriptionImg: '', diagnoseTypeShow: false, DiagnoseType: app.globalData.DiagnoseType, @@ -25,8 +28,10 @@ Page({ proces: '0', dict: {}, - - fileSrc: '', + bolList: { + 1: '是', + 2: '否', + }, popupShow: false, popupType: 'popup7', @@ -91,13 +96,28 @@ Page({ HasTedSurgery: id, }) }, + handleSelectKnowTituyo(e) { + const { id } = e.currentTarget.dataset + this.setData({ + isKnowTituyo: id, + }) + }, + handleSelectUseTituyo(e) { + const { id } = e.currentTarget.dataset + this.setData({ + isUseTituyo: id, + }) + wx.pageScrollTo({ + scrollTop: 10000, + }) + }, handleSubmit() { app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' }) if (this.data.submiting) return const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData - const { doctorId, inviteChan } = app.globalData.scene + const { doctorId, inviteChan, proMethodId } = app.globalData.scene let toast = '' // if (!diagnosisTime) toast = "确诊时间不能为空"; // if (!birth) toast = "出生日期不能为空"; @@ -136,6 +156,7 @@ Page({ inviteDoctorId: doctorId, inviteChannel: inviteChan, IsAliQiWei, + promotionMethodId: proMethodId, }, }) .then((_res) => { @@ -171,7 +192,7 @@ Page({ }, handleSetData(e) { this.setData({ - fileSrc: e.detail.imgUrl, + prescriptionImg: e.detail.imgUrl, }) }, handleDelData() { @@ -184,6 +205,7 @@ Page({ this.setData({ popupShow: false, popupType: '', + prescriptionImg: '', }) }, handlePopupCancel() { diff --git a/src/patient/pages/enterInfo/index.wxml b/src/patient/pages/enterInfo/index.wxml index ef1a65f..32df0b0 100644 --- a/src/patient/pages/enterInfo/index.wxml +++ b/src/patient/pages/enterInfo/index.wxml @@ -87,11 +87,11 @@ {{item}} @@ -102,33 +102,34 @@ {{item}} - - 请上传您的处方证明 - 处方证明审核通过后,即可享受平台全部服务 - - - - - - + + + 请上传您的处方证明 + 处方证明审核通过后,即可享受平台全部服务 + + + + + + + + - + + + - - - 您可以上传您的诊断处方、住院小结等 - - - + + diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index 5cddf25..9b6bef7 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -108,20 +108,35 @@ Page({ }) }, async getPopup() { - const data3 = await wx.ajax({ + const data1 = await wx.ajax({ method: 'GET', url: '?r=zd/popup/info', data: { Type: 6, }, }) - if (data3.showAlert) { + if (data1.showAlert) { this.setData({ - toastShow: data3.showAlert, + toastShow: data1.showAlert, toastType: 'dedicatedDoctor', toastParams: {}, }) } + + const data2 = await wx.ajax({ + method: 'GET', + url: '?r=zd/popup/get-popup', + data: { + type: 1, + }, + }) + if (data2.showAlert) { + this.setData({ + toastShow: data2.showAlert, + toastType: 'drug-guide', + toastParams: {}, + }) + } }, getUnreadCount() { wx.ajax({ @@ -167,7 +182,7 @@ Page({ wx.ajax({ method: 'GET', url: `?r=zd/mini-conf/get-config`, - data: { userType: UserType }, + data: { userType: UserType > 3 ? 3 : UserType }, }).then((res) => { res = res.map((item: any) => { if (item.code == 'spread1' || item.code == 'spread2' || item.code == 'serviceConf') { @@ -450,6 +465,17 @@ Page({ data: {}, }) this.handleToastCancel(null, false) + } else if (toastType === 'drug-guide') { + wx.ajax({ + method: 'POST', + url: '?r=zd/popup/add-record', + data: { type: 1 }, + }).then(() => { + wx.navigateTo({ + url: '/patient/pages/personalInformation/index?bottom=1', + }) + }) + this.handleToastCancel(null, false) } }, handleToastCancel(_e = null, sure = true) { @@ -476,7 +502,14 @@ Page({ url: '?r=zd/re-visit/update-popup-show-status', data: {}, }) + } else if (toastType === 'drug-guide' && sure) { + wx.ajax({ + method: 'POST', + url: '?r=zd/popup/add-record', + data: { type: 1 }, + }) } + this.setData({ toastShow: false, toastType: '', diff --git a/src/patient/pages/liveDetail/index.json b/src/patient/pages/liveDetail/index.json index 56166e3..69dabe5 100644 --- a/src/patient/pages/liveDetail/index.json +++ b/src/patient/pages/liveDetail/index.json @@ -8,6 +8,7 @@ "customPoster": "/components/customPoster/index", "navbar": "/components/navbar/index", "van-popup": "@vant/weapp/popup/index", - "popup": "/components/popup/index" + "popup": "/components/popup/index", + "van-count-down": "@vant/weapp/count-down/index" } } diff --git a/src/patient/pages/liveDetail/index.scss b/src/patient/pages/liveDetail/index.scss index b1dc07e..8e852b7 100644 --- a/src/patient/pages/liveDetail/index.scss +++ b/src/patient/pages/liveDetail/index.scss @@ -10,7 +10,26 @@ box-shadow: 0 10rpx 16rpx #dcdcdc; } .page-container { - padding: 30rpx 40rpx 160rpx; + padding: 30rpx 40rpx calc(env(safe-area-inset-bottom) + 160rpx); + .count-down { + margin-bottom: 32rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #b982ff; + gap: 8rpx; + .c-item { + padding: 0 8rpx; + line-height: 48rpx; + background-color: #b982ff; + color: #fff; + min-width: 50rpx; + text-align: center; + box-sizing: border-box; + border-radius: 4rpx; + } + } .title { font-size: 40rpx; color: #333333; @@ -170,10 +189,18 @@ } } .public { + position: relative; margin-top: 32rpx; display: block; height: 270rpx; border-radius: 24rpx; + .p-code{ + position: absolute; + top: 38rpx; + right: 74rpx; + width: 196rpx; + height: 196rpx; + } } .content { margin-top: 24rpx; diff --git a/src/patient/pages/liveDetail/index.ts b/src/patient/pages/liveDetail/index.ts index 08f44c4..60579d2 100644 --- a/src/patient/pages/liveDetail/index.ts +++ b/src/patient/pages/liveDetail/index.ts @@ -6,6 +6,7 @@ Page({ data: { id: '', shareShow: false, + dateValue: 0, detail: {} as any, zdUserInfo: {} as any, posterUrl: '', @@ -14,6 +15,10 @@ Page({ currentVideoSrc: '', + lightList: [], + + timeData: {}, + popupShow: false, popupType: 'popup6', // 登录失败弹窗 popupParams: { @@ -43,6 +48,7 @@ Page({ app.mpBehavior({ PageName: 'PG_PatientLiveDetails' }) this.getDetail() this.setView() + this.getLightList() app.getZdUserInfo(this, true, () => { this.getPosterParams() }) @@ -51,6 +57,21 @@ Page({ onReady() { this.videoContext = wx.createVideoContext('video') }, + getLightList() { + wx.ajax({ + method: 'GET', + url: '?r=zd/activity/get-high-light-list', + data: { activityId: this.data.id }, + }).then((res) => { + res.map((item: any) => { + item.duration = dayjs(item.duration * 1000).format('mm:ss') + return item + }) + this.setData({ + lightList: res, + }) + }) + }, getPosterParams() { wx.ajax({ method: 'POST', @@ -115,6 +136,16 @@ Page({ }) }) }, + handleLightVideo(e) { + const { url } = e.currentTarget.dataset + + this.setData({ + currentVideoSrc: url, + }) + this.videoContext.requestFullScreen({}) + this.videoContext.seek(0) + this.videoContext.play() + }, handleReplay() { app.mpBehavior({ PageName: 'BTN_PatientLiveReview' }) this.setData({ @@ -127,6 +158,20 @@ Page({ handleFullscreenExit() { this.videoContext.pause() }, + handleBanner() { + const { detail, zdUserInfo, dateValue } = this.data + if (detail.IsSignUp && zdUserInfo.AuditStatus) { + // eslint-disable-next-line eqeqeq + if (zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4) { + // eslint-disable-next-line eqeqeq + if (detail.SignUpStatus == 2) { + if (detail.BeginTimeValue * 1 < dateValue * 1) { + this.handleLive() + } + } + } + } + }, handleLive() { const { Type } = this.data.detail app.mpBehavior({ PageName: 'BTN_PatientLiveEnter' }) @@ -159,30 +204,36 @@ Page({ }) }, handleSignUp() { + const { SubscribeTemplateList } = this.data.detail app.mpBehavior({ PageName: 'BTN_PatientLiveSign' }) const { Type } = this.data.detail const { UserType } = this.data.zdUserInfo - wx.ajax({ - method: 'POST', - url: '?r=zd/activity/sign-up', - data: { - Id: this.data.id, - PreUserIdentity: UserType, - }, - }).then((res) => { - app - .zdPermissionVerification( - 3, - Type == 1 ? 1 : 10, - `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`, - this.data.id, - ) - .then(() => { - wx.navigateTo({ - url: `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`, - }) + wx.requestSubscribeMessage({ + tmplIds: SubscribeTemplateList, + complete: () => { + wx.ajax({ + method: 'POST', + url: '?r=zd/activity/sign-up', + data: { + Id: this.data.id, + PreUserIdentity: UserType, + }, + }).then((res) => { + app + .zdPermissionVerification( + 3, + Type == 1 ? 1 : 10, + `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`, + this.data.id, + ) + .then(() => { + wx.navigateTo({ + url: `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`, + }) + }) }) + }, }) }, handleShare() { @@ -329,19 +380,20 @@ Page({ }) }, handleAnswer() { + const link = this.data.detail.QuestionnaireUrl wx.navigateTo({ - url: `/pages/webview/index?url=${encodeURIComponent('https://shop.show.hbsaas.com/statics/#/?nId=bz56')}`, + url: `/pages/webview/index?url=${encodeURIComponent(link)}`, }) }, - hadnleMessage() { - wx.requestSubscribeMessage({ - tmplIds: ['IMF4HFzZaKG13H3yjFyna23g0ZuIHcVND6dUGqhr8IA'], - success(res) { - console.log(res) - }, - fail(err) { - console.log(err) - }, + handleTimeChange(e) { + this.setData({ + timeData: e.detail, + }) + }, + handleTimeFinish() { + this.setData({ + dateValue: dayjs().valueOf(), + 'detail.LeftTime': 0, }) }, onShareAppMessage() { diff --git a/src/patient/pages/liveDetail/index.wxml b/src/patient/pages/liveDetail/index.wxml index 74bb2aa..6654be6 100644 --- a/src/patient/pages/liveDetail/index.wxml +++ b/src/patient/pages/liveDetail/index.wxml @@ -6,9 +6,34 @@ class="page" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;" > - - + + + + + 倒计时 + + {{timeData.days}} + 天 + + + {{timeData.hours}} + 时 + + + {{timeData.minutes}} + 分 + + {{timeData.seconds}} + 秒 + + {{detail.Name}} {{detail.BeginTime}} @@ -38,7 +63,10 @@ - + + + + - - - - + 直播亮点 - - + + - 视频标题显示视频标题显示 - 02:12 + {{item.title}} + {{item.duration}} - 详情介绍 + + + 已取消 diff --git a/src/patient/pages/personalInformation/index.json b/src/patient/pages/personalInformation/index.json index 2e09842..d682d42 100644 --- a/src/patient/pages/personalInformation/index.json +++ b/src/patient/pages/personalInformation/index.json @@ -6,6 +6,8 @@ "van-icon": "@vant/weapp/icon/index", "van-toast": "@vant/weapp/toast/index", "van-popup": "@vant/weapp/popup/index", - "van-switch": "@vant/weapp/switch/index" + "van-switch": "@vant/weapp/switch/index", + "popup": "/components/popup/index", + "uploadFile": "/components/uploadFile/index" } } diff --git a/src/patient/pages/personalInformation/index.scss b/src/patient/pages/personalInformation/index.scss index 49285f7..7bcf8e7 100644 --- a/src/patient/pages/personalInformation/index.scss +++ b/src/patient/pages/personalInformation/index.scss @@ -2,10 +2,10 @@ page { background-color: #f6f8f9; } .page { - padding: 40rpx; + padding: 40rpx 30rpx; padding-bottom: 200rpx; .page-container { - padding: 48rpx 40rpx; + padding: 48rpx 30rpx; border-radius: 24rpx 24rpx 24rpx 24rpx; border: 2rpx solid #ffffff; background: linear-gradient(180deg, #faf6ff 0%, #ffffff 8%, #ffffff 100%); @@ -41,7 +41,7 @@ page { .input { padding: 24rpx 48rpx; background-color: rgba(246, 248, 249, 1); - border-radius: 116rpx; + border-radius: 16rpx; color: #283031; line-height: 40rpx; } @@ -51,7 +51,7 @@ page { .radio-btns { display: grid; grid-template-columns: repeat(2, 1fr); - gap: 22rpx; + gap: 20rpx; &.radio-btns3 { grid-template-columns: repeat(3, 1fr); } @@ -61,12 +61,12 @@ page { } } .btn { - padding: 24rpx; + padding: 18rpx 24rpx; font-size: 32rpx; color: rgba(173, 172, 178, 1); text-align: center; line-height: 40rpx; - border-radius: 116rpx; + border-radius: 16rpx; border: 1px solid rgba(246, 248, 249, 1); background-color: rgba(246, 248, 249, 1); display: flex; @@ -132,6 +132,91 @@ page { } } } + .upload { + margin-top: 24rpx; + display: block; + position: relative; + .mask { + position: absolute; + z-index: 10; + width: 100%; + height: 100%; + } + .upload-container { + position: relative; + width: 208rpx; + height: 208rpx; + border-radius: 16rpx; + background: #f6f8f9; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + .upload-img { + position: relative; + width: 100%; + height: 100%; + .del { + position: absolute; + top: 0; + right: 0; + width: 40rpx; + height: 40rpx; + border-radius: 0 16rpx 0 16rpx; + background: rgba(0, 0, 0, 0.3); + display: flex; + align-items: center; + justify-content: center; + .d-icon { + width: 26rpx; + height: 26rpx; + } + } + .img { + display: block; + width: 100%; + height: 100%; + } + .check { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 32rpx; + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + gap: 12rpx; + width: 234rpx; + height: 76rpx; + background: rgba(0, 0, 0, 0.8); + border-radius: 8rpx 8rpx 8rpx 8rpx; + .check-icon { + width: 36rpx; + height: 36rpx; + } + } + } + .icon { + display: block; + width: 112rpx; + height: 80rpx; + } + .name { + margin-top: 28rpx; + font-size: 28rpx; + color: #adacb2; + text-align: center; + } + } + } + .reject { + margin-top: 24rpx; + font-size: 32rpx; + color: #ef3939; + } } // .footer-new { diff --git a/src/patient/pages/personalInformation/index.ts b/src/patient/pages/personalInformation/index.ts index 3cd8297..66437a6 100644 --- a/src/patient/pages/personalInformation/index.ts +++ b/src/patient/pages/personalInformation/index.ts @@ -4,6 +4,7 @@ const licia = require('miniprogram-licia') Page({ data: { + scrollBottom: '', isEdit: false, area: [] as string[][], city: [] as string[][], @@ -32,6 +33,11 @@ Page({ }, ], + bolList: { + 1: '是', + 2: '否', + }, + ageRangeValue: '0', dict: {} as any, @@ -50,6 +56,17 @@ Page({ value: item.name, } }), + + popupShow: false, + popupType: 'popup7', + popupParams: {} as any, + }, + onLoad(options) { + if (options.bottom) { + this.setData({ + scrollBottom: options.bottom, + }) + } }, onShow() { const SystemInfo = app.globalSystemInfo @@ -82,6 +99,14 @@ Page({ this.setData({ dict: res, }) + if (this.data.scrollBottom) { + wx.pageScrollTo({ + scrollTop: 100000, + }) + this.setData({ + scrollBottom: '', + }) + } }) }, @@ -227,6 +252,8 @@ Page({ previousConvulsion: zdUserInfo.PreviousConvulsion, traditionalImmunosuppressant: zdUserInfo.TraditionalImmunosuppressant, medicalInsuranceType: zdUserInfo.MedicalInsuranceType, + isKnowTituyo: zdUserInfo.IsKnowTituyo, + isUseTituyo: zdUserInfo.IsUseTituyo, ...zdUserInfo, }, }) @@ -245,6 +272,35 @@ Page({ app.getZdUserInfo(this, true, this.formatUserInfo.bind(this)) }) }, + handleNoUpload() { + return false + }, + handleSetData(e) { + this.setData({ + 'zdUserInfo.prescriptionImg': e.detail.imgUrl, + }) + this.updateUserInfo() + }, + handleDelData() { + this.setData({ + popupShow: true, + popupType: 'popup7', + }) + }, + handlePopupOk() { + this.setData({ + popupShow: false, + popupType: '', + 'zdUserInfo.prescriptionImg': '', + }) + this.updateUserInfo() + }, + handlePopupCancel() { + this.setData({ + popupShow: false, + popupType: '', + }) + }, handleChangeTel() { wx.navigateTo({ diff --git a/src/patient/pages/personalInformation/index.wxml b/src/patient/pages/personalInformation/index.wxml index d8a9233..d8ff21e 100644 --- a/src/patient/pages/personalInformation/index.wxml +++ b/src/patient/pages/personalInformation/index.wxml @@ -123,6 +123,71 @@ + + + + 是否了解替妥尤单抗N01 + + + + + {{item}} + + + + + + + 是否有使用替妥尤单抗N01 + + + + + {{item}} + + + + + + + + + + + + + + + + 审核中... + + + + + + + + *审核不通过 + + 切换医生端 @@ -154,3 +219,11 @@ + + diff --git a/src/patient/pages/qolAdd/index.json b/src/patient/pages/qolAdd/index.json index 1cb6d89..a0508cc 100644 --- a/src/patient/pages/qolAdd/index.json +++ b/src/patient/pages/qolAdd/index.json @@ -1,5 +1,6 @@ { "usingComponents": { - "navbar": "/components/navbar/index" + "navbar": "/components/navbar/index", + "van-toast": "@vant/weapp/toast/index" } } diff --git a/src/patient/pages/qolAdd/index.scss b/src/patient/pages/qolAdd/index.scss index 12e9346..98b4e47 100644 --- a/src/patient/pages/qolAdd/index.scss +++ b/src/patient/pages/qolAdd/index.scss @@ -1,5 +1,5 @@ page { - background-color: #F6F8F9; + background-color: #f6f8f9; } .page { @@ -127,3 +127,7 @@ page { } } } + +.toast { + font-size: 40rpx; +} diff --git a/src/patient/pages/qolAdd/index.ts b/src/patient/pages/qolAdd/index.ts index 8948d15..3da645a 100644 --- a/src/patient/pages/qolAdd/index.ts +++ b/src/patient/pages/qolAdd/index.ts @@ -1,7 +1,10 @@ +import Toast from '@vant/weapp/toast/toast' + const app = getApp() Page({ data: { + toastText: '', id: '', step: 0, qolList0: [ @@ -198,6 +201,19 @@ Page({ }) }, handleNext() { + const { qolList0 } = this.data + for (let i = 0; i < qolList0.length; i++) { + const item = qolList0[i] + const order = item.title.split('.')[0] + if (!item.answer) { + this.setData({ + toastText: `请填写第${order}题`, + }) + Toast() + return + } + } + this.setData({ step: 1, }) @@ -218,10 +234,10 @@ Page({ const item = arr[i] const order = item.title.split('.')[0] if (!item.answer) { - wx.showToast({ - title: `请填写第${order}题`, - icon: 'none', + this.setData({ + toastText: `请填写第${order}题`, }) + Toast() return } form[`Question${order}`] = item.answer @@ -244,11 +260,22 @@ Page({ }) }, handleBack() { - wx.navigateBack({ - fail() { - wx.reLaunch({ - url: '/patient/pages/index/index', - }) + wx.showModal({ + content: '已答问题将被清空,是否放弃自评?', + confirmColor: '#8c75d0', + cancelColor: '#141515', + cancelText: '放弃', + confirmText: '继续', + success: (e) => { + if (e.cancel) { + wx.navigateBack({ + fail() { + wx.reLaunch({ + url: '/patient/pages/index/index', + }) + }, + }) + } }, }) }, diff --git a/src/patient/pages/qolAdd/index.wxml b/src/patient/pages/qolAdd/index.wxml index 0fb040a..9c99352 100644 --- a/src/patient/pages/qolAdd/index.wxml +++ b/src/patient/pages/qolAdd/index.wxml @@ -64,3 +64,7 @@ 上一步 + + + {{toastText}} + diff --git a/src/patient/pages/qolResult/index.scss b/src/patient/pages/qolResult/index.scss index e0f4895..75d7478 100644 --- a/src/patient/pages/qolResult/index.scss +++ b/src/patient/pages/qolResult/index.scss @@ -21,7 +21,7 @@ p age { } .w-header { display: flex; - align-items: flex-end; + align-items: flex-start; gap: 10rpx; line-height: 1; .num { @@ -30,6 +30,7 @@ p age { font-weight: bold; } .label { + margin-top: 14rpx; padding: 4rpx 16rpx; margin-bottom: 14rpx; font-size: 28rpx; @@ -175,7 +176,7 @@ p age { } .page-effect-wrap { margin-top: 40rpx; - background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); + background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 40%); border-radius: 32rpx; box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(25, 0, 57, 0.07); .e-header { @@ -198,6 +199,9 @@ p age { .r1 { font-size: 32rpx; color: #211d2e; + .num{ + color: #B982FF; + } } .btn { margin-top: 44rpx; diff --git a/src/patient/pages/qolResult/index.ts b/src/patient/pages/qolResult/index.ts index 80044d6..2b23fe6 100644 --- a/src/patient/pages/qolResult/index.ts +++ b/src/patient/pages/qolResult/index.ts @@ -5,7 +5,7 @@ Page({ id: '', detail: {}, - popupShow: true, + popupShow: false, popupType: 'popup8', popupParams: { close: true, @@ -17,6 +17,27 @@ Page({ }) app.waitLogin({ type: [1] }).then(() => { this.getDetail() + this.getToast() + }) + }, + getToast() { + wx.ajax({ + method: 'GET', + url: '?r=zd/popup/get-popup', + data: { + type: 2, + }, + }).then((res) => { + if (res.showAlert) { + this.setData({ + popupShow: true, + popupType: 'popup8', + popupParams: { + subscribe_img: res.subscribe_img, + close: true, + }, + }) + } }) }, getDetail() { @@ -46,8 +67,21 @@ Page({ }, }) }, - handlePopupOk() {}, - handlePopupCancel() {}, + handlePopupOk() { + this.handlePopupCancel() + }, + handlePopupCancel() { + wx.ajax({ + method: 'POST', + url: '?r=zd/popup/add-record', + data: { + type: 2, + }, + }) + this.setData({ + popupShow: false, + }) + }, }) export {} diff --git a/src/patient/pages/qolResult/index.wxml b/src/patient/pages/qolResult/index.wxml index 9008b42..142cb3d 100644 --- a/src/patient/pages/qolResult/index.wxml +++ b/src/patient/pages/qolResult/index.wxml @@ -29,9 +29,9 @@ 视觉功能得分:{{detail.VisionScore}} - 轻度影响 - 中度影响 - 重度影响 + 轻度 + 中度 + 重度 @@ -69,9 +69,9 @@ 外观得分:{{detail.AppearanceScore}} - 轻度影响 - 中度影响 - 重度影响 + 轻度 + 中度 + 重度 @@ -102,16 +102,16 @@ - 分数越低, 对生活质量影响越严重 + - + 建议就诊检查,评估是否需要调整治 定期评测,可帮助您更好地了解改善情况 - 已完成评测x次 + 已完成评测{{detail.Times}} 查看我的评估报告 diff --git a/src/utils/page.ts b/src/utils/page.ts index 969e101..e51ce6f 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -25,9 +25,11 @@ function page(config: WechatMiniprogram.Page.Instance 20) { background = '#ffffff' } - this.setData({ - background, - }) + if (background !== this.data.background) { + this.setData({ + background, + }) + } if (originalOnPageScroll) { originalOnPageScroll.call(this, options) }