diff --git a/package.json b/package.json index cabad14..e833ce9 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@babel/plugin-transform-react-jsx": "^7.23.4", "eslint": "^9.9.1", "eslint-config-prettier": "^9.1.0", - "miniprogram-api-typings": "^3.12.2", + "miniprogram-api-typings": "^3.12.3", "prettier": "^3.3.3", "typescript": "^5.8.3" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92e7cc6..a6f0cf0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,7 +49,7 @@ importers: specifier: ^9.1.0 version: 9.1.0(eslint@9.27.0) miniprogram-api-typings: - specifier: ^3.12.2 + specifier: ^3.12.3 version: 3.12.3 prettier: specifier: ^3.3.3 @@ -182,6 +182,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.28.0': + resolution: {integrity: sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-syntax-jsx@7.27.1': resolution: {integrity: sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==} engines: {node: '>=6.9.0'} @@ -206,6 +211,10 @@ packages: resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==} engines: {node: '>=6.9.0'} + '@babel/types@7.28.0': + resolution: {integrity: sha512-jYnje+JyZG5YThjHiF28oT4SIZLnYOcSBb6+SDaFIyzDVSkXQmQQYclJ2R+YxcdmK0AX6x1E5OQNtuh3jHDrUg==} + engines: {node: '>=6.9.0'} + '@clack/core@0.4.1': resolution: {integrity: sha512-Pxhij4UXg8KSr7rPek6Zowm+5M22rbd2g1nfojHJkxp5YkFqiZ2+YLEM/XGVIzvGOcM0nqjIFxrpDwWRZYWYjA==} @@ -329,6 +338,9 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/sourcemap-codec@1.5.4': + resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -1507,8 +1519,8 @@ packages: resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} engines: {node: '>=4'} - postcss@8.5.3: - resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -1958,6 +1970,10 @@ snapshots: dependencies: '@babel/types': 7.27.1 + '@babel/parser@7.28.0': + dependencies: + '@babel/types': 7.28.0 + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.27.1)': dependencies: '@babel/core': 7.27.1 @@ -1997,6 +2013,11 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 + '@babel/types@7.28.0': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + '@clack/core@0.4.1': dependencies: picocolors: 1.1.1 @@ -2136,6 +2157,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/sourcemap-codec@1.5.4': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -2345,7 +2368,7 @@ snapshots: '@vue/compiler-core@3.5.14': dependencies: - '@babel/parser': 7.27.2 + '@babel/parser': 7.28.0 '@vue/shared': 3.5.14 entities: 4.5.0 estree-walker: 2.0.2 @@ -2358,14 +2381,14 @@ snapshots: '@vue/compiler-sfc@3.5.14': dependencies: - '@babel/parser': 7.27.2 + '@babel/parser': 7.28.0 '@vue/compiler-core': 3.5.14 '@vue/compiler-dom': 3.5.14 '@vue/compiler-ssr': 3.5.14 '@vue/shared': 3.5.14 estree-walker: 2.0.2 magic-string: 0.30.17 - postcss: 8.5.3 + postcss: 8.5.6 source-map-js: 1.2.1 '@vue/compiler-ssr@3.5.14': @@ -3065,7 +3088,7 @@ snapshots: magic-string@0.30.17: dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.4 make-dir@2.1.0: dependencies: @@ -3536,7 +3559,7 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss@8.5.3: + postcss@8.5.6: dependencies: nanoid: 3.3.11 picocolors: 1.1.1 diff --git a/project.private.config.json b/project.private.config.json index 53fc475..ecc8995 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -23,13 +23,90 @@ "miniprogram": { "list": [ { - "name": "患者-绑定医生", - "pathName": "patient/pages/bindDoctor/index", + "name": "医生-修改手机号", + "pathName": "doctor/pages/changeTel/index", "query": "", "scene": null, "launchMode": "default" }, { + "name": "医生-账号管理", + "pathName": "doctor/pages/userInfo/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "医生-我的", + "pathName": "doctor/pages/my/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-出血管理添加", + "pathName": "patient/pages/bloodAdd/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-出血管理详情", + "pathName": "patient/pages/bloodDetail/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-出血管理", + "pathName": "patient/pages/blood/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-亲友", + "pathName": "patient/pages/familyScan/index", + "query": "scene=pId%3D1", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-亲友绑定", + "pathName": "patient/pages/familyScan/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-录入个人信息", + "pathName": "patient/pages/entryInfo/index", + "query": "aid=5", + "launchMode": "default", + "scene": null + }, + { + "name": "医生-首页", + "pathName": "doctor/pages/index/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "医生-登录", + "pathName": "doctor/pages/login/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-绑定医生", + "pathName": "patient/pages/bindDoctor/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { "name": "患者-亲友列表", "pathName": "patient/pages/familyList/index", "query": "", @@ -107,7 +184,7 @@ "scene": null }, { - "name": "患者-凝血因子统计", + "name": "患者-查看我的健康变化", "pathName": "patient/pages/coltStat/index", "query": "", "launchMode": "default", @@ -206,14 +283,7 @@ }, { "name": "患者-首页", - "pathName": "patient/pages/home/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "患者-录入个人信息", - "pathName": "patient/pages/entryInfo/index", + "pathName": "patient/pages/index/index", "query": "", "launchMode": "default", "scene": null diff --git a/src/app.json b/src/app.json index e2370c2..1345758 100644 --- a/src/app.json +++ b/src/app.json @@ -19,7 +19,7 @@ "pages/protocol/index", "pages/login/index", "pages/entryInfo/index", - "pages/home/index", + "pages/index/index", "pages/askPatient/index", "pages/doctorList/index", "pages/course/index", @@ -42,8 +42,25 @@ "pages/loginOut/index", "pages/family/index", "pages/familyList/index", + "pages/familyScan/index", "pages/bindDoctor/index", - "pages/selectDoctorList/index" + "pages/selectDoctorList/index", + "pages/knowledge/index", + "pages/knowledgeDetail/index", + "pages/knowledgeDetailVideo/index", + "pages/blood/index", + "pages/bloodDetail/index", + "pages/bloodAdd/index" + ] + }, + { + "root": "doctor", + "pages": [ + "pages/login/index", + "pages/index/index", + "pages/my/index", + "pages/userInfo/index", + "pages/changeTel/index" ] }, { diff --git a/src/app.ts b/src/app.ts index 6d65b2f..ee0714e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -3,10 +3,14 @@ import { request } from './api/request' import { parseScene } from './utils/util' const licia = require('miniprogram-licia') -import plugin from '@/components/calendar/plugins/index.js' -import timeRange from '@/components/calendar/plugins/time-range.js' -plugin.use(timeRange) +import plugin from './components/calendar/plugins/index' +import selectable from './components/calendar/plugins/selectable' +import solarLunar from './components/calendar/plugins/solarLunar/index' +import todo from './components/calendar/plugins/todo' +import week from './components/calendar/plugins/week.js' + +plugin.use(todo).use(solarLunar).use(selectable).use(week) const dayjs = require('dayjs') require('/utils/dayjs/day-zh-cn.js') @@ -32,13 +36,11 @@ App({ // imageUrl: 'https://m.gene.hbsaas.com/GeneB/', Timestamp: new Date().getTime(), + waitBindDoctorId: '', scene: {}, loginState: '', - isLogin: 0, // 0 未登录 1 已登录 - isReg: 0, - userId: '', - guestPrivacyAgree: false, + initLoginInfo: {}, // anyWhere: true, anyWhere: false, @@ -63,7 +65,7 @@ App({ } this.startLogin() }, - startLogin() { + startLogin(callback?: () => void) { wx.login({ success: (res) => { wx.ajax({ @@ -74,28 +76,67 @@ App({ }, }).then((res) => { this.globalData.loginState = res.loginState - this.globalData.isReg = res.isReg - this.globalData.isLogin = res.isLogin - this.globalData.userId = res.userId - this.globalData.guestPrivacyAgree = res.guestPrivacyAgree + this.globalData.initLoginInfo = res + if (callback) { + callback() + } }) }, }) }, - waitLogin() { - let time: number - return new Promise((resolve: (value?) => void) => { - if (this.globalData.loginState) { - resolve() - return + updateLoginInfo(callback?: () => void) { + wx.ajax({ + method: 'GET', + url: '?r=wtx/user/init-info', + data: {}, + }).then((res) => { + this.globalData.initLoginInfo = res + if (callback) { + callback() } - time = setInterval(() => { + }) + }, + waitLogin({ type = 0 } = { type: 'any' }) { + return new Promise((resolve) => { + const checkLogin = () => { if (this.globalData.loginState) { - clearInterval(time) - resolve() + if (type === 'any') { + resolve() + } else if (this.checkLoginType(type)) { + resolve() + } + return } - }, 500) + setTimeout(() => { + checkLogin() + }, 500) + } + checkLogin() + }) + }, + 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', + }) + } + return false + } + if (loginType === type) { + return true + } + const typePageUrl = { + 1: '/patient/pages/index/index', + 2: '/doctor/pages/index/index', + }[loginType as 1 | 2] + wx.reLaunch({ + url: typePageUrl, }) + return false }, mpBehavior(data: { PageName: string }) { wx.ajax({ @@ -109,10 +150,24 @@ App({ }) }, - getUserInfo() { + getUserInfo(type: 1 | 2 | 3 = 1) { + const url = { + 1: '?r=wtx/user/userinfo', + 2: '?r=wtx/account/info', + 3: '?r=wtx/doctor/account/info', + }[type] return wx.ajax({ method: 'GET', - url: '?r=wtx/user/userinfo', + url: url, + }) + }, + getDoctorInfo(doctorId: string) { + return wx.ajax({ + method: 'GET', + url: '?r=wtx/doctor/get-info', + data: { + doctorId, + }, }) }, autoUpdate: function () { diff --git a/src/components/calendar/plugins/index.d.ts b/src/components/calendar/plugins/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/src/components/calendar/plugins/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss index 4ff51b7..fa8185c 100644 --- a/src/components/popup/index.scss +++ b/src/components/popup/index.scss @@ -939,6 +939,115 @@ } } +.popup16 { + .container { + width: 630rpx; + padding: 48rpx 32rpx 34rpx; + box-sizing: border-box; + background: linear-gradient(to top, #ffffff 0%, #ffffff 86%, #ffedeb 100%); + .title { + display: block; + margin: 0 auto; + width: 320rpx; + height: 38rpx; + } + .list { + margin-top: 20rpx; + max-height: 50vh; + overflow-y: auto; + &::-webkit-scrollbar { + display: none; + } + .list-item { + position: relative; + margin-top: 32rpx; + padding: 32rpx; + background: #ffffff; + display: flex; + align-items: center; + gap: 16rpx; + justify-content: space-between; + box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 24rpx 24rpx 24rpx 24rpx; + &:last-of-type { + border: none; + } + .radio { + width: 32rpx; + height: 32rpx; + background-color: rgba(247, 247, 250, 1); + border-radius: 50%; + .r-icon { + width: 100%; + height: 100%; + border-radius: 50%; + } + } + .avatar { + flex-shrink: 0; + width: 92rpx; + height: 92rpx; + border-radius: 50%; + } + .wrap { + flex: 1; + .name { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + font-weight: bold; + } + .hostipal { + margin-top: 16rpx; + line-height: 28rpx; + .content { + margin-right: 8rpx; + display: inline-block; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + } + .tag { + display: inline-block; + font-size: 20rpx; + color: rgba(255, 255, 255, 1); + padding: 0 8rpx; + background-color: rgba(255, 186, 1, 1); + border-radius: 6rpx; + } + } + } + } + } + .footer { + margin-top: 48rpx; + display: flex; + gap: 26rpx; + .cancel { + flex: 1; + padding: 22rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: rgba(246, 74, 58, 1); + border-radius: 84rpx; + border: 1px solid #f64a3a; + } + .submit { + flex: 1; + padding: 22rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #fff; + background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); + border-radius: 84rpx; + border: 1px solid #f64a3a; + } + } + } +} + .close { margin: 32rpx auto 0; display: block; diff --git a/src/components/popup/index.ts b/src/components/popup/index.ts index 5b03073..4945a48 100644 --- a/src/components/popup/index.ts +++ b/src/components/popup/index.ts @@ -1,3 +1,5 @@ +import { wxPromiseWrapper } from 'XrFrame/core/utils' + const app = getApp() Component({ @@ -47,5 +49,9 @@ Component({ app.mpBehavior({ PageName: 'BTN_PATIENTPRIVACY' }) } }, + handleSelectStatus(e) { + const { status } = e.currentTarget.dataset + this.triggerEvent('ok', { type: 'selectStatusComplete', status }) + }, }, }) diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml index ad58760..c740d1f 100644 --- a/src/components/popup/index.wxml +++ b/src/components/popup/index.wxml @@ -1,8 +1,9 @@ - + - 王青 + {{params.name}} - 北京积水潭医院龙泽院区 - 三甲 + {{params.hostipal}} + {{params.className}}{{params.levelName}} - 确定 + 确定 - 请检查网络后重试 - 重新扫码 + {{params.msg}} + 重新扫码 @@ -106,7 +104,7 @@ 记录下您此次的检查情况吧 请基于您的实际检查结果点选合适的检查状态 - + 多项不达标 @@ -116,7 +114,7 @@ - + 少量不达标 @@ -126,7 +124,7 @@ - + 整体不错 @@ -200,8 +198,8 @@ disable-default-padding > - 取消 - 提交 + 取消 + 提交 @@ -226,21 +224,18 @@ - + - 王青 + {{params.name}} - 北京积水潭医院龙泽院区 - 三甲 + {{params.hostipal}} + {{params.className}}{{params.levelName}} - 取消 - 提交 + 取消 + 提交 @@ -274,8 +269,35 @@ - 暂不绑定 - 注册并绑定> + 暂不绑定 + 注册并绑定> + + + + + + + + + + + + + + 王青 + + 北京积水潭医院龙泽院区 + 三甲 + + + + + + 取消 + 确定 diff --git a/src/components/popupDoctor/index.json b/src/components/popupDoctor/index.json new file mode 100644 index 0000000..074f50b --- /dev/null +++ b/src/components/popupDoctor/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "@vant/weapp/popup/index" + } +} diff --git a/src/components/popupDoctor/index.scss b/src/components/popupDoctor/index.scss new file mode 100644 index 0000000..e77322b --- /dev/null +++ b/src/components/popupDoctor/index.scss @@ -0,0 +1,91 @@ +.popup { + .container { + width: 630rpx; + padding: 48rpx 32rpx 0; + box-sizing: border-box; + background: linear-gradient(to top, #ffffff 0%, #ffffff 86%, #ffedeb 100%); + .title { + font-size: 36rpx; + color: rgba(20, 21, 21, 1); + font-weight: bold; + text-align: center; + } + .user { + position: relative; + margin-top: 32rpx; + display: flex; + align-items: center; + gap: 24rpx; + justify-content: space-between; + .avatar { + flex-shrink: 0; + width: 92rpx; + height: 92rpx; + border-radius: 50%; + } + .wrap { + flex: 1; + .name { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + font-weight: bold; + } + .content { + padding-top: 12rpx; + font-size: 28rpx; + color: rgba(1, 1, 5, 1); + display: flex; + align-items: center; + gap: 10rpx; + .line { + color: rgba(205, 205, 205, 0.6); + } + } + } + } + .row { + padding: 26rpx 0; + display: flex; + gap: 24rpx; + border-bottom: 1px solid rgba(247, 247, 250, 1); + .label { + flex-shrink: 0; + font-size: 32rpx; + color: rgba(161, 164, 172, 1); + } + .col { + .content { + margin-right: 8rpx; + display: inline-block; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + max-height: 30vh; + overflow-y: auto; + &::-webkit-scrollbar { + display: none; + } + } + .tag { + display: inline-block; + font-size: 20rpx; + color: rgba(255, 255, 255, 1); + padding: 0 8rpx; + background-color: rgba(255, 186, 1, 1); + border-radius: 6rpx; + } + } + } + .footer { + padding: 32rpx; + font-size: 32rpx; + color: rgba(246, 74, 58, 1); + text-align: center; + } + } +} +.close { + margin: 32rpx auto 0; + display: block; + width: 64rpx; + height: 64rpx; +} diff --git a/src/components/popupDoctor/index.ts b/src/components/popupDoctor/index.ts new file mode 100644 index 0000000..4483ef7 --- /dev/null +++ b/src/components/popupDoctor/index.ts @@ -0,0 +1,66 @@ +const app = getApp() + +Component({ + properties: { + did: { + type: String, + value: '', + }, + }, + + data: { + show: false, + doctorInfo: {}, + + imageUrl: app.globalData.imageUrl, + Timestamp: app.globalData.Timestamp, + }, + methods: { + handleShow() { + wx.ajax({ + method: 'GET', + url: '?r=wtx/doctor/get-info', + data: { + doctorId: this.data.did, + }, + }).then((res) => { + this.setData({ + doctorInfo: res, + show: true, + }) + }) + }, + handleCancel() { + this.setData({ + show: false, + }) + }, + handleUnbind() { + const { did } = this.data + wx.showModal({ + title: '确认解绑?', + confirmColor: 'rgba(246, 74, 58, 1)', + success: (res) => { + if (res.confirm) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/account/unbind-doctor', + data: { + doctorId: did, + }, + }).then(() => { + wx.showToast({ + title: '解绑成功', + icon: 'none', + }) + this.setData({ + show: false, + }) + this.triggerEvent('update') + }) + } + }, + }) + }, + }, +}) diff --git a/src/components/popupDoctor/index.wxml b/src/components/popupDoctor/index.wxml new file mode 100644 index 0000000..51a6fc5 --- /dev/null +++ b/src/components/popupDoctor/index.wxml @@ -0,0 +1,45 @@ + + + + + + 医生介绍 + + + + {{doctorInfo.doctorName}} + + + + 所在医院 + + {{doctorInfo.hospitalName}} + {{doctorInfo.hospitalClassificationName}}{{doctorInfo.hospitalLevelName}} + + + + 医生简介 + + {{doctorInfo.doctorIntroduce || '--'}} + + + 解绑此医生 + + + + + diff --git a/src/doctor/components/doctor-tab-bar/index.json b/src/doctor/components/doctor-tab-bar/index.json new file mode 100644 index 0000000..4573acb --- /dev/null +++ b/src/doctor/components/doctor-tab-bar/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-tabbar": "@vant/weapp/tabbar/index", + "van-tabbar-item": "@vant/weapp/tabbar-item/index" + } +} diff --git a/src/doctor/components/doctor-tab-bar/index.scss b/src/doctor/components/doctor-tab-bar/index.scss new file mode 100644 index 0000000..319ff99 --- /dev/null +++ b/src/doctor/components/doctor-tab-bar/index.scss @@ -0,0 +1,16 @@ +/* custom-tab-bar/index.wxss */ + + +.tab-item { + .icon { + width: 50rpx; + height: 50rpx; + } + .name { + font-size: 24rpx; + color: #010105; + &.active{ + color: rgba(28, 107, 255, 1); + } + } +} diff --git a/src/doctor/components/doctor-tab-bar/index.ts b/src/doctor/components/doctor-tab-bar/index.ts new file mode 100644 index 0000000..252fa06 --- /dev/null +++ b/src/doctor/components/doctor-tab-bar/index.ts @@ -0,0 +1,53 @@ +import { getCurrentPageUrl } from '@/utils/util' +const app = getApp() + +Component({ + properties: {}, + data: { + imageUrl: app.globalData.imageUrl, + isChild: 0, + active: 0, + list: [ + { + pagePath: '/doctor/pages/index/index', + text: '基因疗法', + icon: 'tabbar3-1', + iconActive: 'tabbar3-1-active', + }, + { + pagePath: '/doctor/pages/index/index', + text: '知识库', + icon: 'tabbar3-1', + iconActive: 'tabbar3-1-active', + }, + { + pagePath: '/doctor/pages/my/index', + text: '我的', + icon: 'tabbar3-2', + iconActive: 'tabbar3-2-active', + }, + ], + }, + observers: {}, + lifetimes: { + ready() { + const pagePath = getCurrentPageUrl() + const active = this.data.list.findIndex((item) => item.pagePath === pagePath) + this.setData({ + active, + anyWhere: app.globalData.anyWhere, + }) + }, + }, + methods: { + onChange() {}, + handleNav(e) { + const { index } = e.currentTarget.dataset + const { list } = this.data + const pagePath = list[index].pagePath + wx.reLaunch({ + url: pagePath, + }) + }, + }, +}) diff --git a/src/doctor/components/doctor-tab-bar/index.wxml b/src/doctor/components/doctor-tab-bar/index.wxml new file mode 100644 index 0000000..290af27 --- /dev/null +++ b/src/doctor/components/doctor-tab-bar/index.wxml @@ -0,0 +1,14 @@ + + + + {{item.text}} + + + + diff --git a/src/doctor/pages/changeTel/index.json b/src/doctor/pages/changeTel/index.json new file mode 100644 index 0000000..4d65365 --- /dev/null +++ b/src/doctor/pages/changeTel/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "修改手机号", + "usingComponents": {} +} diff --git a/src/doctor/pages/changeTel/index.scss b/src/doctor/pages/changeTel/index.scss new file mode 100644 index 0000000..7b0ef30 --- /dev/null +++ b/src/doctor/pages/changeTel/index.scss @@ -0,0 +1,50 @@ +page { + background-color: rgba(247, 247, 250, 1); +} + +.page { + padding: 48rpx 40rpx; + .form { + padding: 0 32rpx; + background-color: #fff; + border-radius: 24rpx; + .row { + display: flex; + align-items: center; + .label { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + width: 5em; + } + .container { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + .input { + padding: 32rpx 0; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .place-input { + color: rgba(161, 164, 172, 0.4); + } + .btn { + flex-shrink: 0; + font-size: 32rpx; + color: rgba(28, 107, 255, 1); + } + } + } + } + .login-out { + margin-top: 48rpx; + padding: 20rpx; + font-size: 32rpx; + line-height: 48rpx; + color: #fff; + text-align: center; + background: linear-gradient(356deg, #1d6bff 0%, #4f8dff 100%); + border-radius: 96rpx; + } +} diff --git a/src/doctor/pages/changeTel/index.ts b/src/doctor/pages/changeTel/index.ts new file mode 100644 index 0000000..260251a --- /dev/null +++ b/src/doctor/pages/changeTel/index.ts @@ -0,0 +1,85 @@ +const app = getApp() +let timer = null as null | number + +Page({ + data: { + mobile: '', + code: '', + + codeText: '发送验证码', + }, + onLoad() {}, + getCode() { + if (timer) return + const mobile = this.data.mobile + if (!mobile) { + wx.showToast({ + title: '手机号不能为空', + icon: 'none', + }) + return + } + // 验证手机号 + if (!/^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/.test(mobile)) { + wx.showToast({ + title: '手机号格式不正确', + icon: 'none', + }) + return + } + wx.ajax({ + method: 'POST', + url: '?r=wtx/doctor/login/send-verify-code', + data: { + mobile, + }, + }).then((res) => { + console.log(res) + wx.showToast({ + icon: 'none', + title: '验证码已发送~', + }) + let time = 60 + timer = setInterval(() => { + time-- + this.setData({ + codeText: time + 's后重新发送', + }) + if (time <= 0) { + clearInterval(timer as number) + timer = null + this.setData({ + codeText: '发送验证码', + }) + } + }, 1000) + }) + }, + handleSubmit() { + wx.showModal({ + title: '确定修改此手机号?', + confirmColor: 'rgba(246, 74, 58, 1)', + success: (res) => { + if (!res.confirm) return + const { mobile, code } = this.data + const { registrationSource, registChannel, regBusinessId } = app.globalData + wx.ajax({ + method: 'POST', + url: '?r=wtx/doctor/account/update-telephone', + data: { + mobile, + code, + registrationSource, + registChannel, + regBusinessId, + }, + }).then((_res) => { + wx.navigateBack() + }) + }, + }) + }, + handleBack() { + wx.navigateBack() + }, +}) diff --git a/src/doctor/pages/changeTel/index.wxml b/src/doctor/pages/changeTel/index.wxml new file mode 100644 index 0000000..7f6067e --- /dev/null +++ b/src/doctor/pages/changeTel/index.wxml @@ -0,0 +1,30 @@ + + + + 新手机号 + + + + + + 验证码 + + + {{codeText}} + + + + + diff --git a/src/doctor/pages/index/index.json b/src/doctor/pages/index/index.json new file mode 100644 index 0000000..cf28c8e --- /dev/null +++ b/src/doctor/pages/index/index.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "navbar": "/components/navbar/index", + "doctor-tab-bar": "/doctor/components/doctor-tab-bar/index" + } +} diff --git a/src/doctor/pages/index/index.scss b/src/doctor/pages/index/index.scss new file mode 100644 index 0000000..51a9d5a --- /dev/null +++ b/src/doctor/pages/index/index.scss @@ -0,0 +1,403 @@ +page { + background-color: rgba(246, 246, 246, 1); +} +.page-title { + width: 400rpx; + height: 52rpx; +} + +.page { + padding-bottom: 240rpx; + .header { + padding: 46rpx 0 50rpx; + .user { + padding: 0 32rpx; + display: flex; + align-items: center; + justify-content: space-between; + gap: 24rpx; + .avatar { + flex-shrink: 0; + width: 120rpx; + height: 120rpx; + border-radius: 50%; + border: 2px solid #fff; + } + .wrap { + flex: 1; + .name { + font-size: 40rpx; + color: rgba(255, 255, 255, 1); + } + .content { + margin-top: 22rpx; + font-size: 28rpx; + color: rgba(255, 255, 255, 1); + } + } + .code { + flex-shrink: 0; + width: 72rpx; + height: 72rpx; + } + } + .patient { + margin-top: 26rpx; + .p-title { + padding-left: 32rpx; + font-size: 32rpx; + color: rgba(255, 255, 255, 1); + .num { + font-size: 48rpx; + font-weight: bold; + } + } + .swiper { + margin-top: 20rpx; + height: 116rpx; + .swiper-item { + padding: 0 12rpx 0; + box-sizing: border-box; + line-height: 1; + .swiper-item-container { + background-color: rgba(255, 255, 255, 0.9); + height: 100%; + border-radius: 24rpx; + padding: 20rpx; + display: flex; + align-items: center; + gap: 12rpx; + box-sizing: border-box; + .avatar { + width: 76rpx; + height: 76rpx; + border-radius: 50%; + } + .wrap { + .name { + font-size: 32rpx; + color: rgba(176, 178, 181, 1); + } + .date { + margin-top: 16rpx; + font-size: 24rpx; + color: rgba(105, 108, 114, 0.6); + } + } + } + &.active { + .swiper-item-container { + background-color: #fff; + box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1); + .wrap { + .name { + color: rgba(28, 107, 255, 1); + } + .date { + color: rgba(28, 107, 255, 0.6); + } + } + } + } + } + } + } + } + .body { + position: relative; + padding: 42rpx 40rpx 0; + background-color: rgba(246, 246, 246, 1); + border-radius: 32rpx 32rpx 0 0; + &::before { + position: absolute; + top: -25rpx; + left: 80rpx; + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 0 26rpx 26rpx 26rpx; + border-color: transparent transparent rgba(246, 246, 246, 1) transparent; + } + .doctor { + padding: 32rpx; + border-radius: 32rpx; + background-color: #fff; + .d-header { + display: flex; + align-items: center; + justify-content: space-between; + .title { + font-size: 32rpx; + color: rgba(34, 34, 34, 1); + font-weight: bold; + } + .message { + position: relative; + font-size: 28rpx; + color: rgba(0, 0, 0, 0.6); + .dot { + position: absolute; + right: -7rpx; + top: -7rpx; + width: 16rpx; + height: 16rpx; + border-radius: 50%; + background-color: rgba(232, 70, 60, 1); + } + } + } + .d-container { + margin-top: 32rpx; + display: flex; + align-items: center; + justify-content: space-between; + gap: 16rpx; + .avatar { + flex-shrink: 0; + width: calc(92rpx * 1.5); + display: flex; + .a-img { + flex-shrink: 0; + width: 92rpx; + height: 92rpx; + border-radius: 50%; + &:last-of-type { + transform: translateX(-50%); + } + } + } + .wrap { + flex: 1; + .name { + font-size: 32rpx; + color: rgba(34, 34, 34, 1); + font-weight: bold; + } + .content { + margin-top: 12rpx; + font-size: 28rpx; + color: rgba(0, 0, 0, 0.3); + } + } + .btn { + flex-shrink: 0; + width: 162rpx; + height: 56rpx; + font-size: 32rpx; + color: rgba(255, 255, 255, 1); + text-align: center; + line-height: 56rpx; + background: #1c6bff; + border-radius: 68rpx 68rpx 68rpx 68rpx; + } + } + } + .progress { + margin-top: 38rpx; + .p-header { + padding-bottom: 32rpx; + font-size: 32rpx; + color: rgba(34, 34, 34, 1); + font-weight: bold; + } + .card { + display: flex; + gap: 24rpx; + .c-aside { + flex-shrink: 0; + display: flex; + flex-direction: column; + align-items: center; + .line-top { + flex-shrink: 0; + height: 48rpx; + border-right: 1px dashed rgba(225, 225, 226, 1); + } + .num { + flex-shrink: 0; + width: 56rpx; + height: 56rpx; + border-radius: 50%; + font-size: 40rpx; + text-align: center; + line-height: 56rpx; + color: rgba(255, 255, 255, 1); + background-color: rgba(225, 225, 226, 1); + } + .line-bottom { + flex: 1; + border-right: 1px dashed rgba(225, 225, 226, 1); + } + .hide { + opacity: 0; + } + } + .c-container { + padding-bottom: 24rpx; + flex: 1; + .module { + position: relative; + padding: 32rpx; + background-color: #fff; + border-radius: 32rpx; + box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.05); + .m-header { + display: flex; + justify-content: space-between; + align-items: center; + .title { + font-size: 32rpx; + color: rgba(171, 174, 180, 1); + display: flex; + align-items: center; + gap: 8rpx; + .tag { + font-size: 28rpx; + color: rgba(171, 174, 180, 1); + line-height: 34rpx; + padding: 0 18rpx; + border-radius: 40rpx 40rpx 40rpx 40rpx; + border: 1rpx solid rgba(171, 174, 180, 0.52); + } + } + .date { + font-size: 28rpx; + color: rgba(171, 174, 180, 1); + } + } + .m-body { + margin-top: 16rpx; + display: flex; + align-items: center; + justify-content: space-between; + .status { + font-size: 28rpx; + color: rgba(171, 174, 180, 1); + display: flex; + align-items: center; + gap: 10rpx; + .icon { + opacity: 0; + width: 36rpx; + height: 36rpx; + } + } + .detail { + font-size: 28rpx; + color: rgba(28, 107, 255, 1); + } + } + .btn { + position: absolute; + top: 48rpx; + right: 32rpx; + width: 162rpx; + height: 56rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: rgba(181, 184, 189, 0.6); + border-radius: 68rpx 68rpx 68rpx 68rpx; + border: 2rpx solid rgba(181, 184, 189, 0.6); + } + } + } + &.finish { + .c-aside { + .line-top { + border-color: rgba(28, 107, 255, 1); + } + .num { + background-color: rgba(14, 209, 167, 1); + } + .line-bottom { + border-color: rgba(28, 107, 255, 1); + } + } + .c-container { + .module { + .m-header { + .title { + color: rgba(34, 34, 34, 1); + } + } + .m-body { + .status { + color: rgba(14, 209, 167, 1); + .icon { + opacity: 1; + } + } + .detail { + color: rgba(28, 107, 255, 1); + } + } + } + } + } + &.current { + .c-aside { + .line-top { + border-color: rgba(28, 107, 255, 1); + } + .num { + background-color: rgba(28, 107, 255, 1); + } + } + .c-container { + .module { + .m-header { + .title { + color: rgba(34, 34, 34, 1); + } + } + .m-body { + .status { + color: rgba(34, 34, 34, 1); + } + .detail { + color: rgba(28, 107, 255, 1); + } + } + } + } + } + } + } + .kkd { + margin-top: 32rpx; + display: flex; + align-items: center; + justify-content: space-between; + gap: 22rpx; + .k-item { + padding: 28rpx 24rpx; + flex: 1; + background: linear-gradient(52deg, #ffffff 0%, #eff4ff 100%); + border-radius: 32rpx 32rpx 32rpx 32rpx; + border: 2rpx solid #ffffff; + display: flex; + align-items: center; + .icon { + width: 88rpx; + height: 88rpx; + } + .wrap { + padding-left: 14rpx; + .title { + font-size: 28rpx; + color: rgba(34, 34, 34, 1); + line-height: 44rpx; + } + .content { + font-size: 32rpx; + color: rgba(34, 34, 34, 1); + font-weight: bold; + } + } + } + } + } +} diff --git a/src/doctor/pages/index/index.ts b/src/doctor/pages/index/index.ts new file mode 100644 index 0000000..067b6bb --- /dev/null +++ b/src/doctor/pages/index/index.ts @@ -0,0 +1,8 @@ +const _app = getApp(); + +Page({ + data: {}, + onLoad() {}, +}); + +export {} diff --git a/src/doctor/pages/index/index.wxml b/src/doctor/pages/index/index.wxml new file mode 100644 index 0000000..f035e5c --- /dev/null +++ b/src/doctor/pages/index/index.wxml @@ -0,0 +1,177 @@ + + + + + + + + + 王青 + 北京协和医院 + + + + + + 您当前跟进 + 4 + 个患者 + + + + + + + 刘可 + 2024.3.12 + + + + + + + + + + 共同照护团队 + + 最新消息12条 + + + + + + + + + + 刘湖飞 + 天津血液科诊断中心 + + 去看看> + + + + 刘可的检查进展 + + + + 1 + + + + + + 诊前筛查 + 2024-08-24 + + + + 已完成 + + + 查看详情 + + + + + + + + 2 + + + + + + 注射前准备 + + + + 进行中 + + + + + + + + + + 3 + + + + + + + 诊前筛查 + 还未确定注射日 + + + + + 待启动 + + + + + + + + + + 4 + + + + + + 诊前筛查 + + + + 已完成 + + + + 待启动 + + + + + + + + + 他的全部 + 病历档案 + + + + + + 查看他的 + 健康变化 + + + + + + + diff --git a/src/doctor/pages/login/index.json b/src/doctor/pages/login/index.json new file mode 100644 index 0000000..17c750f --- /dev/null +++ b/src/doctor/pages/login/index.json @@ -0,0 +1,6 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "van-divider": "@vant/weapp/divider/index" + } +} diff --git a/src/doctor/pages/login/index.scss b/src/doctor/pages/login/index.scss new file mode 100644 index 0000000..0a5a778 --- /dev/null +++ b/src/doctor/pages/login/index.scss @@ -0,0 +1,125 @@ +page { + background-color: rgba(246, 246, 246, 1); +} +.page { + padding: 0 70rpx 100rpx; + .logo { + display: block; + margin: 0 auto; + width: 164rpx; + height: 164rpx; + border-radius: 24rpx; + } + .title { + margin-top: 32rpx; + text-align: center; + font-size: 48rpx; + color: transparent; + background: linear-gradient(0deg, rgba(114, 163, 255, 1) 0%, rgba(29, 107, 255, 1) 100%); + font-weight: bold; + -webkit-background-clip: text; + background-clip: text; + } + .form { + margin-top: 50rpx; + .form-row { + margin-bottom: 32rpx; + display: flex; + justify-content: space-between; + align-items: center; + padding: 12rpx 12rpx 12rpx 32rpx; + background-color: #fff; + border-radius: 24rpx; + .input { + flex: 1; + line-height: 60rpx; + height: 60rpx; + font-size: 32rpx; + } + .place-input { + color: rgba(161, 164, 172, 1); + } + .btn { + padding: 0 24rpx; + height: 60rpx; + font-size: 28rpx; + color: rgba(255, 255, 255, 1); + display: flex; + align-items: center; + justify-content: center; + background-color: rgba(28, 107, 255, 1); + border-radius: 20rpx; + } + } + .submit { + margin-top: 50rpx; + height: 96rpx; + font-size: 32rpx; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + border-radius: 84rpx 84rpx 84rpx 84rpx; + background: linear-gradient(356deg, #1d6bff 0%, #4f8dff 100%); + } + } + .divider { + margin: 48rpx 150rpx 0; + .van-divider { + color: rgba(207, 209, 213, 1); + } + } + .phone { + margin-top: 38rpx; + height: 48rpx; + width: 280rpx; + font-size: 24rpx; + color: rgba(161, 164, 172, 1); + display: flex; + align-items: center; + justify-content: center; + border-radius: 84rpx 84rpx 84rpx 84rpx; + background-color: #fff; + &::after { + border: none; + } + .icon { + width: 48rpx; + height: 48rpx; + } + } + .tel-btn { + margin: 0 auto; + padding: 4rpx 0; + width: 266rpx; + display: flex; + align-items: center; + justify-content: center; + gap: 12rpx; + background: #f7f7fa; + border-radius: 24rpx; + font-size: 24rpx; + color: rgba(161, 164, 172, 1); + .icon { + width: 40rpx; + height: 40rpx; + } + } + .signature { + margin-top: 88rpx; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + line-height: 48rpx; + .row { + margin-top: 24rpx; + display: flex; + .checkbox { + margin-top: -8rpx; + transform: scale(0.8); + } + } + .link { + color: rgba(28, 107, 255, 1); + } + } +} diff --git a/src/doctor/pages/login/index.ts b/src/doctor/pages/login/index.ts new file mode 100644 index 0000000..20c77bc --- /dev/null +++ b/src/doctor/pages/login/index.ts @@ -0,0 +1,116 @@ +const app = getApp() +let timer = null as null | number + +Page({ + data: { + showTel: false, + mobile: '', + code: '', + + codeText: '发送验证码', + + check1: false, + check2: false, + }, + onLoad() {}, + getCode() { + if (timer) return + const mobile = this.data.mobile + if (!mobile) { + wx.showToast({ + title: '手机号不能为空', + icon: 'none', + }) + return + } + // 验证手机号 + if (!/^1[3-9,]\d{9}$/.test(mobile)) { + wx.showToast({ + title: '手机号格式不正确', + icon: 'none', + }) + return + } + wx.ajax({ + method: 'POST', + url: '?r=wtx/doctor/login/send-verify-code', + data: { + mobile, + }, + }).then((_res) => { + wx.showToast({ + icon: 'none', + title: '验证码已发送~', + }) + let time = 60 + timer = setInterval(() => { + time-- + this.setData({ + codeText: `${time}s后重新发送`, + }) + if (time <= 0) { + clearInterval(timer as number) + timer = null + this.setData({ + codeText: '发送验证码', + }) + } + }, 1000) + }) + }, + handleDocRule() { + const { check1, check2 } = this.data + return new Promise((resolve) => { + if (check1 && check2) { + return resolve(true) + } + wx.showToast({ + title: '请同意相关协议', + icon: 'none', + }) + }) + }, + async handleSubmit() { + await this.handleDocRule() + const { mobile, code } = this.data + wx.ajax({ + method: 'POST', + url: '?r=wtx/doctor/login/reg-login', + data: { + mobile, + code, + }, + }).then((_res) => { + this.submitCallback() + }) + }, + handleWxSubmit(e: WechatMiniprogram.CustomEvent) { + const { iv, encryptedData } = e.detail + if (iv && encryptedData) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/doctor/login/wx-reg-login', + data: { + iv: encodeURIComponent(iv), + encryptedData: encodeURIComponent(encryptedData), + }, + }).then((_res) => { + this.submitCallback() + }) + } + }, + submitCallback() { + app.getUserInfo(3).then(() => { + wx.reLaunch({ + url: `/doctor/pages/index/index`, + }) + }) + }, + handleShowTel() { + this.setData({ + showTel: !this.data.showTel, + }) + }, +}) + +export {} diff --git a/src/doctor/pages/login/index.wxml b/src/doctor/pages/login/index.wxml new file mode 100644 index 0000000..6706b8a --- /dev/null +++ b/src/doctor/pages/login/index.wxml @@ -0,0 +1,60 @@ + + + 欢迎加入愈见守护 + + + + + + + {{codeText}} + + 登录 + + + 或者 + + + + + + + + + 我已阅读并同意 + 《个人信息及隐私协议政策》 + + + + + + 我已阅读并同意 + 《个人信息共享知情同意书》 + 规定收集我的相关敏感个人信息 + + + + diff --git a/src/doctor/pages/my/index.json b/src/doctor/pages/my/index.json new file mode 100644 index 0000000..09f6f75 --- /dev/null +++ b/src/doctor/pages/my/index.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "popup": "/components/popup/index", + "patient-tab-bar":"/patient/components/patient-tab-bar/index" + } +} diff --git a/src/doctor/pages/my/index.scss b/src/doctor/pages/my/index.scss new file mode 100644 index 0000000..5ba463c --- /dev/null +++ b/src/doctor/pages/my/index.scss @@ -0,0 +1,112 @@ +page { + background-color: rgba(247, 247, 250, 1); +} +.page { + padding: 52rpx 30rpx; + .user { + display: flex; + align-items: center; + .avatar-wrapper { + flex-shrink: 0; + padding: 0; + margin: 0; + width: 128rpx; + height: 128rpx; + outline: none; + background-color: transparent; + border-radius: 50%; + border: 2rpx solid #ffffff; + box-shadow: 0 4rpx 8rpx rgba(1, 1, 5, 0.1); + &::after { + border: none; + } + .avatar { + width: 128rpx; + height: 128rpx; + border-radius: 50%; + &::after { + border: none; + } + } + } + .wrap { + flex: 1; + padding-left: 24rpx; + .name { + display: flex; + align-items: center; + .nickname { + font-size: 40rpx; + } + font-weight: bold; + color: rgba(1, 1, 5, 1); + } + .hostipal { + margin-top: 16rpx; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + .tag { + display: inline-block; + padding: 0 8rpx; + font-size: 24rpx; + color: rgba(255, 255, 255, 1); + background-color: rgba(28, 107, 255, 1); + border-radius: 6rpx; + } + } + } + .code { + width: 72rpx; + height: 72rpx; + } + } + .list { + margin-top: 48rpx; + .list-container { + margin-top: 46rpx; + background: linear-gradient(19deg, #ffffff 0%, #eff5ff 100%); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + padding: 0 32rpx; + .item { + padding: 32rpx 0; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid rgba(247, 247, 250, 1); + &:last-of-type { + border: none; + } + .icon { + width: 44rpx; + height: 44rpx; + } + .content { + padding: 0 24rpx; + flex: 1; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + .tex { + padding-left: 10rpx; + color: rgba(161, 164, 172, 1); + } + } + .more { + color: rgba(161, 164, 172, 0.4); + } + } + } + } + .login-out { + margin-top: 158rpx; + width: 670rpx; + height: 84rpx; + border-radius: 130rpx 130rpx 130rpx 130rpx; + border: 2rpx solid rgba(1, 1, 5, 0.04); + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: rgba(1, 1, 5, 0.4); + } +} diff --git a/src/doctor/pages/my/index.ts b/src/doctor/pages/my/index.ts new file mode 100644 index 0000000..e7a7747 --- /dev/null +++ b/src/doctor/pages/my/index.ts @@ -0,0 +1,84 @@ +const app = getApp() + +Page({ + data: { + popupShow: false, + popupType: 'stayTuned', + popupParams: {}, + + userInfo: {}, + Days: '', + }, + onLoad() { + app.waitLogin().then(() => { + app.getUserInfo(3).then((userInfo) => { + this.setData({ + userInfo, + // 数字变红 + }) + }) + }) + }, + onChooseAvatar(e) { + const { avatarUrl } = e.detail + const url = `${app.globalData.upFileUrl}?r=file-service/upload-img` + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url, + filePath: avatarUrl, + name: 'file', + success: (res) => { + const data = JSON.parse(res.data) + const avatarUrl = data.data.Url + wx.ajax({ + method: 'POST', + url: '?r=wtx/user/update-avatar', + data: { + Avatar: avatarUrl, + }, + }) + .then(() => { + wx.hideLoading() + wx.showToast({ + title: '头像更新成功!', + icon: 'none', + }) + this.setData({ + 'userInfo.Avatar': avatarUrl, + }) + }) + .catch(() => { + wx.hideLoading() + }) + }, + fail() { + wx.hideLoading() + }, + }) + }, + handlePopupCancel() { + this.setData({ + popupShow: false, + }) + }, + routerTo(e) { + const { url } = e.currentTarget.dataset + wx.navigateTo({ + url, + }) + }, + handleUserInfo() { + wx.navigateTo({ + url: '/doctor/pages/userInfo/index', + }) + }, + handleDoc() { + wx.navigateTo({ + url: '/doctor/pages/doc/index', + }) + }, +}) + +export {} diff --git a/src/doctor/pages/my/index.wxml b/src/doctor/pages/my/index.wxml new file mode 100644 index 0000000..1bebe84 --- /dev/null +++ b/src/doctor/pages/my/index.wxml @@ -0,0 +1,38 @@ + + + + + + {{userInfo.Name}} + + + {{userInfo.HospitalName}} + 随访医院 + + + + + + + + + 账号管理 + + + + + 隐私协议 + + + + + + + + + diff --git a/src/doctor/pages/userInfo/index.json b/src/doctor/pages/userInfo/index.json new file mode 100644 index 0000000..92a7770 --- /dev/null +++ b/src/doctor/pages/userInfo/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "账号管理", + "usingComponents": {} +} diff --git a/src/doctor/pages/userInfo/index.scss b/src/doctor/pages/userInfo/index.scss new file mode 100644 index 0000000..0516575 --- /dev/null +++ b/src/doctor/pages/userInfo/index.scss @@ -0,0 +1,29 @@ +page { + background-color: rgba(246, 246, 246, 1); +} + +.page { + padding: 48rpx 40rpx; + .card { + padding: 0 32rpx; + background-color: #fff; + border-radius: 24rpx; + .row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 32rpx; + border-bottom: 1px solid rgba(247, 247, 250, 1); + &:last-of-type { + border: none; + } + .name { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .more { + color: rgba(161, 164, 172, 0.4); + } + } + } +} diff --git a/src/doctor/pages/userInfo/index.ts b/src/doctor/pages/userInfo/index.ts new file mode 100644 index 0000000..25d0e78 --- /dev/null +++ b/src/doctor/pages/userInfo/index.ts @@ -0,0 +1,34 @@ +const app = getApp() + +Page({ + data: {}, + onLoad() {}, + handleChanegTel() { + wx.navigateTo({ + url: '/doctor/pages/changeTel/index', + }) + }, + handleLoginOut() { + wx.showModal({ + title: '确定退出登录吗?', + confirmColor: 'rgba(246, 74, 58, 1)', + success: (res) => { + if (res.confirm) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/doctor/account/reg-logout', + data: {}, + }).then(() => { + app.startLogin(() => { + wx.reLaunch({ + url: '/pages/index/index', + }) + }) + }) + } + }, + }) + }, +}) + +export {} diff --git a/src/doctor/pages/userInfo/index.wxml b/src/doctor/pages/userInfo/index.wxml new file mode 100644 index 0000000..03b48e7 --- /dev/null +++ b/src/doctor/pages/userInfo/index.wxml @@ -0,0 +1,12 @@ + + + + 修改手机号 + + + + 退出登录 + + + + diff --git a/src/images/bg17.png b/src/images/bg17.png new file mode 100644 index 0000000..ec554f6 Binary files /dev/null and b/src/images/bg17.png differ diff --git a/src/images/bg18.png b/src/images/bg18.png new file mode 100644 index 0000000..0c5c040 Binary files /dev/null and b/src/images/bg18.png differ diff --git a/src/images/bg19.png b/src/images/bg19.png new file mode 100644 index 0000000..2a2df0e Binary files /dev/null and b/src/images/bg19.png differ diff --git a/src/images/bg20.png b/src/images/bg20.png new file mode 100644 index 0000000..89572c2 Binary files /dev/null and b/src/images/bg20.png differ diff --git a/src/images/calendar-left-disabled.png b/src/images/calendar-left-disabled.png new file mode 100644 index 0000000..0925640 Binary files /dev/null and b/src/images/calendar-left-disabled.png differ diff --git a/src/images/calendar-left.png b/src/images/calendar-left.png new file mode 100644 index 0000000..f12a710 Binary files /dev/null and b/src/images/calendar-left.png differ diff --git a/src/images/calendar-right-disabled.png b/src/images/calendar-right-disabled.png new file mode 100644 index 0000000..bce1e2f Binary files /dev/null and b/src/images/calendar-right-disabled.png differ diff --git a/src/images/calendar-right.png b/src/images/calendar-right.png new file mode 100644 index 0000000..2ff971a Binary files /dev/null and b/src/images/calendar-right.png differ diff --git a/src/images/gif2.gif b/src/images/gif2.gif new file mode 100644 index 0000000..eef27d9 Binary files /dev/null and b/src/images/gif2.gif differ diff --git a/src/images/icon42.png b/src/images/icon42.png index b5606d3..3ef2779 100644 Binary files a/src/images/icon42.png and b/src/images/icon42.png differ diff --git a/src/images/icon43.png b/src/images/icon43.png index 98b3e8b..28ac9f9 100644 Binary files a/src/images/icon43.png and b/src/images/icon43.png differ diff --git a/src/images/icon44.png b/src/images/icon44.png index cef976f..b3232c0 100644 Binary files a/src/images/icon44.png and b/src/images/icon44.png differ diff --git a/src/images/icon49.png b/src/images/icon49.png index 717ebd4..8b303d7 100644 Binary files a/src/images/icon49.png and b/src/images/icon49.png differ diff --git a/src/images/icon50.png b/src/images/icon50.png index 843f8fb..f45e583 100644 Binary files a/src/images/icon50.png and b/src/images/icon50.png differ diff --git a/src/images/icon72.png b/src/images/icon72.png new file mode 100644 index 0000000..ea1e489 Binary files /dev/null and b/src/images/icon72.png differ diff --git a/src/images/icon73.png b/src/images/icon73.png new file mode 100644 index 0000000..98d9591 Binary files /dev/null and b/src/images/icon73.png differ diff --git a/src/images/icon74.png b/src/images/icon74.png new file mode 100644 index 0000000..a1dc9b2 Binary files /dev/null and b/src/images/icon74.png differ diff --git a/src/images/icon75.png b/src/images/icon75.png new file mode 100644 index 0000000..625be84 Binary files /dev/null and b/src/images/icon75.png differ diff --git a/src/images/icon76.png b/src/images/icon76.png new file mode 100644 index 0000000..baa07ef Binary files /dev/null and b/src/images/icon76.png differ diff --git a/src/images/icon77.png b/src/images/icon77.png new file mode 100644 index 0000000..3a3b31d Binary files /dev/null and b/src/images/icon77.png differ diff --git a/src/images/icon78.png b/src/images/icon78.png new file mode 100644 index 0000000..e1db151 Binary files /dev/null and b/src/images/icon78.png differ diff --git a/src/images/icon79.png b/src/images/icon79.png new file mode 100644 index 0000000..4782a51 Binary files /dev/null and b/src/images/icon79.png differ diff --git a/src/images/icon80.png b/src/images/icon80.png new file mode 100644 index 0000000..38a8dc8 Binary files /dev/null and b/src/images/icon80.png differ diff --git a/src/images/icon81.png b/src/images/icon81.png new file mode 100644 index 0000000..9db42a7 Binary files /dev/null and b/src/images/icon81.png differ diff --git a/src/images/icon82.png b/src/images/icon82.png new file mode 100644 index 0000000..726eee0 Binary files /dev/null and b/src/images/icon82.png differ diff --git a/src/images/icon83.png b/src/images/icon83.png new file mode 100644 index 0000000..db1cf39 Binary files /dev/null and b/src/images/icon83.png differ diff --git a/src/images/icon84.png b/src/images/icon84.png new file mode 100644 index 0000000..ac2121e Binary files /dev/null and b/src/images/icon84.png differ diff --git a/src/images/icon85.png b/src/images/icon85.png new file mode 100644 index 0000000..895ac26 Binary files /dev/null and b/src/images/icon85.png differ diff --git a/src/images/icon86.png b/src/images/icon86.png new file mode 100644 index 0000000..5a168cd Binary files /dev/null and b/src/images/icon86.png differ diff --git a/src/images/icon87.png b/src/images/icon87.png new file mode 100644 index 0000000..b5dfaad Binary files /dev/null and b/src/images/icon87.png differ diff --git a/src/images/icon88.png b/src/images/icon88.png new file mode 100644 index 0000000..a5f5504 Binary files /dev/null and b/src/images/icon88.png differ diff --git a/src/images/icon89.png b/src/images/icon89.png new file mode 100644 index 0000000..c4edb27 Binary files /dev/null and b/src/images/icon89.png differ diff --git a/src/images/icon90.png b/src/images/icon90.png new file mode 100644 index 0000000..e3af1a0 Binary files /dev/null and b/src/images/icon90.png differ diff --git a/src/images/logo2.png b/src/images/logo2.png new file mode 100644 index 0000000..c20e2ed Binary files /dev/null and b/src/images/logo2.png differ diff --git a/src/images/tabbar/tabbar3-1-active.png b/src/images/tabbar/tabbar3-1-active.png new file mode 100644 index 0000000..960b63f Binary files /dev/null and b/src/images/tabbar/tabbar3-1-active.png differ diff --git a/src/images/tabbar/tabbar3-1.png b/src/images/tabbar/tabbar3-1.png new file mode 100644 index 0000000..e5b5fb9 Binary files /dev/null and b/src/images/tabbar/tabbar3-1.png differ diff --git a/src/images/tabbar/tabbar3-2-active.png b/src/images/tabbar/tabbar3-2-active.png new file mode 100644 index 0000000..b5ebf51 Binary files /dev/null and b/src/images/tabbar/tabbar3-2-active.png differ diff --git a/src/images/tabbar/tabbar3-2.png b/src/images/tabbar/tabbar3-2.png new file mode 100644 index 0000000..2609350 Binary files /dev/null and b/src/images/tabbar/tabbar3-2.png differ diff --git a/src/images/title11.png b/src/images/title11.png new file mode 100644 index 0000000..f3cace6 Binary files /dev/null and b/src/images/title11.png differ diff --git a/src/images/title12.png b/src/images/title12.png new file mode 100644 index 0000000..c904864 Binary files /dev/null and b/src/images/title12.png differ diff --git a/src/pages/applyFrom/index.wxml b/src/pages/applyFrom/index.wxml index 4340e17..fa2c45a 100644 --- a/src/pages/applyFrom/index.wxml +++ b/src/pages/applyFrom/index.wxml @@ -44,7 +44,7 @@ 所在地区 - + diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index 7250a12..0268221 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -237,3 +237,25 @@ } } } + +.preview { + position: fixed; + width: 100vw; + height: 100vh; + z-index: 1000000000; + top: 0; + left: 0; + overflow: hidden; + .img { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + display: block; + } + .show { + opacity: 1; + } +} diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index 97e4cbc..f4a657b 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -4,9 +4,15 @@ Page({ data: { popupShow: false, popupType: 'argument', + // popupType: 'selectIdentity', // 选择您的身份 + // popupType: 'bindDoctorReject', // 绑定失败 + // popupType: 'bindDoctor', // 绑定成功 + // popupType: 'bindDoctorQuestion', // 为什么绑定医生 + // popupType: 'conformBindDoctorQuestion', // 确认绑定曾经扫码医生 + // popupType: 'conformBindDoctorConform', // 注册后绑定医生码 popupParams: { position: 'bottom', - }, + } as any, userInfo: {}, bannerList: [], @@ -15,17 +21,26 @@ Page({ pageTop: '', background: 'transparent', + + guide: 0, + guideShow: false, + guideList: ['2-1', '2-2', '2-3'], }, onLoad() { app.waitLogin().then(() => { - this.setData({}) app.getUserInfo().then((userInfo) => { this.setData({ userInfo, popupShow: !userInfo.guestPrivacyAgree, + popupParams: { + position: 'bottom', + }, }) + const waitBindDoctorId = app.globalData.waitBindDoctorId if (!userInfo.guestPrivacyAgree) { app.mpBehavior({ PageName: 'PG_PATIENTLOGIN' }) + } else if (waitBindDoctorId) { + this.handleBindDoctor(waitBindDoctorId) } }) this.getBanner() @@ -33,6 +48,21 @@ Page({ this.getQuestionList() }) }, + handleBindDoctor(id: string) { + app.getDoctorInfo(id).then((res) => { + this.setData({ + popupShow: true, + popupType: 'conformBindDoctorConform', + popupParams: { + name: res.doctorName, + avatar: res.doctorAvatar, + hostipal: res.hospitalName, + className: res.hospitalClassificationName, + levelName: res.hospitalLevelName, + }, + }) + }) + }, getBanner() { wx.ajax({ method: 'GET', @@ -119,6 +149,19 @@ Page({ url, }) }, + touchmovePreview() { + return false + }, + handleTapPreview() { + if (this.data.guide == this.data.guideList.length - 1) { + this.setData({ + guideShow: false, + }) + } + this.setData({ + guide: Number(this.data.guide) + 1, + }) + }, handlePopupOk() { const { popupType } = this.data if (popupType === 'argument') { @@ -132,14 +175,51 @@ Page({ }).then(() => { this.setData({ popupShow: false, + popupType: '', + popupParams: {}, + }) + const waitBindDoctorId = app.globalData.waitBindDoctorId + if (waitBindDoctorId) { + this.handleBindDoctor(waitBindDoctorId) + } + }) + } + if (popupType === 'conformBindDoctorConform') { + this.setData({ + popupShow: false, + }) + wx.ajax({ + method: 'POST', + url: '?r=wtx/account/wait-bind-doctor', + data: { + doctorId: app.globalData.waitBindDoctorId, + }, + }).then(() => { + wx.navigateTo({ + url: `/patient/pages/login/index`, }) }) } }, handlePopupCancel() { - if (this.data.popupType === 'argument') { + const { popupType } = this.data + if (popupType === 'argument') { wx.exitMiniProgram() } + if (popupType === 'conformBindDoctorConform') { + this.setData({ + popupShow: false, + }) + wx.ajax({ + method: 'POST', + url: '?r=wtx/account/wait-bind-doctor', + data: { + doctorId: app.globalData.waitBindDoctorId, + }, + }).then(() => { + app.globalData.waitBindDoctorId = '' + }) + } }, }) diff --git a/src/pages/index/index.wxml b/src/pages/index/index.wxml index 8a76ac6..c6ee023 100644 --- a/src/pages/index/index.wxml +++ b/src/pages/index/index.wxml @@ -78,6 +78,16 @@ + + + + { @@ -12,10 +14,21 @@ Page({ app.getUserInfo().then((userInfo) => { this.setData({ userInfo, - // 数字变红 Days: userInfo.Days.replace(/(\d+)/g, '$1'), }) }) + this.getGeneConfig() + }) + }, + getGeneConfig() { + wx.ajax({ + method: 'GET', + url: '?r=wtx/common/get-gene-config', + data: {}, + }).then((res) => { + this.setData({ + showPatient: res === '1', + }) }) }, onChooseAvatar(e) { diff --git a/src/pages/my/index.wxml b/src/pages/my/index.wxml index 4126845..0f771c2 100644 --- a/src/pages/my/index.wxml +++ b/src/pages/my/index.wxml @@ -23,9 +23,7 @@ src="{{imageUrl}}index-apply-end.png?t={{Timestamp}}" > - - 患教活动报名 - + 患教活动报名 切换身份 - - - - - - - - - + + + + 我已开启基因治疗 + 切换基因治疗版本 + + + diff --git a/src/pages/start/index.ts b/src/pages/start/index.ts index d957bca..c63c7c7 100644 --- a/src/pages/start/index.ts +++ b/src/pages/start/index.ts @@ -1,13 +1,31 @@ -const _app = getApp() +import { parseScene } from '@/utils/util' +const app = getApp() Page({ data: {}, - onLoad() { - setTimeout(() => { - wx.reLaunch({ - url: '/pages/index/index', - }) - }, 1500) + onLoad(options) { + if (options.scene) { + const { doctorId } = parseScene(options.scene) as { doctorId: string } + app.globalData.waitBindDoctorId = doctorId + } + app.waitLogin().then(() => { + const initLoginInfo = app.globalData.initLoginInfo || {} + if (initLoginInfo.isLogin === 0) { + wx.reLaunch({ + url: '/pages/index/index', + }) + } + if (initLoginInfo.loginType === 1) { + wx.reLaunch({ + url: '/patient/pages/index/index', + }) + } + if (initLoginInfo.loginType === 2) { + wx.reLaunch({ + url: '/doctor/pages/index/index', + }) + } + }) }, }) diff --git a/src/patient/components/patient-tab-bar/index.ts b/src/patient/components/patient-tab-bar/index.ts index 751b432..75d4611 100644 --- a/src/patient/components/patient-tab-bar/index.ts +++ b/src/patient/components/patient-tab-bar/index.ts @@ -9,13 +9,13 @@ Component({ active: 0, list: [ { - pagePath: '/patient/pages/home/index', + pagePath: '/patient/pages/index/index', text: '首页', icon: 'tabbar2-1', iconActive: 'tabbar2-1-active', }, { - pagePath: '/pages/knowledge/index', + pagePath: '/patient/pages/knowledge/index', text: '知识库', icon: 'tabbar2-2', iconActive: 'tabbar2-2-active', diff --git a/src/patient/pages/aavReport/index.scss b/src/patient/pages/aavReport/index.scss index 3d9467b..841c686 100644 --- a/src/patient/pages/aavReport/index.scss +++ b/src/patient/pages/aavReport/index.scss @@ -83,4 +83,41 @@ page { } } } + + .footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + box-sizing: border-box; + margin-top: 32rpx; + flex-shrink: 0; + display: flex; + align-items: center; + gap: 22rpx; + background-color: #fff; + padding: 30rpx 30rpx calc(42rpx + env(safe-area-inset-bottom)); + box-shadow: 0rpx -4rpx 15rpx 0rpx rgba(0, 0, 0, 0.05); + .cancel { + flex: 1; + padding: 18rpx; + font-size: 32rpx; + color: rgba(246, 74, 58, 1); + line-height: 44rpx; + border-radius: 112rpx; + border: 2px solid #f64a3a; + text-align: center; + } + .submit { + flex: 1; + padding: 18rpx; + font-size: 32rpx; + color: rgba(255, 255, 255, 1); + line-height: 44rpx; + border-radius: 112rpx; + border: 2px solid #f64a3a; + background-color: #f64a3a; + text-align: center; + } + } } diff --git a/src/patient/pages/aavReport/index.wxml b/src/patient/pages/aavReport/index.wxml index 02fe2ef..2c77b2f 100644 --- a/src/patient/pages/aavReport/index.wxml +++ b/src/patient/pages/aavReport/index.wxml @@ -29,4 +29,9 @@ + + + 取消 + 提交 + diff --git a/src/patient/pages/askPatient/index.json b/src/patient/pages/askPatient/index.json index 4dba397..f9a997e 100644 --- a/src/patient/pages/askPatient/index.json +++ b/src/patient/pages/askPatient/index.json @@ -2,6 +2,7 @@ "navigationStyle": "custom", "usingComponents": { "van-loading": "@vant/weapp/loading/index", - "navbar": "/components/navbar/index" + "navbar": "/components/navbar/index", + "popup": "/components/popup/index" } } diff --git a/src/patient/pages/askPatient/index.scss b/src/patient/pages/askPatient/index.scss index 8219bc9..7e6f965 100644 --- a/src/patient/pages/askPatient/index.scss +++ b/src/patient/pages/askPatient/index.scss @@ -11,102 +11,98 @@ page { .page-container { flex: 1; overflow: hidden; - .scroll-view { - height: 100%; - .first-ask { - margin-top: 60rpx; - margin-bottom: 32rpx; - padding: 0 32rpx; - .f-header { - position: relative; - background: linear-gradient(22deg, #ffffff 0%, #fff6f6 100%); - box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.06); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #ffffff; - .left { - padding: 24rpx 32rpx; - .doctor-list { - display: flex; - flex-wrap: nowrap; - gap: 38rpx; - overflow-x: auto; - &::-webkit-scrollbar { - display: none; - } - &::after { - flex-shrink: 0; - display: block; - content: ''; - width: 300rpx; - } - .doctor-item { - flex-shrink: 0; - .avatar { - margin: 0 auto; - display: block; - width: 116rpx; - height: 116rpx; - border-radius: 50%; - } - .name { - margin: -20rpx auto 0; - width: 116rpx; - height: 36rpx; - line-height: 36rpx; - font-size: 24rpx; - color: rgba(255, 255, 255, 1); - text-align: center; - background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); - border-radius: 35rpx 35rpx 35rpx 35rpx; - } - } - } - } - .more { - position: absolute; - right: 0; - top: 0; - padding-left: 116rpx; - width: 342rpx; - height: 100%; - font-size: 28rpx; - color: rgba(161, 164, 172, 1); - box-sizing: border-box; - border-radius: 24rpx; - display: flex; - align-items: center; - background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #fff 118rpx, #fff 100%); + .f-header { + margin: 0 32rpx 0; + position: relative; + background: linear-gradient(22deg, #ffffff 0%, #fff6f6 100%); + box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.06); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + .left { + padding: 24rpx 32rpx; + .doctor-list { + display: flex; + flex-wrap: nowrap; + gap: 38rpx; + overflow-x: auto; + &::-webkit-scrollbar { + display: none; } - } - .f-list { - margin-top: 40rpx; - padding: 32rpx; - border-radius: 32rpx; - box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.06); - background: linear-gradient(12deg, #fff2db 0%, #fdc1bd 100%); - border: 2rpx solid #ffffff; - .content { - font-size: 32rpx; - color: rgba(1, 1, 5, 1); - line-height: 48rpx; + &::after { + flex-shrink: 0; + display: block; + content: ''; + width: 300rpx; } - .l-item { - margin-top: 24rpx; - font-size: 32rpx; - color: rgba(1, 1, 5, 1); - line-height: 48rxp; - padding: 20rpx 32rpx; - background-color: #fff; - border-radius: 84rpx; + .doctor-item { + flex-shrink: 0; + .avatar { + margin: 0 auto; + display: block; + width: 116rpx; + height: 116rpx; + border-radius: 50%; + } + .name { + margin: -20rpx auto 0; + width: 116rpx; + height: 36rpx; + line-height: 36rpx; + font-size: 24rpx; + color: rgba(255, 255, 255, 1); + text-align: center; + background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); + border-radius: 35rpx 35rpx 35rpx 35rpx; + } } } } + .more { + position: absolute; + right: 0; + top: 0; + padding-left: 116rpx; + width: 342rpx; + height: 100%; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + box-sizing: border-box; + border-radius: 24rpx; + display: flex; + align-items: center; + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #fff 118rpx, #fff 100%); + } + } + .scroll-view { + height: 100%; .date { padding-top: 20rpx; font-size: 28rpx; color: rgba(173, 179, 180, 1); text-align: center; } + .f-header-list { + margin: 40rpx 32rpx 0; + padding: 32rpx; + border-radius: 32rpx; + box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.06); + background: linear-gradient(12deg, #fff2db 0%, #fdc1bd 100%); + border: 2rpx solid #ffffff; + .content { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + line-height: 48rpx; + } + .l-item { + margin-top: 24rpx; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + line-height: 48rxp; + padding: 20rpx 32rpx; + background-color: #fff; + border-radius: 84rpx; + } + } .doctor { padding: 15rpx 30rpx; display: flex; @@ -285,124 +281,133 @@ page { } } .place { - height: 10vh; + height: 15vh; } } } .page-footer { position: relative; flex-shrink: 0; - padding: 18rpx 30rpx calc(env(safe-area-inset-bottom) + 30rpx); - border-radius: 24rpx 24rpx 0 0; - background-color: rgba(255, 255, 255, 1); transition: all 0.3s; - height: calc(124rpx + env(safe-area-inset-bottom)); + height: calc(112rpx + env(safe-area-inset-bottom)); box-sizing: border-box; box-shadow: 0rpx 2rpx 28rpx 0rpx rgba(0, 0, 0, 0.08); - .unread { - position: absolute; - top: -80rpx; - left: 50%; - transform: translateX(-50%); - padding: 12rpx 32rpx; - border-radius: 138rpx; - font-size: 24rpx; - color: rgba(103, 113, 114, 1); - background-color: #fff; - } + border-radius: 24rpx 24rpx 24rpx; + background-color: rgba(247, 247, 250, 1); &.expend { height: 50vh; - } - .title { - margin-top: 26rpx; - font-size: 32rpx; - color: rgba(40, 48, 49, 1); - display: flex; - align-items: center; - justify-content: center; - gap: 10rpx; - .icon { - width: 36rpx; - height: 36rpx; + .container { + margin-top: -20rpx; } } - .tabs { - margin-top: 12rpx; - padding: 24rpx 0; + .options { display: flex; + justify-content: space-between; align-items: center; - gap: 22rpx; - overflow-x: auto; - &::-webkit-scrollbar { - display: none; - } - .tab { - flex-shrink: 0; - padding: 14rpx 32rpx; - font-size: 28rpx; - color: rgba(1, 1, 5, 0.6); - border-radius: 129rpx; - background-color: rgba(247, 247, 250, 1); + border-radius: 24rpx 24rpx 0 0; + padding: 32rpx 30rpx calc(env(safe-area-inset-bottom) + 50rpx); + background-color: #fff; + .title { + flex: 1; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); display: flex; align-items: center; - gap: 8rpx; - line-height: 1; + justify-content: center; + gap: 10rpx; + &:first-of-type { + border-right: 1px dashed rgba(207, 209, 213, 1); + } .icon { - width: 32rpx; - height: 32rpx; + width: 40rpx; + height: 40rpx; } - .icon-active { - width: 32rpx; - height: 32rpx; + } + } + .container { + position: relative; + z-index: 1; + border-radius: 24rpx 24rpx 0 0; + padding: 32rpx 30rpx calc(env(safe-area-inset-bottom) + 30rpx); + background-color: rgba(247, 247, 250, 1); + .tabs { + margin-top: 12rpx; + padding: 24rpx 0; + display: flex; + align-items: center; + gap: 22rpx; + overflow-x: auto; + &::-webkit-scrollbar { display: none; } - &.active { - color: #fff; - background: linear-gradient(180deg, #fc684f 0%, #f33d31 100%); + .tab { + flex-shrink: 0; + padding: 14rpx 32rpx; + font-size: 28rpx; + color: rgba(1, 1, 5, 0.6); + border-radius: 129rpx; + background-color: #fff; + display: flex; + align-items: center; + gap: 8rpx; + line-height: 1; .icon { - display: none; + width: 32rpx; + height: 32rpx; } .icon-active { - display: block; + width: 32rpx; + height: 32rpx; + display: none; + } + &.active { + color: #fff; + background: linear-gradient(180deg, #fc684f 0%, #f33d31 100%); + .icon { + display: none; + } + .icon-active { + display: block; + } } } } - } - .list { - max-height: 35vh; - overflow-y: auto; - .l-item { - padding: 20rpx 0; - display: flex; - justify-content: space-between; - align-items: center; - .order { - width: 28rpx; - height: 28rpx; - font-size: 24rpx; + .list { + max-height: 35vh; + overflow-y: auto; + .l-item { + padding: 20rpx 0; display: flex; + justify-content: space-between; align-items: center; - justify-content: center; - color: rgba(255, 255, 255, 1); - border-radius: 6rpx; - background: linear-gradient(180deg, #fc684f 0%, #f33d31 100%); - } - .content { - padding: 0 16rpx; - flex: 1; - font-size: 32rpx; - color: rgba(40, 48, 49, 1); + .order { + width: 28rpx; + height: 28rpx; + font-size: 24rpx; + display: flex; + align-items: center; + justify-content: center; + color: rgba(255, 255, 255, 1); + border-radius: 6rpx; + background: linear-gradient(180deg, #fc684f 0%, #f33d31 100%); + } + .content { + padding: 0 16rpx; + flex: 1; + font-size: 32rpx; + color: rgba(40, 48, 49, 1); + } + .icon { + color: rgba(40, 48, 49, 1); + } } - .icon { - color: rgba(40, 48, 49, 1); + .none { + display: block; + margin: 30rpx auto; + width: 344rpx; + max-height: 302rpx; } } - .none { - display: block; - margin: 30rpx auto; - width: 344rpx; - max-height: 302rpx; - } } } } diff --git a/src/patient/pages/askPatient/index.ts b/src/patient/pages/askPatient/index.ts index cf2857c..21be853 100644 --- a/src/patient/pages/askPatient/index.ts +++ b/src/patient/pages/askPatient/index.ts @@ -5,7 +5,7 @@ const app = getApp() interface IMessageItem { msgId: string - msgContentType: '1' // 1: 文本 + msgContentType: '1' | '2' // 1:欢迎语 2: 文本 msgContent: any msgVisitTime: string msgFromType: '1' | '2' // 1: 患者 2: 医生 @@ -21,10 +21,15 @@ interface IMessageItem { Page({ data: { + popupShow: false, + popupType: 'selectDoctor', + popupParams: {}, + expend: false, scrollTop: 0, scrollIntoView: '', doctorDetail: {} as any, + doctorList: {}, questionActive: 0, questionList: [] as any, @@ -34,11 +39,11 @@ Page({ isLoad: false, isFinish: false, messageList: [ - { msgFromType: '2', msgContentType: '1', msgContent: '你的注射日还未填写,随访计划还未生成哦!' }, - { msgFromType: '2', msgContentType: '2', msgContent: '' }, - { msgFromType: '2', msgContentType: '3', msgContent: '' }, - { msgFromType: '2', msgContentType: '4', msgContent: '' }, - { msgFromType: '2', msgContentType: '5', msgContent: '' }, + // { msgFromType: '2', msgContentType: '1', msgContent: '你的注射日还未填写,随访计划还未生成哦!' }, + // { msgFromType: '2', msgContentType: '2', msgContent: '' }, + // { msgFromType: '2', msgContentType: '3', msgContent: '' }, + // { msgFromType: '2', msgContentType: '4', msgContent: '' }, + // { msgFromType: '2', msgContentType: '5', msgContent: '' }, ] as IMessageItem[], nextMsgId: '', unReadCount: 0, @@ -50,7 +55,7 @@ Page({ userInfo: {}, }, - onLoad(options) { + onLoad() { app.waitLogin().then(() => { app.mpBehavior({ PageName: 'PG_FAQ' }) app.getUserInfo().then((userInfo) => { @@ -58,109 +63,137 @@ Page({ userInfo, }) }) - this.getQuestionList() - this.getHeaderQuestionList() - if (options.id) { - this.getDetail(options.id) - } - }) - }, - handleView(index = -1) { - this.setData({ - scrollIntoView: index > -1 ? `view${index}` : `place`, + this.getBindDoctorList() + this.getQuestionCommonList(this.data.questionActive) + this.getMessageList() }) }, - getHeaderQuestionList() { + getBindDoctorList() { wx.ajax({ method: 'GET', - url: '?r=wtx/common-question/concerned-list', + url: '?r=wtx/account/get-bind-doctor-list', data: {}, }).then((res) => { this.setData({ - headerQuestionList: res.list, + doctorList: res, }) }) }, - getDetail(Id: string) { + getMessageList() { + if (this.data.isLoad || this.data.isFinish) return + this.setData({ + isLoad: true, + }) + const nextMsgId = this.data.nextMsgId wx.ajax({ method: 'GET', - url: '?r=wtx/common-question/detail', - data: { Id }, + url: '?r=wtx/message-interact/get-message-list', + data: { + nextMsgId, + }, }).then((res) => { - this.handleSendQuestion(res) + res.messageList.map((item) => { + if (item.msgContentType === '1') { + item.msgOtherInfo = JSON.parse(item.msgOtherInfo) + } + return item + }) + if (!this.data.nextMsgId && !res.messageList.length) { + res.messageList = [ + { + msgId: '0', + msgContentType: '0', + msgContent: '', + msgVisitTime: '', + msgFromType: '2', + }, + ] + } + this.setData({ + messageList: [...res.messageList.reverse(), ...this.data.messageList], + nextMsgId: res.nextMsgId, + unReadCount: res.unReadCount, + firstNotReadMsgId: res.firstNotReadMsgId, + isVisitAdl: res.isVisitAdl, + adlMsgId: res.adlMsgId, + isLoad: false, + isFinish: nextMsgId === res.nextMsgId, + }) + this.filterCreateTime() + if (!nextMsgId) { + this.handleView() + } }) }, - getQuestionList() { + scrolltoupper(e) { + if (e.detail.direction === 'top') { + this.getMessageList() + } + }, + handleView(index = -1) { + this.setData({ + scrollIntoView: index > -1 ? `view${index}` : `place`, + }) + }, + getQuestionCommonList(questionActive: number) { wx.ajax({ method: 'GET', - url: '?r=wtx/common-question/type-list', + url: '?r=wtx/message-interact/get-question-list', data: {}, }).then((res) => { this.setData({ - questionList: res.list, + questionList: res, + questionActiveList: res[questionActive].questionList, }) - this.getQuestionCommonList(this.data.questionActive) }) }, - getQuestionCommonList(questionActive: number) { - const QuestionTypeId = this.data.questionList[questionActive].Id + handleQuestion(e: any) { + const { id, name } = e.currentTarget.dataset + this.handleSendQuestion(name) wx.ajax({ - method: 'GET', - url: '?r=wtx/common-question/list', + method: 'POST', + url: '?r=wtx/message-interact/send-question-message', data: { - QuestionTypeId, - count: 0, + questionId: id, }, }).then((res) => { - if (this.data.questionActive === questionActive) { - this.setData({ - questionActiveList: res.list, - }) - } + this.handleAskQuestion(res) }) }, - handleHeaderQuestion(e: any) { - const { index } = e.currentTarget.dataset - const { headerQuestionList } = this.data - const question = headerQuestionList[index] - this.handleQuestionClick(question.Id) - this.handleSendQuestion(question) - }, - handleQuestion(e: any) { - const { index } = e.currentTarget.dataset - const { questionActiveList } = this.data - const question = questionActiveList[index] - this.handleQuestionClick(question.Id) - this.handleSendQuestion(question) - }, - handleSendQuestion(questionItem: any) { + handleSendQuestion(qName) { const { messageList } = this.data this.setData({ messageList: [ ...messageList, { msgId: new Date().getTime().toString(), - msgContentType: '1', - msgContent: questionItem.Question, + msgContentType: '2', + msgContent: qName, msgVisitTime: '', msgFromType: '1', msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), }, + ], + }) + this.filterCreateTime() + this.handleView() + }, + handleAskQuestion(aName) { + const { messageList } = this.data + this.setData({ + messageList: [ + ...messageList, { msgId: new Date().getTime().toString(), - msgContentType: '1', - msgContent: questionItem.Answer, - questionId: questionItem.Id, - Reference: questionItem.Reference, - LikeTimes: questionItem.LikeTimes, - IsLike: questionItem.IsLike, - HasAnswer: questionItem.HasAnswer, + msgContentType: '2', + msgContent: aName, msgVisitTime: '', msgFromType: '2', msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), }, ], }) + this.filterCreateTime() this.handleView() }, handleQuestionClick(Id) { @@ -237,15 +270,14 @@ Page({ const { index } = e.currentTarget.dataset this.setData({ questionActive: index, + questionActiveList: this.data.questionList[index].questionList, }) - this.getQuestionCommonList(index) }, handleFooter() { this.setData({ expend: !this.data.expend, }) if (this.data.expend) { - // this.getQuestionList() setTimeout(() => { this.handleView() }, 300) diff --git a/src/patient/pages/askPatient/index.wxml b/src/patient/pages/askPatient/index.wxml index 85b0670..dddc9f4 100644 --- a/src/patient/pages/askPatient/index.wxml +++ b/src/patient/pages/askPatient/index.wxml @@ -6,6 +6,26 @@ style="background: url('{{imageUrl}}bg7.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;" > + + + + + + {{item.doctorName}} + + + + + 查看医生介绍 + + + - - - - - - - 王青 - - - - 刘湖飞 - - - - - 查看医生介绍 - - - - - 你好王青,有什么问题我们可以帮助到您? + + {{message.msgCreateTimeName}} + + {{message.msgOtherInfo.title}} - {{item.Question}} + {{item.question}} - - - {{message.msgCreateTimeName}} - + - + 刘湖飞 - {{message.msgContent }} - + {{message.msgContent }} + 我的出诊时间如下: 周二 上午 @@ -72,7 +71,7 @@ 这是您的诊疗地图 @@ -84,7 +83,7 @@ 您的专属随访计划 @@ -96,7 +95,7 @@ 现在是您注射后16周 @@ -107,9 +106,9 @@ - + - {{message.msgContent}} + {{message.msgContent}} @@ -120,34 +119,51 @@ - - - 我要提问 - - - - {{item.Name}} + + + + 我要提问 + + + + 出诊时间 - - - {{index+1}} - {{item.Question}} - + + + + {{item.typeName}} + + + + + {{index+1}} + {{item.question}} + + + - + + diff --git a/src/patient/pages/bbmRemark/index.json b/src/patient/pages/bbmRemark/index.json index 64aabc7..74dc547 100644 --- a/src/patient/pages/bbmRemark/index.json +++ b/src/patient/pages/bbmRemark/index.json @@ -1,4 +1,4 @@ { - "navigationBarTitleText": "BBM-H901输注备注", + "navigationBarTitleText": "输注感受日志", "usingComponents": {} } diff --git a/src/patient/pages/bbmRemark/index.scss b/src/patient/pages/bbmRemark/index.scss index 0cdf682..0cc615b 100644 --- a/src/patient/pages/bbmRemark/index.scss +++ b/src/patient/pages/bbmRemark/index.scss @@ -5,8 +5,6 @@ page { padding: 48rpx 40rpx; .card1 { padding: 22rpx 32rpx; - display: flex; - align-items: center; border-radius: 24rpx; background-color: #fff; .label { @@ -15,24 +13,13 @@ page { font-weight: bold; } .select { - flex: 1; + margin-top: 24rpx; display: flex; + justify-content: space-between; gap: 24rpx; - justify-content: flex-end; - .s-btn { + .icon { width: 128rpx; - height: 64rpx; - display: flex; - align-items: center; - justify-content: center; - font-size: 32rpx; - color: rgba(137, 141, 151, 1); - background-color: rgba(247, 247, 250, 1); - border-radius: 12rpx 12rpx 12rpx 12rpx; - &.active { - color: #fff; - background: #f64a3a; - } + height: 128rpx; } } } diff --git a/src/patient/pages/bbmRemark/index.ts b/src/patient/pages/bbmRemark/index.ts index 067b6bb..cce00e4 100644 --- a/src/patient/pages/bbmRemark/index.ts +++ b/src/patient/pages/bbmRemark/index.ts @@ -1,8 +1,16 @@ -const _app = getApp(); +const _app = getApp() Page({ - data: {}, + data: { + active: 1, + }, onLoad() {}, -}); + handleSelect(e) { + const { active } = e.currentTarget.dataset + this.setData({ + active, + }) + }, +}) export {} diff --git a/src/patient/pages/bbmRemark/index.wxml b/src/patient/pages/bbmRemark/index.wxml index 0936a0d..bd18557 100644 --- a/src/patient/pages/bbmRemark/index.wxml +++ b/src/patient/pages/bbmRemark/index.wxml @@ -1,14 +1,30 @@ - 是否有不良反应 + 整体治疗过程感受 - - + + + + + + + + + + + + + - 整体治疗过程说明 - + 整体治疗过程备注 + 取消 diff --git a/src/patient/pages/bbmReport/index.scss b/src/patient/pages/bbmReport/index.scss index a7349d6..35fe267 100644 --- a/src/patient/pages/bbmReport/index.scss +++ b/src/patient/pages/bbmReport/index.scss @@ -15,7 +15,7 @@ page { .card { margin-top: -40rpx; padding: 0 32rpx; - border-radius: 24rpx; + border-radius: 22rpx; background-color: #fff; .row { display: flex; @@ -66,6 +66,59 @@ page { } } + .body { + margin-top: 24rpx; + padding: 0 32rpx; + border-radius: 24rpx; + background-color: #fff; + .row { + display: flex; + align-items: center; + .label { + width: 5em; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .r-container { + flex: 1; + .picker { + .picker-content { + padding: 32rpx 0; + display: flex; + justify-content: space-between; + .content { + text-align: right; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + &:empty::after { + content: attr(data-place); + color: rgba(207, 209, 213, 1); + } + } + } + } + .columns { + display: flex; + align-items: center; + gap: 20rpx; + .input { + padding: 32rpx 0; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .input-place { + color: rgba(207, 209, 213, 1); + } + .sub { + flex-shrink: 0; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + } + } + } + } + .footer { position: fixed; bottom: 0; diff --git a/src/patient/pages/bbmReport/index.wxml b/src/patient/pages/bbmReport/index.wxml index d1f6ac8..7aa8747 100644 --- a/src/patient/pages/bbmReport/index.wxml +++ b/src/patient/pages/bbmReport/index.wxml @@ -5,7 +5,7 @@ 输注时间 - + @@ -17,13 +17,33 @@ 使用剂量 - - x10¹¹vg + + KG + + + 用药体积 + + + + ml + + + + + 预计瓶数 + + + + + + + + 取消 提交 diff --git a/src/patient/pages/bindDoctor/index.json b/src/patient/pages/bindDoctor/index.json index ad4d4ef..e3ceeb9 100644 --- a/src/patient/pages/bindDoctor/index.json +++ b/src/patient/pages/bindDoctor/index.json @@ -1,6 +1,7 @@ { "navigationStyle": "custom", "usingComponents": { + "popup": "/components/popup/index", "navbar": "/components/navbar/index" } } diff --git a/src/patient/pages/bindDoctor/index.ts b/src/patient/pages/bindDoctor/index.ts index c563ebc..8c72fce 100644 --- a/src/patient/pages/bindDoctor/index.ts +++ b/src/patient/pages/bindDoctor/index.ts @@ -1,8 +1,86 @@ -const _app = getApp() +import { parseScene } from '@/utils/util' +const app = getApp() Page({ - data: {}, + data: { + popupShow: false, + // popupType: 'selectIdentity', // 选择您的身份 + // popupType: 'bindDoctorReject', // 绑定失败 + // popupType: 'bindDoctor', // 绑定成功 + // popupType: 'bindDoctorQuestion', // 为什么绑定医生 + // popupType: 'conformBindDoctorQuestion', // 确认绑定曾经扫码医生 + popupType: 'conformBindDoctorConform', // 注册后绑定医生码 + popupParams: {}, + }, onLoad() {}, + handleBindDoctor() { + wx.scanCode({ + scanType: ['wxCode'], + success: (res) => { + const path = res.path + if (res.errMsg !== 'scanCode:ok' || !path || !path.includes('?scene=doctorId')) { + wx.showToast({ + icon: 'none', + title: '扫码失败,请重试', + }) + return + } + const scene = path.split('?scene=')[1] + const { doctorId } = parseScene(scene) as { doctorId: string } + this.bindDoctor(doctorId) + }, + }) + }, + bindDoctor(id) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/account/bind-doctor', + data: { + doctorId: id, + }, + showMsg: false, + }) + .then(() => { + app.getDoctorInfo(id).then((res) => { + this.setData({ + popupShow: true, + popupType: 'bindDoctor', + popupParams: { + name: res.doctorName, + avatar: res.doctorAvatar, + hostipal: res.hospitalName, + className: res.hospitalClassificationName, + levelName: res.hospitalLevelName, + }, + }) + }) + }) + .catch((err) => { + if ([101, 102].includes(err.data.code)) { + this.setData({ + popupShow: true, + popupType: 'bindDoctorReject', + popupParams: { + msg: err.data.msg || '请检查网络后重试', + }, + }) + } else { + wx.showToast({ + icon: 'none', + title: err.data.msg || '请检查网络后重试', + }) + } + }) + }, + handlePopupOk() { + this.handlePopupCancel() + }, + handlePopupCancel() { + this.setData({ + popupShow: false, + popupType: '', + }) + }, handleBack() { wx.navigateBack() }, diff --git a/src/patient/pages/bindDoctor/index.wxml b/src/patient/pages/bindDoctor/index.wxml index 70d0a57..7fc6e0d 100644 --- a/src/patient/pages/bindDoctor/index.wxml +++ b/src/patient/pages/bindDoctor/index.wxml @@ -14,6 +14,14 @@ 医生可以实时看到您的检查进展 您可以扫描不同医生邀约码绑定多个医生 - 继续绑定 + 继续绑定 取消 + + diff --git a/src/patient/pages/blood/index.json b/src/patient/pages/blood/index.json new file mode 100644 index 0000000..e403ba9 --- /dev/null +++ b/src/patient/pages/blood/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "出血管理", + "usingComponents": {} +} diff --git a/src/patient/pages/blood/index.scss b/src/patient/pages/blood/index.scss new file mode 100644 index 0000000..ea92c90 --- /dev/null +++ b/src/patient/pages/blood/index.scss @@ -0,0 +1,140 @@ +page { + background-color: rgba(247, 247, 250, 1); +} +.page { + padding-bottom: 200rpx; + .header { + padding: 16rpx 32rpx 32rpx; + background-color: #fff; + border-radius: 24rpx; + .label { + font-size: 32rpx; + color: rgba(0, 0, 0, 1); + display: flex; + align-items: center; + gap: 12rpx; + .icon { + flex-shrink: 0; + width: 48rpx; + height: 48rpx; + } + } + .range { + margin-top: 24rpx; + display: flex; + align-items: center; + gap: 18rpx; + font-size: 32rpx; + color: rgba(207, 209, 213, 1); + .picker { + flex: 1; + .picker-content { + padding: 22rpx 32rpx; + display: flex; + align-items: center; + background-color: rgba(247, 247, 250, 1); + border-radius: 12rpx; + .content { + flex: 1; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + &:empty::after { + content: attr(data-place); + color: rgba(161, 164, 172, 0.5); + } + } + .tril { + width: 0; + height: 0; + border-style: solid; + border-width: 12rpx 12rpx 0 12rpx; + border-color: rgba(207, 209, 213, 1) transparent transparent transparent; + } + } + } + } + } + .list { + padding: 0 32rpx; + margin-top: 32rpx; + .list-item { + display: flex; + gap: 16rpx; + .aside { + display: flex; + align-items: center; + flex-direction: column; + gap: 16rpx; + .order { + margin-top: 8rpx; + width: 16rpx; + height: 16rpx; + border-radius: 50%; + background-clip: content-box; + background-color: rgba(246, 74, 58, 1); + border: 4rpx solid rgba(246, 74, 58, 0.3); + } + .line { + flex: 1; + border-right: 1px dashed rgba(246, 74, 58, 1); + } + } + .container { + flex: 1; + padding-bottom: 16rpx; + .date { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + font-weight: bold; + padding-bottom: 16rpx; + } + .wrap { + padding: 0 32rpx; + background-color: #fff; + border-radius: 24rpx; + .row { + padding: 32rpx; + display: flex; + align-items: center; + gap: 16rpx; + border-bottom: 1px solid rgba(247, 247, 250, 1); + .label { + font-size: 32rpx; + color: rgba(137, 141, 151, 1); + } + .content { + width: 5em; + font-size: 32rpx; + color: rgba(0, 0, 0, 1); + line-height: 48rpx; + } + } + .row-resver { + padding: 32rpx; + .label { + width: 7em; + font-size: 32rpx; + color: rgba(137, 141, 151, 1); + } + .content { + margin-top: 24rpx; + font-size: 32rpx; + color: rgba(0, 0, 0, 1); + line-height: 48rpx; + } + } + } + } + } + } + .add { + position: fixed; + left: 50%; + bottom: 142rpx; + transform: translateX(-50%); + width: 156rpx; + height: 156rpx; + border-radius: 50%; + box-shadow: 0 20rpx 30rpx #f0b4af; + } +} diff --git a/src/patient/pages/blood/index.ts b/src/patient/pages/blood/index.ts new file mode 100644 index 0000000..3bbd333 --- /dev/null +++ b/src/patient/pages/blood/index.ts @@ -0,0 +1,18 @@ +const _app = getApp() + +Page({ + data: {}, + onLoad() {}, + handleEdit() { + wx.navigateTo({ + url: '/patient/pages/bloodDetail/index', + }) + }, + handleAdd() { + wx.navigateTo({ + url: '/patient/pages/bloodAdd/index', + }) + }, +}) + +export {} diff --git a/src/patient/pages/blood/index.wxml b/src/patient/pages/blood/index.wxml new file mode 100644 index 0000000..68a170d --- /dev/null +++ b/src/patient/pages/blood/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + 至 + + + + + + + + + + + + + + + + 2025.6.15 + + + 出血关节 + 左膝 右肘 + + + 其他情况备注 + + 症状1、关节积血:血友病比较多见于膝关节,在就是踝、髋、肘、腕、肩以及手足小关节。 + 性期关节肿痛,局部发发发... + + + + + + + + diff --git a/src/patient/pages/bloodAdd/index.json b/src/patient/pages/bloodAdd/index.json new file mode 100644 index 0000000..1351d31 --- /dev/null +++ b/src/patient/pages/bloodAdd/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "出血记录", + "usingComponents": {} +} diff --git a/src/patient/pages/bloodAdd/index.scss b/src/patient/pages/bloodAdd/index.scss new file mode 100644 index 0000000..f6e1b68 --- /dev/null +++ b/src/patient/pages/bloodAdd/index.scss @@ -0,0 +1,234 @@ +page { + background-color: rgba(247, 247, 250, 1); +} +.page { + padding: 32rpx 32rpx 200rpx; + .tip { + padding: 24rpx; + font-size: 28rpx; + color: rgba(250, 118, 45, 1); + background-color: rgba(255, 241, 226, 1); + border-radius: 24rpx; + text-align: center; + } + .date-form { + margin-top: 30rpx; + padding: 24rpx 32rpx; + background-color: #fff; + border-radius: 80rpx; + display: flex; + align-items: center; + .icon { + flex-shrink: 0; + width: 48rpx; + height: 48rpx; + } + .label { + flex-shrink: 0; + margin-left: 16rpx; + font-size: 32rpx; + color: rgba(0, 0, 0, 1); + } + .picker { + flex: 1; + .picker-content { + padding-left: 48rpx; + display: flex; + align-items: center; + .content { + flex: 1; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + &:empty::after { + content: attr(data-place); + color: rgba(161, 164, 172, 0.5); + } + } + .tril { + width: 0; + height: 0; + border-style: solid; + border-width: 12rpx 12rpx 0 12rpx; + border-color: rgba(207, 209, 213, 1) transparent transparent transparent; + } + } + } + } + .card1 { + margin-top: 24rpx; + padding: 0 32rpx 32rpx; + background: #ffffff; + border-radius: 24rpx 24rpx 24rpx 24rpx; + .title { + padding: 32rpx 0 0; + font-size: 36rpx; + color: rgba(1, 1, 5, 1); + font-weight: bold; + display: flex; + justify-content: space-between; + align-items: center; + } + .sub-title { + margin-top: 16rpx; + font-size: 24rpx; + color: rgba(161, 164, 172, 1); + } + .body { + position: relative; + margin: 30rpx auto 0; + padding-bottom: 24rpx; + width: 345rpx; + height: 417rpx; + .part { + position: absolute; + width: 32rpx; + height: 32rpx; + background: rgba(255, 186, 148, 0.3); + border-radius: 50%; + &.active { + &::after { + position: absolute; + content: ''; + top: 8rpx; + left: 8rpx; + width: 16rpx; + height: 16rpx; + border-radius: 50%; + background-color: rgba(246, 74, 58, 1); + } + } + } + } + .part-name { + font-size: 36rpx; + color: rgba(246, 74, 58, 1); + gap: 20rpx; + display: flex; + justify-content: center; + flex-wrap: wrap; + font-weight: bold; + } + .name { + margin-top: 10rpx; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + text-align: center; + } + } + .card2 { + margin-top: 24rpx; + padding: 0 32rpx 32rpx; + background: #ffffff; + border-radius: 24rpx 24rpx 24rpx 24rpx; + .title { + padding: 32rpx 0 0; + font-size: 36rpx; + color: rgba(1, 1, 5, 1); + font-weight: bold; + display: flex; + justify-content: space-between; + align-items: center; + .stat-font { + font-size: 24rpx; + color: rgba(137, 141, 151, 1); + font-weight: normal; + .num { + font-size: 28rpx; + color: rgba(246, 74, 58, 1); + } + } + } + .body { + position: relative; + margin: 30rpx auto 0; + padding-bottom: 24rpx; + width: 345rpx; + height: 417rpx; + .part { + position: absolute; + width: 32rpx; + height: 32rpx; + background: rgba(255, 186, 148, 0.3); + border-radius: 50%; + &.active { + &::after { + position: absolute; + content: ''; + top: 8rpx; + left: 8rpx; + width: 16rpx; + height: 16rpx; + border-radius: 50%; + background-color: rgba(246, 74, 58, 1); + } + } + } + } + .part-name { + font-size: 36rpx; + color: rgba(246, 74, 58, 1); + gap: 20rpx; + display: flex; + justify-content: center; + flex-wrap: wrap; + font-weight: bold; + } + .name { + margin-top: 10rpx; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + text-align: center; + } + .auto-area { + margin-top: 24rpx; + .textarea { + width: 100%; + padding: 22rpx 32rpx; + background: #f7f7fa; + border-radius: 12rpx; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + height: 150rpx; + box-sizing: border-box; + } + .place-textarea { + color: rgba(161, 164, 172, 0.5); + } + } + } + + .footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + padding: 16rpx 40rpx calc(16rpx + env(safe-area-inset-bottom)); + background-color: rgba(255, 255, 255, 1); + display: flex; + gap: 26rpx; + box-sizing: border-box; + .cancel { + flex: 1; + padding: 22rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: rgba(246, 74, 58, 1); + border-radius: 84rpx; + border: 1px solid #f64a3a; + } + .submit { + flex: 1; + padding: 22rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #fff; + background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); + border-radius: 84rpx; + border: 1px solid #f64a3a; + } + } +} diff --git a/src/patient/pages/bloodAdd/index.ts b/src/patient/pages/bloodAdd/index.ts new file mode 100644 index 0000000..067b6bb --- /dev/null +++ b/src/patient/pages/bloodAdd/index.ts @@ -0,0 +1,8 @@ +const _app = getApp(); + +Page({ + data: {}, + onLoad() {}, +}); + +export {} diff --git a/src/patient/pages/bloodAdd/index.wxml b/src/patient/pages/bloodAdd/index.wxml new file mode 100644 index 0000000..28bdcf0 --- /dev/null +++ b/src/patient/pages/bloodAdd/index.wxml @@ -0,0 +1,59 @@ + + 记录您的健康每一步 + + + 出血日期 + + + + + + + + + 出血关节 + 因反复自发性出血或创伤后出血而导致慢性损伤的关节 + + + + + 左侧手肘 + 右侧手肘 + + 已选择关节 + + + + 您近6个月的出血情况 + + 200 + /200 + + + + + + + + + 取消 + 完成 + + diff --git a/src/patient/pages/bloodDetail/index.json b/src/patient/pages/bloodDetail/index.json new file mode 100644 index 0000000..1351d31 --- /dev/null +++ b/src/patient/pages/bloodDetail/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "出血记录", + "usingComponents": {} +} diff --git a/src/patient/pages/bloodDetail/index.scss b/src/patient/pages/bloodDetail/index.scss new file mode 100644 index 0000000..fd182a2 --- /dev/null +++ b/src/patient/pages/bloodDetail/index.scss @@ -0,0 +1,84 @@ +page { + background-color: rgba(247, 247, 250, 1); +} +.page { + padding: 32rpx; + .card1 { + padding: 0 32rpx; + border-radius: 24rpx; + background-color: #fff; + .row { + padding: 32rpx 0; + display: flex; + align-items: center; + gap: 48rpx; + border-bottom: 1px solid rgba(247, 247, 250, 1); + &:last-of-type { + border: none; + } + .label { + font-size: 32rpx; + color: rgba(137, 141, 151, 1); + } + .content { + font-size: 32rpx; + color: rgba(0, 0, 0, 1); + } + } + } + .card2 { + margin-top: 24rpx; + padding: 0 32rpx 32rpx; + border-radius: 24rpx; + background-color: #fff; + .title { + padding: 32rpx 0 24rpx; + font-size: 36rpx; + color: rgba(1, 1, 5, 1); + font-weight: bold; + } + .content { + padding: 24rpx 32rpx; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + line-height: 48rpx; + background-color: rgba(247, 247, 250, 1); + border-radius: 12rpx; + } + } + + .footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + padding: 16rpx 40rpx calc(16rpx + env(safe-area-inset-bottom)); + background-color: rgba(255, 255, 255, 1); + display: flex; + gap: 26rpx; + box-sizing: border-box; + .cancel { + flex: 1; + padding: 22rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: rgba(246, 74, 58, 1); + border-radius: 84rpx; + border: 1px solid #f64a3a; + } + .submit { + flex: 1; + padding: 22rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #fff; + background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); + border-radius: 84rpx; + border: 1px solid #f64a3a; + } + } +} diff --git a/src/patient/pages/bloodDetail/index.ts b/src/patient/pages/bloodDetail/index.ts new file mode 100644 index 0000000..3542d02 --- /dev/null +++ b/src/patient/pages/bloodDetail/index.ts @@ -0,0 +1,13 @@ +const _app = getApp() + +Page({ + data: {}, + onLoad() {}, + handleEdit() { + wx.navigateTo({ + url: '/patient/pages/bloodAdd/index', + }) + }, +}) + +export {} diff --git a/src/patient/pages/bloodDetail/index.wxml b/src/patient/pages/bloodDetail/index.wxml new file mode 100644 index 0000000..6b13e48 --- /dev/null +++ b/src/patient/pages/bloodDetail/index.wxml @@ -0,0 +1,23 @@ + + + + 出血日期 + 2025-12-12 + + + 出血关节 + 左膝 右肘 + + + + 其他情况备注 + + 症状1、关节积血:血友病比较多见于膝关节,在就是踝、髋、肘、腕、肩以及手足小关节。 性期关节肿痛,局部发 + + + + + 删除 + 编辑 + + diff --git a/src/patient/pages/casesAdd/index.scss b/src/patient/pages/casesAdd/index.scss index d937e61..f894dce 100644 --- a/src/patient/pages/casesAdd/index.scss +++ b/src/patient/pages/casesAdd/index.scss @@ -198,6 +198,22 @@ page { display: flex; border-bottom: 1px solid rgba(247, 247, 250, 1); flex-wrap: wrap; + &.column { + flex-direction: column; + .label { + width: 100%; + padding-bottom: 0; + } + .tip{ + margin-top: 16rpx; + font-size: 28rpx; + color: rgba(161, 164, 172, 1); + line-height: 40rpx; + } + .container{ + margin-bottom: 10rpx; + } + } &:last-of-type { border: none; } diff --git a/src/patient/pages/casesAdd/index.ts b/src/patient/pages/casesAdd/index.ts index c6c9ee1..b462d3b 100644 --- a/src/patient/pages/casesAdd/index.ts +++ b/src/patient/pages/casesAdd/index.ts @@ -9,6 +9,7 @@ Page({ content: '', }, + currentFinish: true, current: 0, parts: [ @@ -71,6 +72,25 @@ Page({ ], }, onLoad() {}, + handleFinish() { + this.setData({ + currentFinish: true, + }) + }, + handlePrev() { + if (!this.data.currentFinish) return + this.setData({ + currentFinish: false, + current: this.data.current - 1, + }) + }, + handleNext() { + if (!this.data.currentFinish) return + this.setData({ + currentFinish: false, + current: this.data.current + 1, + }) + }, }) export {} diff --git a/src/patient/pages/casesAdd/index.wxml b/src/patient/pages/casesAdd/index.wxml index 2a93df6..03d6f46 100644 --- a/src/patient/pages/casesAdd/index.wxml +++ b/src/patient/pages/casesAdd/index.wxml @@ -32,7 +32,7 @@ 最后 1 步啦!感谢您的耐心填写~ 对健康负责,就是对自己和家人最好的关爱 - + @@ -56,15 +56,16 @@ - 严重程度 + 凝血因子 - - 轻度 - 中度 - 重度 + + + % + + 治疗方案 @@ -88,7 +89,7 @@ 取消 - 下一步 + 下一步 @@ -146,10 +147,28 @@ /> + + + + 您是否可能存在不适合 + 使用糖皮质激素的情况? + + 例如高血压、消化性溃疡、精神疾病、青光眼、股骨头坏死等 + + + + 没有 + + + + + + + - 取消 - 下一步 + 上一步 + 下一步 @@ -180,10 +199,10 @@ 您近6个月的出血情况 - - 200 - /200 - + + + + 请上传您的检查报告 @@ -111,6 +151,10 @@ + + 取消 + 提交 + () +const app = getApp() +let timer = null as null | number Page({ data: { showTel: false, + mobile: '', + code: '', + + codeText: '发送验证码', + + check1: false, + check2: false, + check3: false, }, onLoad() {}, + getCode() { + if (timer) return + const mobile = this.data.mobile + if (!mobile) { + wx.showToast({ + title: '手机号不能为空', + icon: 'none', + }) + return + } + // 验证手机号 + if (!/^1[3-9,]\d{9}$/.test(mobile)) { + wx.showToast({ + title: '手机号格式不正确', + icon: 'none', + }) + return + } + wx.ajax({ + method: 'POST', + url: '?r=wtx/login/send-verify-code', + data: { + mobile, + }, + }).then((_res) => { + wx.showToast({ + icon: 'none', + title: '验证码已发送~', + }) + let time = 60 + timer = setInterval(() => { + time-- + this.setData({ + codeText: `${time}s后重新发送`, + }) + if (time <= 0) { + clearInterval(timer as number) + timer = null + this.setData({ + codeText: '发送验证码', + }) + } + }, 1000) + }) + }, + handleDocRule() { + const { check1, check2, check3 } = this.data + return new Promise((resolve) => { + if (check1 && check2 && check3) { + return resolve(true) + } + wx.showToast({ + title: '请同意相关协议', + icon: 'none', + }) + }) + }, + async handleSubmit() { + await this.handleDocRule() + const { mobile, code } = this.data + wx.ajax({ + method: 'POST', + url: '?r=wtx/login/reg-login', + data: { + mobile, + code, + }, + }).then((_res) => { + this.submitCallback() + }) + }, + handleWxSubmit(e: WechatMiniprogram.CustomEvent) { + const { iv, encryptedData } = e.detail + if (iv && encryptedData) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/login/wx-reg-login', + data: { + iv: encodeURIComponent(iv), + encryptedData: encodeURIComponent(encryptedData), + }, + }).then((_res) => { + this.submitCallback() + }) + } + }, + submitCallback() { + app.getUserInfo(2).then((res) => { + if (res.PatientId) { + wx.reLaunch({ + url: `/patient/pages/index/index`, + }) + } else { + wx.navigateTo({ + url: `/patient/pages/entryInfo/index?aid=${res.applyIntentionId}`, + }) + } + }) + }, handleShowTel() { this.setData({ showTel: !this.data.showTel, }) }, - handleSubmit() { - wx.navigateTo({ - url: '/patient/pages/entryInfo/index', - }) - }, }) export {} diff --git a/src/patient/pages/login/index.wxml b/src/patient/pages/login/index.wxml index 390b715..9b11154 100644 --- a/src/patient/pages/login/index.wxml +++ b/src/patient/pages/login/index.wxml @@ -4,7 +4,8 @@ > 欢迎加入愈见守护 - + + 或者 @@ -20,17 +21,25 @@ type="number" maxlength="11" placeholder="请输入您的手机号" + model:value="{{mobile}}" /> - - 发送验证码 + + {{codeText}} 登录 - + 我特此同意 《个人信息及隐私协议政策》 @@ -38,7 +47,7 @@ - + 我特此同意 《用户协议》 @@ -46,7 +55,7 @@ - + 我特此同意 《个人信息共享知情同意书》 diff --git a/src/patient/pages/loginOut/index.ts b/src/patient/pages/loginOut/index.ts index 4362958..410e3ea 100644 --- a/src/patient/pages/loginOut/index.ts +++ b/src/patient/pages/loginOut/index.ts @@ -1,4 +1,4 @@ -const _app = getApp() +const app = getApp() Page({ data: {}, @@ -9,10 +9,24 @@ Page({ confirmColor: 'rgba(246, 74, 58, 1)', success: (res) => { if (res.confirm) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/account/cancellation', + data: {}, + }).then(() => { + app.startLogin(() => { + wx.reLaunch({ + url: '/pages/index/index', + }) + }) + }) } }, }) }, + handleBack() { + wx.navigateBack() + }, }) export {} diff --git a/src/patient/pages/loginOut/index.wxml b/src/patient/pages/loginOut/index.wxml index 0e11e4b..2a6d348 100644 --- a/src/patient/pages/loginOut/index.wxml +++ b/src/patient/pages/loginOut/index.wxml @@ -11,6 +11,6 @@ 请您谨慎操作 确认注销 - 取消 + 取消 diff --git a/src/patient/pages/my/index.ts b/src/patient/pages/my/index.ts index e226c89..6635fd9 100644 --- a/src/patient/pages/my/index.ts +++ b/src/patient/pages/my/index.ts @@ -5,6 +5,9 @@ Page({ popupShow: false, popupType: 'stayTuned', popupParams: {}, + + userInfo: {}, + Days: '', }, onLoad() { app.waitLogin().then(() => { @@ -72,6 +75,11 @@ Page({ url: '/patient/pages/userInfo/index', }) }, + handleDoctor() { + wx.navigateTo({ + url: '/doctor/pages/login/index', + }) + }, handleFamily() { wx.navigateTo({ url: '/patient/pages/family/index', diff --git a/src/patient/pages/my/index.wxml b/src/patient/pages/my/index.wxml index 38f0cc4..b26752a 100644 --- a/src/patient/pages/my/index.wxml +++ b/src/patient/pages/my/index.wxml @@ -15,20 +15,24 @@ - 查看我的健康档案 - - 切换身份 - - + + + 个人信息 + + + - 我是医生登录医生端 + + 我是医生 + 登录医生端 + diff --git a/src/patient/pages/preDiagnosisReport/index.scss b/src/patient/pages/preDiagnosisReport/index.scss index 5a2367f..3aa6782 100644 --- a/src/patient/pages/preDiagnosisReport/index.scss +++ b/src/patient/pages/preDiagnosisReport/index.scss @@ -190,7 +190,42 @@ page { } .module2 { padding: 16rpx 32rpx 32rpx; + .m-input-area { + padding: 0 32rpx; + border-radius: 24rpx; + background-color: rgba(247, 247, 250, 1); + .m-input { + padding: 32rpx 0; + display: flex; + align-items: center; + gap: 32rpx; + border-bottom: 1px solid rgba(241, 241, 244, 1); + .label { + flex-shrink: 0; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + width: 7em; + .sub-label { + font-size: 20rpx; + } + } + .input { + width: 3em; + font-size: 32rpx; + height: 72rpx; + color: rgba(1, 1, 5, 1); + } + .place-input { + color: rgba(161, 164, 172, 0.5); + } + .sub { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + } + } .m-title { + margin-top: 48rpx; font-size: 32rpx; color: rgba(1, 1, 5, 1); } @@ -395,6 +430,57 @@ page { margin-top: 24rpx; } } + .module9 { + padding: 0 32rpx 32rpx; + .m-select-title { + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .m-select { + margin-top: 24rpx; + display: flex; + flex-wrap: wrap; + gap: 28rpx; + .m-item { + padding: 12rpx 24rpx; + font-size: 32rpx; + color: rgba(137, 141, 151, 1); + background: #f7f7fa; + border-radius: 12rpx 12rpx 12rpx 12rpx; + &.active { + color: #fff; + background-color: rgba(246, 74, 58, 1); + } + } + } + .m-title { + margin-top: 48rpx; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .file-list { + margin-top: 24rpx; + } + } + .module10 { + padding: 0 32rpx 32rpx; + .text-area{ + padding: 24rpx 32rpx; + width: 100%; + height: 182rpx; + border-radius: 12rpx; + box-sizing: border-box; + background-color: rgba(247, 247, 250, 1); + } + .m-title { + margin-top: 48rpx; + font-size: 32rpx; + color: rgba(1, 1, 5, 1); + } + .file-list { + margin-top: 24rpx; + } + } } } } diff --git a/src/patient/pages/preDiagnosisReport/index.wxml b/src/patient/pages/preDiagnosisReport/index.wxml index cd44907..629d019 100644 --- a/src/patient/pages/preDiagnosisReport/index.wxml +++ b/src/patient/pages/preDiagnosisReport/index.wxml @@ -68,10 +68,32 @@ 已检查 - 重点检查项目:丙氨酸氨基转移酶(ALT)天门冬氨酸氨基转移酶(AST)总胆红素肌酐 + + + + ALT + 丙氨酸氨基转移酶 + + + U/L + + + + AST + 天门冬氨酸氨基转移酶 + + + U/L + + + 总胆红素 + + μmol/L + + 请上传您的检查报告 @@ -257,6 +279,10 @@ 阳性(+) 阴性(-) + 填提交您的HIV检测报告 + + + @@ -296,6 +322,74 @@ + + + + 9 + + + + + + + AAV 抗体检查 + + + + + + 已检查 + + + 提交您的AAV抗体检查报告 + + + + 填选您的AAV检查结果 + + 阳性(+) + 阴性(-) + + 填提交您的AAV检测报告 + + + + + + + + + + + 10 + + + + + + + 其他检查 + + + + + + 已检查 + + + 您的其他项检查 + + + + + 填提交您的检测报告 + + + + + + + diff --git a/src/patient/pages/selectHostipal/index.scss b/src/patient/pages/selectHostipal/index.scss index 4a7810c..aee252c 100644 --- a/src/patient/pages/selectHostipal/index.scss +++ b/src/patient/pages/selectHostipal/index.scss @@ -12,12 +12,12 @@ page { align-items: center; justify-content: space-between; .title { - font-size: 28rpx; + font-size: 26rpx; color: rgba(1, 1, 5, 1); } .icon { - width: 40rpx; - height: 40rpx; + width: 36rpx; + height: 36rpx; } } .form { diff --git a/src/patient/pages/selectHostipal/index.wxml b/src/patient/pages/selectHostipal/index.wxml index c238e26..87b3275 100644 --- a/src/patient/pages/selectHostipal/index.wxml +++ b/src/patient/pages/selectHostipal/index.wxml @@ -3,8 +3,8 @@ - 选择您的绑定医生,自动确定您的就诊医院 - + 选择您的绑定医生,自动确定您的定点检查医院 + diff --git a/src/patient/pages/userInfo/index.scss b/src/patient/pages/userInfo/index.scss index 25b8710..457daa6 100644 --- a/src/patient/pages/userInfo/index.scss +++ b/src/patient/pages/userInfo/index.scss @@ -24,7 +24,7 @@ page { color: rgba(1, 1, 5, 1); } .place-input { - color: rgba(161, 164, 172, 0.40); + color: rgba(161, 164, 172, 0.4); } .picker, .picker-area { @@ -35,7 +35,7 @@ page { color: rgba(1, 1, 5, 1); &:empty::after { content: attr(data-place); - color: rgba(161, 164, 172, 0.40); + color: rgba(161, 164, 172, 0.4); } } } @@ -58,13 +58,16 @@ page { } } .login-out { - margin-top: 48rpx; + margin-top: 72rpx; padding: 22rpx; + line-height: 44rpx; font-size: 32rpx; color: rgba(1, 1, 5, 1); text-align: center; - line-height: 1; background-color: #fff; border-radius: 96rpx; + &:last-of-type { + margin-top: 32rpx; + } } } diff --git a/src/patient/pages/userInfo/index.ts b/src/patient/pages/userInfo/index.ts index 2550d39..50ba5cd 100644 --- a/src/patient/pages/userInfo/index.ts +++ b/src/patient/pages/userInfo/index.ts @@ -1,8 +1,60 @@ -const _app = getApp() +const app = getApp() Page({ - data: {}, - onLoad() {}, + data: { + name: '', + birthMonth: '', + provinceId: '', + cityId: '', + + provinceName: '', + cityName: '', + + PatientTel: '', + + userInfo: {}, + }, + onLoad() { + app.waitLogin().then(() => { + app.getUserInfo(2).then((userInfo) => { + this.setData({ + name: userInfo.PatientName, + birthMonth: userInfo.PatientBirth, + provinceId: userInfo.PatientProvinceId, + cityId: userInfo.PatientCityId, + provinceName: userInfo.PatientProvince, + cityName: userInfo.PatientCity, + PatientTel: userInfo.PatientTel, + userInfo, + }) + }) + }) + }, + handleAreaChange(e: any) { + const value = e.detail + this.setData({ + provinceId: value[0].value, + cityId: value[1] ? value[1].value : '', + provinceName: value[0].label, + cityName: value[1] ? value[1].label : '', + }) + this.handleUpdate() + }, + handleUpdate() { + const { name, birthMonth, provinceId, cityId } = this.data + wx.ajax({ + method: 'POST', + url: '?r=wtx/account/update-info', + data: { + name, + birthMonth, + provinceId, + cityId, + }, + }).then((res) => { + console.log('res: ', res) + }) + }, handleTel() { wx.navigateTo({ url: '/patient/pages/changeTel/index', @@ -13,6 +65,27 @@ Page({ url: '/patient/pages/loginOut/index', }) }, + handleOut() { + wx.showModal({ + title: '确定退出登录吗?', + confirmColor: 'rgba(246, 74, 58, 1)', + success: (res) => { + if (res.confirm) { + wx.ajax({ + method: 'POST', + url: '?r=wtx/user/reg-logout', + data: {}, + }).then(() => { + app.startLogin(() => { + wx.reLaunch({ + url: '/pages/index/index', + }) + }) + }) + } + }, + }) + }, }) export {} diff --git a/src/patient/pages/userInfo/index.wxml b/src/patient/pages/userInfo/index.wxml index 5df9dee..cc517fe 100644 --- a/src/patient/pages/userInfo/index.wxml +++ b/src/patient/pages/userInfo/index.wxml @@ -3,25 +3,34 @@ 我的姓名 - + 出生年月 - + - + {{birthMonth}} - 我的姓名 + 所在地 - + - + + {{provinceName ? provinceName+ '/' : provinceName }}{{cityName}} + @@ -29,12 +38,13 @@ 手机号 - - 12312312 + + {{PatientTel}} 修改手机号 + diff --git a/typings/index.d.ts b/typings/index.d.ts index 39b87ae..da41466 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -33,17 +33,21 @@ interface IAppOption { Timestamp: number + waitBindDoctorId: string loginState: string - isLogin: 0 | 1 - isReg: 0 | 1 - userId: string - guestPrivacyAgree: boolean + initLoginInfo: Partial<{ + isLogin: 0 | 1 + isReg: 0 | 1 + loginType: 1 | 2 + guestPrivacyAgree: boolean + }> [propName: string]: any } - getUserInfo: () => Promise - startLogin: () => void - waitLogin: () => Promise + getUserInfo: (type?: 1 | 2 | 3) => Promise + startLogin: (callback?: () => void) => void + waitLogin: (params?: { type?: 0 | 1 | 2 | 'any' }) => Promise + checkLoginType: (type: 0 | 1 | 2) => boolean mpBehavior: (data: { PageName: string; type?: 0 | 1 | 2 | 3 }) => void globalSystemInfo?: globalSystemInfo [propName: string]: any