Browse Source

医生端部分页面开发

2.0
kola-web 2 months ago
parent
commit
2a41912e88
  1. 2
      package.json
  2. 39
      pnpm-lock.yaml
  3. 92
      project.private.config.json
  4. 21
      src/app.json
  5. 103
      src/app.ts
  6. 1
      src/components/calendar/plugins/index.d.ts
  7. 109
      src/components/popup/index.scss
  8. 6
      src/components/popup/index.ts
  9. 76
      src/components/popup/index.wxml
  10. 6
      src/components/popupDoctor/index.json
  11. 91
      src/components/popupDoctor/index.scss
  12. 66
      src/components/popupDoctor/index.ts
  13. 45
      src/components/popupDoctor/index.wxml
  14. 7
      src/doctor/components/doctor-tab-bar/index.json
  15. 16
      src/doctor/components/doctor-tab-bar/index.scss
  16. 53
      src/doctor/components/doctor-tab-bar/index.ts
  17. 14
      src/doctor/components/doctor-tab-bar/index.wxml
  18. 4
      src/doctor/pages/changeTel/index.json
  19. 50
      src/doctor/pages/changeTel/index.scss
  20. 85
      src/doctor/pages/changeTel/index.ts
  21. 30
      src/doctor/pages/changeTel/index.wxml
  22. 7
      src/doctor/pages/index/index.json
  23. 403
      src/doctor/pages/index/index.scss
  24. 8
      src/doctor/pages/index/index.ts
  25. 177
      src/doctor/pages/index/index.wxml
  26. 6
      src/doctor/pages/login/index.json
  27. 125
      src/doctor/pages/login/index.scss
  28. 116
      src/doctor/pages/login/index.ts
  29. 60
      src/doctor/pages/login/index.wxml
  30. 7
      src/doctor/pages/my/index.json
  31. 112
      src/doctor/pages/my/index.scss
  32. 84
      src/doctor/pages/my/index.ts
  33. 38
      src/doctor/pages/my/index.wxml
  34. 4
      src/doctor/pages/userInfo/index.json
  35. 29
      src/doctor/pages/userInfo/index.scss
  36. 34
      src/doctor/pages/userInfo/index.ts
  37. 12
      src/doctor/pages/userInfo/index.wxml
  38. BIN
      src/images/bg17.png
  39. BIN
      src/images/bg18.png
  40. BIN
      src/images/bg19.png
  41. BIN
      src/images/bg20.png
  42. BIN
      src/images/calendar-left-disabled.png
  43. BIN
      src/images/calendar-left.png
  44. BIN
      src/images/calendar-right-disabled.png
  45. BIN
      src/images/calendar-right.png
  46. BIN
      src/images/gif2.gif
  47. BIN
      src/images/icon42.png
  48. BIN
      src/images/icon43.png
  49. BIN
      src/images/icon44.png
  50. BIN
      src/images/icon49.png
  51. BIN
      src/images/icon50.png
  52. BIN
      src/images/icon72.png
  53. BIN
      src/images/icon73.png
  54. BIN
      src/images/icon74.png
  55. BIN
      src/images/icon75.png
  56. BIN
      src/images/icon76.png
  57. BIN
      src/images/icon77.png
  58. BIN
      src/images/icon78.png
  59. BIN
      src/images/icon79.png
  60. BIN
      src/images/icon80.png
  61. BIN
      src/images/icon81.png
  62. BIN
      src/images/icon82.png
  63. BIN
      src/images/icon83.png
  64. BIN
      src/images/icon84.png
  65. BIN
      src/images/icon85.png
  66. BIN
      src/images/icon86.png
  67. BIN
      src/images/icon87.png
  68. BIN
      src/images/icon88.png
  69. BIN
      src/images/icon89.png
  70. BIN
      src/images/icon90.png
  71. BIN
      src/images/logo2.png
  72. BIN
      src/images/tabbar/tabbar3-1-active.png
  73. BIN
      src/images/tabbar/tabbar3-1.png
  74. BIN
      src/images/tabbar/tabbar3-2-active.png
  75. BIN
      src/images/tabbar/tabbar3-2.png
  76. BIN
      src/images/title11.png
  77. BIN
      src/images/title12.png
  78. 2
      src/pages/applyFrom/index.wxml
  79. 22
      src/pages/index/index.scss
  80. 86
      src/pages/index/index.ts
  81. 10
      src/pages/index/index.wxml
  82. 15
      src/pages/my/index.ts
  83. 21
      src/pages/my/index.wxml
  84. 32
      src/pages/start/index.ts
  85. 4
      src/patient/components/patient-tab-bar/index.ts
  86. 37
      src/patient/pages/aavReport/index.scss
  87. 5
      src/patient/pages/aavReport/index.wxml
  88. 3
      src/patient/pages/askPatient/index.json
  89. 347
      src/patient/pages/askPatient/index.scss
  90. 162
      src/patient/pages/askPatient/index.ts
  91. 154
      src/patient/pages/askPatient/index.wxml
  92. 2
      src/patient/pages/bbmRemark/index.json
  93. 21
      src/patient/pages/bbmRemark/index.scss
  94. 14
      src/patient/pages/bbmRemark/index.ts
  95. 26
      src/patient/pages/bbmRemark/index.wxml
  96. 55
      src/patient/pages/bbmReport/index.scss
  97. 26
      src/patient/pages/bbmReport/index.wxml
  98. 1
      src/patient/pages/bindDoctor/index.json
  99. 82
      src/patient/pages/bindDoctor/index.ts
  100. 10
      src/patient/pages/bindDoctor/index.wxml
  101. Some files were not shown because too many files have changed in this diff Show More

2
package.json

@ -25,7 +25,7 @@ @@ -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"
}

39
pnpm-lock.yaml

@ -49,7 +49,7 @@ importers: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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

92
project.private.config.json

@ -23,13 +23,90 @@ @@ -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 @@ @@ -107,7 +184,7 @@
"scene": null
},
{
"name": "患者-凝血因子统计",
"name": "患者-查看我的健康变化",
"pathName": "patient/pages/coltStat/index",
"query": "",
"launchMode": "default",
@ -206,14 +283,7 @@ @@ -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

21
src/app.json

@ -19,7 +19,7 @@ @@ -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 @@ @@ -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"
]
},
{

103
src/app.ts

@ -3,10 +3,14 @@ @@ -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<IAppOption>({ @@ -32,13 +36,11 @@ App<IAppOption>({
// 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<IAppOption>({ @@ -63,7 +65,7 @@ App<IAppOption>({
}
this.startLogin()
},
startLogin() {
startLogin(callback?: () => void) {
wx.login({
success: (res) => {
wx.ajax({
@ -74,28 +76,67 @@ App<IAppOption>({ @@ -74,28 +76,67 @@ App<IAppOption>({
},
}).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<IAppOption>({ @@ -109,10 +150,24 @@ App<IAppOption>({
})
},
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 () {

1
src/components/calendar/plugins/index.d.ts vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
export {};

109
src/components/popup/index.scss

@ -939,6 +939,115 @@ @@ -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;

6
src/components/popup/index.ts

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
import { wxPromiseWrapper } from 'XrFrame/core/utils'
const app = getApp<IAppOption>()
Component({
@ -47,5 +49,9 @@ Component({ @@ -47,5 +49,9 @@ Component({
app.mpBehavior({ PageName: 'BTN_PATIENTPRIVACY' })
}
},
handleSelectStatus(e) {
const { status } = e.currentTarget.dataset
this.triggerEvent('ok', { type: 'selectStatusComplete', status })
},
},
})

76
src/components/popup/index.wxml

@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
<van-popup
wx:if="{{show}}"
bind:click-overlay="handleCancel"
round
z-index="{{100000}}"
show="{{ show }}"
show="{{ true }}"
custom-style="background:transparent;"
position="{{params.position || 'center'}}"
safe-area-inset-bottom="{{false}}"
@ -45,27 +46,24 @@ @@ -45,27 +46,24 @@
<view class="container">
<image class="title" src="{{imageUrl}}title1.png?t={{Timestamp}}"></image>
<view class="card">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<image class="avatar" src="{{params.avatar}}"></image>
<view class="wrap">
<view class="name">王青</view>
<view class="name">{{params.name}}</view>
<view class="hostipal">
<view class="content">北京积水潭医院龙泽院区</view>
<view class="tag">三甲</view>
<view class="content">{{params.hostipal}}</view>
<view class="tag">{{params.className}}{{params.levelName}}</view>
</view>
</view>
</view>
<view class="btn">确定</view>
<view class="btn" bind:tap="handleOk">确定</view>
</view>
</view>
<view class="popup4" wx:elif="{{type==='bindDoctorReject'}}">
<image class="icon" src="{{imageUrl}}icon24.png?t={{Timestamp}}"></image>
<view class="container">
<image class="title" src="{{imageUrl}}title2.png?t={{Timestamp}}"></image>
<view class="content">请检查网络后重试</view>
<view class="btn">重新扫码</view>
<view class="content">{{params.msg}}</view>
<view class="btn" bind:tap="handleOk">重新扫码</view>
</view>
</view>
<view class="popup5" wx:elif="{{type==='selectIdentity'}}">
@ -106,7 +104,7 @@ @@ -106,7 +104,7 @@
<view class="title">记录下您此次的检查情况吧</view>
<view class="content">请基于您的实际检查结果点选合适的检查状态</view>
<view class="status-wrap">
<view class="s-item active">
<view class="s-item active" bind:tap="handleSelectStatus" data-status="1">
<image class="icon" src="{{imageUrl}}icon42.png?t={{Timestamp}}"></image>
<view class="s-content">
<view>多项不达标</view>
@ -116,7 +114,7 @@ @@ -116,7 +114,7 @@
</view>
</view>
</view>
<view class="s-item">
<view class="s-item" bind:tap="handleSelectStatus" data-status="1">
<image class="icon" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image>
<view class="s-content">
<view>少量不达标</view>
@ -126,7 +124,7 @@ @@ -126,7 +124,7 @@
</view>
</view>
</view>
<view class="s-item">
<view class="s-item" bind:tap="handleSelectStatus" data-status="1">
<image class="icon" src="{{imageUrl}}icon44.png?t={{Timestamp}}"></image>
<view class="s-content">
<view>整体不错</view>
@ -200,8 +198,8 @@ @@ -200,8 +198,8 @@
disable-default-padding
></textarea>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="submit" bind:tap="handleOk">提交</view>
</view>
</view>
</view>
@ -226,21 +224,18 @@ @@ -226,21 +224,18 @@
<view class="container">
<image class="title" src="/images/title6.png"></image>
<view class="card">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<image class="avatar" src="{{params.avatar}}"></image>
<view class="wrap">
<view class="name">王青</view>
<view class="name">{{params.name}}</view>
<view class="hostipal">
<view class="content">北京积水潭医院龙泽院区</view>
<view class="tag">三甲</view>
<view class="content">{{params.hostipal}}</view>
<view class="tag">{{params.className}}{{params.levelName}}</view>
</view>
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="submit" bind:tap="handleOk">提交</view>
</view>
</view>
</view>
@ -274,8 +269,35 @@ @@ -274,8 +269,35 @@
</view>
</view>
<view class="footer">
<view class="cancel">暂不绑定</view>
<view class="submit">注册并绑定></view>
<view class="cancel" bind:tap="handleCancel">暂不绑定</view>
<view class="submit" bind:tap="handleOk">注册并绑定></view>
</view>
</view>
</view>
<view class="popup16" wx:elif="{{type==='selectDoctor'}}">
<view class="container">
<image class="title" src="/images/title12.png"></image>
<view class="list">
<view class="list-item" wx:for="{{6}}" wx:key="index">
<view class="radio">
<image class="r-icon" src="{{imageUrl}}icon34.png?t={{Timestamp}}"></image>
</view>
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<view class="wrap">
<view class="name">王青</view>
<view class="hostipal">
<view class="content">北京积水潭医院龙泽院区</view>
<view class="tag">三甲</view>
</view>
</view>
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">确定</view>
</view>
</view>
</view>

6
src/components/popupDoctor/index.json

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"van-popup": "@vant/weapp/popup/index"
}
}

91
src/components/popupDoctor/index.scss

@ -0,0 +1,91 @@ @@ -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;
}

66
src/components/popupDoctor/index.ts

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
const app = getApp<IAppOption>()
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')
})
}
},
})
},
},
})

45
src/components/popupDoctor/index.wxml

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
<slot bind:tap="handleShow"></slot>
<van-popup
wx:if="{{show}}"
bind:click-overlay="handleCancel"
round
z-index="{{100000}}"
show="{{ true }}"
custom-style="background:transparent;"
safe-area-inset-bottom="{{false}}"
root-portal
>
<view class="popup">
<view class="container">
<view class="title">医生介绍</view>
<view class="user">
<image class="avatar" src="{{doctorInfo.doctorAvatar}}"></image>
<view class="wrap">
<view class="name">{{doctorInfo.doctorName}}</view>
</view>
</view>
<view class="row">
<view class="label">所在医院</view>
<view class="col">
<view class="content">{{doctorInfo.hospitalName}}</view>
<view class="tag">{{doctorInfo.hospitalClassificationName}}{{doctorInfo.hospitalLevelName}}</view>
</view>
</view>
<view class="row">
<view class="label">医生简介</view>
<view class="col">
<view class="content">{{doctorInfo.doctorIntroduce || '--'}}</view>
</view>
</view>
<view class="footer" bind:tap="handleUnbind">解绑此医生</view>
</view>
</view>
<image
wx:if="{{params.close}}"
class="close"
src="{{imageUrl}}icon25.png?t={{Timestamp}}"
bind:tap="handleCancel"
></image>
</van-popup>

7
src/doctor/components/doctor-tab-bar/index.json

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"van-tabbar": "@vant/weapp/tabbar/index",
"van-tabbar-item": "@vant/weapp/tabbar-item/index"
}
}

16
src/doctor/components/doctor-tab-bar/index.scss

@ -0,0 +1,16 @@ @@ -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);
}
}
}

53
src/doctor/components/doctor-tab-bar/index.ts

@ -0,0 +1,53 @@ @@ -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,
})
},
},
})

14
src/doctor/components/doctor-tab-bar/index.wxml

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
<van-tabbar active="{{ active }}" active-color="rgba(28, 107, 255, 1)" bind:change="onChange" inactive-color="#010105">
<block wx:for="{{list}}" wx:key="*this">
<van-tabbar-item
class="tab-item"
wx:if="{{ index != 3 || !anyWhere}}"
bind:tap="handleNav"
data-index="{{index}}"
icon="{{imageUrl}}tabbar/{{active==index ? item.iconActive : item.icon}}.png?t={{Timestamp}}"
>
<view class="name {{index==active && 'active'}}">{{item.text}}</view>
<view class="hot"></view>
</van-tabbar-item>
</block>
</van-tabbar>

4
src/doctor/pages/changeTel/index.json

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
{
"navigationBarTitleText": "修改手机号",
"usingComponents": {}
}

50
src/doctor/pages/changeTel/index.scss

@ -0,0 +1,50 @@ @@ -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;
}
}

85
src/doctor/pages/changeTel/index.ts

@ -0,0 +1,85 @@ @@ -0,0 +1,85 @@
const app = getApp<IAppOption>()
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()
},
})

30
src/doctor/pages/changeTel/index.wxml

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
<view class="page">
<view class="form">
<view class="row">
<view class="label">新手机号</view>
<view class="container">
<input
type="number"
class="input"
maxlength="11"
placeholder-class="place-input"
placeholder="请输入新手机号"
/>
</view>
</view>
<view class="row">
<view class="label">验证码</view>
<view class="container">
<input
type="number"
class="input"
maxlength="6"
placeholder-class="place-input"
placeholder="请输入短信验证码"
/>
<view class="btn" bind:tap="getCode">{{codeText}}</view>
</view>
</view>
</view>
<view class="login-out">提交</view>
</view>

7
src/doctor/pages/index/index.json

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
{
"navigationStyle": "custom",
"usingComponents": {
"navbar": "/components/navbar/index",
"doctor-tab-bar": "/doctor/components/doctor-tab-bar/index"
}
}

403
src/doctor/pages/index/index.scss

@ -0,0 +1,403 @@ @@ -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;
}
}
}
}
}
}

8
src/doctor/pages/index/index.ts

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
const _app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
});
export {}

177
src/doctor/pages/index/index.wxml

@ -0,0 +1,177 @@ @@ -0,0 +1,177 @@
<navbar fixed custom-style="background:{{background}}" back>
<image class="page-title" slot="left" src="{{imageUrl}}title11.png?t={{Timestamp}}"></image>
</navbar>
<view
class="page"
style="padding-top:{{pageTop}}px;background:url('{{imageUrl}}bg17.png?t={{Timestamp}}') no-repeat top center/100% 666rpx"
>
<view class="header">
<view class="user">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<view class="wrap">
<view class="name">王青</view>
<view class="content">北京协和医院</view>
</view>
<image class="code" src="/images/icon72.png"></image>
</view>
<view class="patient">
<view class="p-title">
您当前跟进
<text class="num">4</text>
个患者
</view>
<swiper class="swiper" display-multiple-items="{{2.8}}" circular previous-margin="10rpx">
<swiper-item class="swiper-item {{index==0 && 'active'}}" wx:for="{{6}}" wx:key="index">
<view class="swiper-item-container">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<view class="wrap">
<view class="name">刘可</view>
<view class="date">2024.3.12</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
<view class="body">
<view class="doctor">
<view class="d-header">
<view class="title">共同照护团队</view>
<view class="message">
最新消息12条
<view class="dot"></view>
</view>
</view>
<view class="d-container">
<view class="avatar">
<image
class="a-img"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<image
class="a-img"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
</view>
<view class="wrap">
<view class="name">刘湖飞</view>
<view class="content">天津血液科诊断中心</view>
</view>
<view class="btn">去看看></view>
</view>
</view>
<view class="progress">
<view class="p-header">刘可的检查进展</view>
<view class="card finish">
<view class="c-aside">
<view class="line-top hide"></view>
<view class="num">1</view>
<view class="line-bottom"></view>
</view>
<view class="c-container">
<view class="module">
<view class="m-header">
<view class="title">诊前筛查</view>
<view class="date">2024-08-24</view>
</view>
<view class="m-body">
<view class="status">
已完成
<image class="icon" src="/images/icon29.png"></image>
</view>
<view class="detail">查看详情</view>
</view>
</view>
</view>
</view>
<view class="card current">
<view class="c-aside">
<view class="line-top"></view>
<view class="num">2</view>
<view class="line-bottom"></view>
</view>
<view class="c-container">
<view class="module">
<view class="m-header">
<view class="title">注射前准备</view>
</view>
<view class="m-body">
<view class="status">
进行中
<image class="icon" src="/images/icon29.png"></image>
</view>
</view>
</view>
</view>
</view>
<view class="card">
<view class="c-aside">
<view class="line-top"></view>
<view class="num">3</view>
<view class="line-bottom"></view>
</view>
<view class="c-container">
<view class="module">
<view class="m-header">
<view class="title">
诊前筛查
<view class="tag">还未确定注射日</view>
</view>
</view>
<view class="m-body">
<view class="status">
待启动
<image class="icon" src="/images/icon29.png"></image>
</view>
</view>
</view>
</view>
</view>
<view class="card">
<view class="c-aside">
<view class="line-top"></view>
<view class="num">4</view>
<view class="line-bottom hide"></view>
</view>
<view class="c-container">
<view class="module">
<view class="m-header">
<view class="title">诊前筛查</view>
</view>
<view class="m-body">
<view class="status">
已完成
<image class="icon" src="/images/icon29.png"></image>
</view>
</view>
<view class="btn">待启动</view>
</view>
</view>
</view>
</view>
<view class="kkd">
<view class="k-item">
<image class="icon" src="/images/icon73.png"></image>
<view class="wrap">
<view class="title">他的全部</view>
<view class="content">病历档案</view>
</view>
</view>
<view class="k-item">
<image class="icon" src="/images/icon74.png"></image>
<view class="wrap">
<view class="title">查看他的</view>
<view class="content">健康变化</view>
</view>
</view>
</view>
</view>
</view>
<doctor-tab-bar></doctor-tab-bar>

6
src/doctor/pages/login/index.json

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{
"navigationStyle": "custom",
"usingComponents": {
"van-divider": "@vant/weapp/divider/index"
}
}

125
src/doctor/pages/login/index.scss

@ -0,0 +1,125 @@ @@ -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);
}
}
}

116
src/doctor/pages/login/index.ts

@ -0,0 +1,116 @@ @@ -0,0 +1,116 @@
const app = getApp<IAppOption>()
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 {}

60
src/doctor/pages/login/index.wxml

@ -0,0 +1,60 @@ @@ -0,0 +1,60 @@
<view
class="page"
style="padding-top: {{pageTop + 60}}px;background:url('{{imageUrl}}bg19.png?t={{Timestamp}}') no-repeat top center/100% 618rpx;"
>
<image class="logo" src="/images/logo2.png"></image>
<view class="title">欢迎加入愈见守护</view>
<view class="form">
<view class="form-row">
<input
class="input"
placeholder-class="place-input"
type="number"
maxlength="11"
placeholder="请输入您的手机号"
model:value="{{mobile}}"
/>
</view>
<view class="form-row">
<input
class="input"
medal:value="{{code}}"
placeholder-class="place-input"
type="number"
maxlength="6"
placeholder="请输入验证码"
/>
<view class="btn" bind:tap="getCode">{{codeText}}</view>
</view>
<view class="submit" bind:tap="handleSubmit">登录</view>
</view>
<view class="divider">
<van-divider class="van-divider" contentPosition="center">或者</van-divider>
</view>
<button wx:if="{{check1 && check2 }}" class="phone" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">
<image class="icon" src="/images/icon87.png"></image>
手机号一键登录
</button>
<button wx:else class="phone" bind:tap="handleDocRule">
<image class="icon" src="/images/icon87.png"></image>
手机号一键登录
</button>
<view class="signature">
<view class="row">
<checkbox model:checked="{{check1}}" class="checkbox" color="rgba(28, 107, 255, 1)"></checkbox>
<view class="r-content">
我已阅读并同意
<text class="link">《个人信息及隐私协议政策》</text>
</view>
</view>
<view class="row">
<checkbox model:checked="{{check2}}" class="checkbox" color="rgba(28, 107, 255, 1)"></checkbox>
<view class="r-content">
我已阅读并同意
<text class="link">《个人信息共享知情同意书》</text>
规定收集我的相关敏感个人信息
</view>
</view>
</view>
</view>

7
src/doctor/pages/my/index.json

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
{
"navigationStyle": "custom",
"usingComponents": {
"popup": "/components/popup/index",
"patient-tab-bar":"/patient/components/patient-tab-bar/index"
}
}

112
src/doctor/pages/my/index.scss

@ -0,0 +1,112 @@ @@ -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);
}
}

84
src/doctor/pages/my/index.ts

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
const app = getApp<IAppOption>()
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 {}

38
src/doctor/pages/my/index.wxml

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
<view
class="page"
style="background: url('{{imageUrl}}bg20.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;"
>
<view class="user">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
<image class="avatar" src="{{userInfo.Img}}"></image>
</button>
<view class="wrap">
<view class="name">
<text class="nickname">{{userInfo.Name}}</text>
</view>
<view class="hostipal">
{{userInfo.HospitalName}}
<view class="tag">随访医院</view>
</view>
</view>
<image class="code" src="/images/icon88.png"></image>
</view>
<view class="list">
<view class="list-container">
<view class="item" bind:tap="handleUserInfo">
<image class="icon" src="/images/icon89.png"></image>
<view class="content">账号管理</view>
<van-icon class="more" name="arrow" />
</view>
<view class="item" bind:tap="handleDoc">
<image class="icon" src="/images/icon90.png"></image>
<view class="content">隐私协议</view>
<van-icon class="more" name="arrow" />
</view>
</view>
</view>
</view>
<popup model:show="{{popupShow}}" type="{{popupType}}" params="{{popupParams}}" bind:cancel="handlePopupCancel"></popup>
<patient-tab-bar></patient-tab-bar>

4
src/doctor/pages/userInfo/index.json

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
{
"navigationBarTitleText": "账号管理",
"usingComponents": {}
}

29
src/doctor/pages/userInfo/index.scss

@ -0,0 +1,29 @@ @@ -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);
}
}
}
}

34
src/doctor/pages/userInfo/index.ts

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
const app = getApp<IAppOption>()
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 {}

12
src/doctor/pages/userInfo/index.wxml

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<view class="page">
<view class="card">
<view class="row" bind:tap="handleChanegTel">
<view class="name">修改手机号</view>
<van-icon class="more" name="arrow" />
</view>
<view class="row" bind:tap="handleLoginOut">
<view class="name">退出登录</view>
<van-icon class="more" name="arrow" />
</view>
</view>
</view>

BIN
src/images/bg17.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

BIN
src/images/bg18.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

BIN
src/images/bg19.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

BIN
src/images/bg20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

BIN
src/images/calendar-left-disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
src/images/calendar-left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
src/images/calendar-right-disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

BIN
src/images/calendar-right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

BIN
src/images/gif2.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

BIN
src/images/icon42.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/images/icon43.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/images/icon44.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/images/icon49.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/icon50.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/images/icon72.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

BIN
src/images/icon73.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/images/icon74.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/images/icon75.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
src/images/icon76.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/images/icon77.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/images/icon78.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
src/images/icon79.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
src/images/icon80.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/images/icon81.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/images/icon82.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

BIN
src/images/icon83.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
src/images/icon84.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
src/images/icon85.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon86.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon87.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

BIN
src/images/icon88.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

BIN
src/images/icon89.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon90.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

BIN
src/images/logo2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
src/images/tabbar/tabbar3-1-active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/tabbar/tabbar3-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/images/tabbar/tabbar3-2-active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/tabbar/tabbar3-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/title11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
src/images/title12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

2
src/pages/applyFrom/index.wxml

@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
<view class="from-item">
<view class="label required">所在地区</view>
<view class="content">
<pickerArea mode="region" value="{{CityId}}" level="city" level="{{2}}" bind:change="handleAreaChange">
<pickerArea mode="region" value="{{CityId}}" level="{{2}}" bind:change="handleAreaChange">
<view class="picker">
<view class="picker-content">
<!-- prettier-ignore -->

22
src/pages/index/index.scss

@ -237,3 +237,25 @@ @@ -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;
}
}

86
src/pages/index/index.ts

@ -4,9 +4,15 @@ Page({ @@ -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({ @@ -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({ @@ -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({ @@ -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({ @@ -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 = ''
})
}
},
})

10
src/pages/index/index.wxml

@ -78,6 +78,16 @@ @@ -78,6 +78,16 @@
</view>
</view>
<view wx:if="{{guideShow}}" class="preview" bind:touchmove="touchmovePreview" bind:tap="handleTapPreview">
<image
class="img {{index==guide && 'show'}}"
src="{{imageUrl}}guide/{{item}}.png?t={{Timestamp}}"
wx:for="{{guideList}}"
wx:key="*this"
mode="aspectFill"
></image>
</view>
<popup
show="{{popupShow}}"
type="{{popupType}}"

15
src/pages/my/index.ts

@ -5,6 +5,8 @@ Page({ @@ -5,6 +5,8 @@ Page({
popupShow: false,
popupType: 'stayTuned',
popupParams: {},
showPatient: false,
},
onLoad() {
app.waitLogin().then(() => {
@ -12,10 +14,21 @@ Page({ @@ -12,10 +14,21 @@ Page({
app.getUserInfo().then((userInfo) => {
this.setData({
userInfo,
// 数字变红
Days: userInfo.Days.replace(/(\d+)/g, '<span style="font-size: 20px;color: rgba(242, 58, 47, 1);">$1</span>'),
})
})
this.getGeneConfig()
})
},
getGeneConfig() {
wx.ajax({
method: 'GET',
url: '?r=wtx/common/get-gene-config',
data: {},
}).then((res) => {
this.setData({
showPatient: res === '1',
})
})
},
onChooseAvatar(e) {

21
src/pages/my/index.wxml

@ -23,9 +23,7 @@ @@ -23,9 +23,7 @@
src="{{imageUrl}}index-apply-end.png?t={{Timestamp}}"
></image>
<image wx:else class="a-img" src="{{imageUrl}}index-apply.png?t={{Timestamp}}"></image>
<view class="content">
患教活动报名
</view>
<view class="content">患教活动报名</view>
<image
wx:if="{{userInfo.ApplyIntentionId}}"
class="a-label"
@ -36,15 +34,14 @@ @@ -36,15 +34,14 @@
<view class="list-header" bind:tap="handleNone">
<view class="name">切换身份</view>
</view>
<!-- <view class="item" bind:tap="routerTo" data-url="/patient/pages/protocol/index"> -->
<!-- <view class="item" bind:tap="handleNone" data-index="1"> -->
<!-- <image class="icon" src="{{imageUrl}}icon13.png?t={{Timestamp}}"></image> -->
<!-- <view class="wrap"> -->
<!-- <view class="name">我已开启基因治疗</view> -->
<!-- <view class="content">切换基因治疗版本</view> -->
<!-- </view> -->
<!-- <image class="icon2" src="{{imageUrl}}icon12.png?t={{Timestamp}}"></image> -->
<!-- </view> -->
<view wx:if="{{showPatient}}" class="item" bind:tap="routerTo" data-url="/patient/pages/login/index">
<image class="icon" src="{{imageUrl}}icon13.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="name">我已开启基因治疗</view>
<view class="content">切换基因治疗版本</view>
</view>
<image class="icon2" src="{{imageUrl}}icon12.png?t={{Timestamp}}"></image>
</view>
<view class="item" bind:tap="handleNone" data-index="2">
<image class="icon" src="{{imageUrl}}icon14.png?t={{Timestamp}}"></image>
<view class="wrap">

32
src/pages/start/index.ts

@ -1,13 +1,31 @@ @@ -1,13 +1,31 @@
const _app = getApp<IAppOption>()
import { parseScene } from '@/utils/util'
const app = getApp<IAppOption>()
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',
})
}
})
},
})

4
src/patient/components/patient-tab-bar/index.ts

@ -9,13 +9,13 @@ Component({ @@ -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',

37
src/patient/pages/aavReport/index.scss

@ -83,4 +83,41 @@ page { @@ -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;
}
}
}

5
src/patient/pages/aavReport/index.wxml

@ -29,4 +29,9 @@ @@ -29,4 +29,9 @@
</view>
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>
</view>
</view>

3
src/patient/pages/askPatient/index.json

@ -2,6 +2,7 @@ @@ -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"
}
}

347
src/patient/pages/askPatient/index.scss

@ -11,102 +11,98 @@ page { @@ -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 { @@ -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;
}
}
}
}

162
src/patient/pages/askPatient/index.ts

@ -5,7 +5,7 @@ const app = getApp<IAppOption>() @@ -5,7 +5,7 @@ const app = getApp<IAppOption>()
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 { @@ -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({ @@ -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({ @@ -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({ @@ -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({ @@ -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)

154
src/patient/pages/askPatient/index.wxml

@ -6,6 +6,26 @@ @@ -6,6 +6,26 @@
style="background: url('{{imageUrl}}bg7.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;"
>
<view class="page-container" id="page-container">
<view class="f-header" wx:if="{{doctorList.length}}">
<view class="left">
<view class="doctor-list">
<view
class="doctor-item"
wx:for="{{doctorList}}"
wx:key="index"
data-id="{{item.doctorId}}"
bind:tap="handleDoctor"
>
<image class="avatar" src="{{item.doctorAvatar}}"></image>
<view class="name">{{item.doctorName}}</view>
</view>
</view>
</view>
<view class="more" bind:tap="handleDoctorList">
查看医生介绍
<van-icon name="arrow" />
</view>
</view>
<scroll-view
class="scroll-view"
scroll-y="{{true}}"
@ -14,54 +34,33 @@ @@ -14,54 +34,33 @@
scroll-with-animation
bindscrolltoupper="scrolltoupper"
>
<view class="first-ask" wx:if="{{headerQuestionList.length}}">
<view class="f-header">
<view class="left">
<view class="doctor-list">
<view class="doctor-item">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<view class="name">王青</view>
</view>
<view class="doctor-item" wx:for="{{20}}" wx:key="index">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<view class="name">刘湖飞</view>
</view>
</view>
</view>
<view class="more" bind:tap="handleDoctorList">
查看医生介绍
<van-icon name="arrow" />
</view>
</view>
<view class="f-list">
<view class="content">你好王青,有什么问题我们可以帮助到您?</view>
<view wx:for="{{messageList}}" wx:key="msgId" wx:for-item="message" wx:for-index="mIndex" id="view{{mIndex}}">
<view class="date" wx:if="{{message.showTime}}">{{message.msgCreateTimeName}}</view>
<view class="f-header-list" wx:if="{{message.msgContentType==='1'}}">
<view class="content">{{message.msgOtherInfo.title}}</view>
<view
class="l-item"
wx:for="{{headerQuestionList}}"
wx:key="Id"
bind:tap="handleHeaderQuestion"
data-index="{{index}}"
wx:for="{{message.msgOtherInfo.hotQuestion}}"
wx:key="questionId"
bind:tap="handleQuestion"
data-id="{{item.questionId}}"
data-name="{{item.question}}"
>
{{item.Question}}
{{item.question}}
</view>
</view>
</view>
<view wx:for="{{messageList}}" wx:key="msgId" wx:for-item="message" wx:for-index="mIndex" id="view{{mIndex}}">
<view class="date" wx:if="{{message.showTime}}">{{message.msgCreateTimeName}}</view>
<view class="doctor" wx:if="{{message.msgFromType==='2'}}">
<view class="doctor" wx:elif="{{message.msgFromType==='2'}}">
<view class="avatar">
<image class="a-img" mode="aspectFill" src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"></image>
<image
class="a-img"
mode="aspectFill"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<view class="label">刘湖飞</view>
</view>
<view class="d-container">
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent }}</view>
<view class="week" wx:elif="{{message.msgContentType==='2'}}">
<view class="message" wx:if="{{message.msgContentType==='2'}}">{{message.msgContent }}</view>
<view class="week" wx:elif="{{message.msgContentType==='3'}}">
<view class="w-title">我的出诊时间如下:</view>
<view class="w-container">
<view class="item">周二 上午</view>
@ -72,7 +71,7 @@ @@ -72,7 +71,7 @@
<view
class="card1"
style="background: url('/images/bg14.png') no-repeat top center/100%"
wx:elif="{{message.msgContentType==='3'}}"
wx:elif="{{message.msgContentType==='4'}}"
>
<view class="content">
这是您的诊疗地图
@ -84,7 +83,7 @@ @@ -84,7 +83,7 @@
<view
class="card1"
style="background: url('/images/bg15.png') no-repeat top center/100%"
wx:elif="{{message.msgContentType==='4'}}"
wx:elif="{{message.msgContentType==='5'}}"
>
<view class="content">
您的专属随访计划
@ -96,7 +95,7 @@ @@ -96,7 +95,7 @@
<view
class="card1"
style="background: url('/images/bg16.png') no-repeat top center/100%"
wx:elif="{{message.msgContentType==='5'}}"
wx:elif="{{message.msgContentType==='6'}}"
>
<view class="content">
现在是您注射后16周
@ -107,9 +106,9 @@ @@ -107,9 +106,9 @@
</view>
</view>
</view>
<view class="patient" wx:if="{{message.msgFromType==='1'}}">
<view class="patient" wx:elif="{{message.msgFromType==='1'}}">
<view class="p-container">
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="message" wx:if="{{message.msgContentType==='2'}}">{{message.msgContent}}</view>
</view>
<view class="avatar">
<image class="a-img" mode="aspectFill" src="{{userInfo.Avatar}}"></image>
@ -120,34 +119,51 @@ @@ -120,34 +119,51 @@
</scroll-view>
</view>
<view class="page-footer {{expend && 'expend'}}" catch:tap="handleFooter">
<view class="title">
<image class="icon" src="{{imageUrl}}icon11.png?t={{Timestamp}}"></image>
我要提问
</view>
<view class="tabs" wx:if="{{expend}}">
<view
class="tab {{questionActive === index && 'active'}}"
wx:for="{{questionList}}"
wx:key="typeId"
catch:tap="handleQuestionTab"
data-index="{{index}}"
>
{{item.Name}}
<view class="options">
<view class="title">
<image class="icon" src="{{imageUrl}}icon11.png?t={{Timestamp}}"></image>
我要提问
</view>
<view class="title">
<image class="icon" src="/images/icon86.png"></image>
出诊时间
</view>
</view>
<view class="list" wx:if="{{expend}}">
<view
class="l-item"
wx:for="{{questionActiveList}}"
wx:key="questionId"
bind:tap="handleQuestion"
data-index="{{index}}"
>
<view class="order">{{index+1}}</view>
<view class="content">{{item.Question}}</view>
<van-icon color="#ADB3B4" name="arrow" />
<view class="container">
<view class="tabs" wx:if="{{expend}}">
<view
class="tab {{questionActive === index && 'active'}}"
wx:for="{{questionList}}"
wx:key="typeId"
catch:tap="handleQuestionTab"
data-index="{{index}}"
>
{{item.typeName}}
</view>
</view>
<view class="list" wx:if="{{expend}}">
<view
class="l-item"
wx:for="{{questionActiveList}}"
wx:key="questionId"
bind:tap="handleQuestion"
data-id="{{item.questionId}}"
data-name="{{item.question}}"
>
<view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view>
<van-icon color="#ADB3B4" name="arrow" />
</view>
<image class="none" src="{{imageUrl}}none.png" mode="widthFix" wx:if="{{!questionActiveList.length}}"></image>
</view>
<image class="none" src="{{imageUrl}}none.png" mode="widthFix" wx:if="{{!questionActiveList.length}}"></image>
</view>
</view>
</view>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

2
src/patient/pages/bbmRemark/index.json

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
{
"navigationBarTitleText": "BBM-H901输注备注",
"navigationBarTitleText": "输注感受日志",
"usingComponents": {}
}

21
src/patient/pages/bbmRemark/index.scss

@ -5,8 +5,6 @@ page { @@ -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 { @@ -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;
}
}
}

14
src/patient/pages/bbmRemark/index.ts

@ -1,8 +1,16 @@ @@ -1,8 +1,16 @@
const _app = getApp<IAppOption>();
const _app = getApp<IAppOption>()
Page({
data: {},
data: {
active: 1,
},
onLoad() {},
});
handleSelect(e) {
const { active } = e.currentTarget.dataset
this.setData({
active,
})
},
})
export {}

26
src/patient/pages/bbmRemark/index.wxml

@ -1,14 +1,30 @@ @@ -1,14 +1,30 @@
<view class="page">
<view class="card1">
<view class="label">是否有不良反应</view>
<view class="label">整体治疗过程感受</view>
<view class="select">
<view class="s-btn active">有</view>
<view class="s-btn">无</view>
<view class="s-item" bind:tap="handleSelect" data-active="{{1}}">
<image wx:if="{{active==1}}" class="icon" src="/images/icon44.png"></image>
<image wx:else class="icon" src="/images/icon49.png"></image>
</view>
<view class="s-item" bind:tap="handleSelect" data-active="{{2}}">
<image wx:if="{{active==2}}" class="icon" src="/images/icon42.png"></image>
<image wx:else class="icon" src="/images/icon50.png"></image>
</view>
<view class="s-item" bind:tap="handleSelect" data-active="{{3}}">
<image wx:if="{{active==3}}" class="icon" src="/images/icon43.png"></image>
<image wx:else class="icon" src="/images/icon83.png"></image>
</view>
</view>
</view>
<view class="card2">
<view class="title">整体治疗过程说明</view>
<textarea class="textarea" placeholder-class="place-textarea" disable-default-padding placeholder="请输入您的药品名称"></textarea>
<view class="title">整体治疗过程备注</view>
<textarea
class="textarea"
placeholder-class="place-textarea"
disable-default-padding
placeholder="有什么想要记录的呢?"
></textarea>
</view>
<view class="footer">
<view class="cancel">取消</view>

55
src/patient/pages/bbmReport/index.scss

@ -15,7 +15,7 @@ page { @@ -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 { @@ -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;

26
src/patient/pages/bbmReport/index.wxml

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
<view class="row">
<view class="label">输注时间</view>
<view class="r-container">
<picker class="picker">
<picker class="picker" mode="date">
<view class="picker-content">
<view class="content" data-place="请选择"></view>
<van-icon name="arrow-down" />
@ -17,13 +17,33 @@ @@ -17,13 +17,33 @@
<view class="label">使用剂量</view>
<view class="r-container">
<view class="columns">
<input class="input" placeholder-class="input-place" type="" placeholder="请输入" />
<view class="sub">x10¹¹vg</view>
<input class="input" type="number" placeholder-class="input-place" type="" placeholder="请输入" />
<view class="sub">KG</view>
</view>
</view>
</view>
</view>
</view>
<view class="body">
<view class="row">
<view class="label">用药体积</view>
<view class="r-container">
<view class="columns">
<input class="input" disabled type="number" placeholder-class="input-place" type="" placeholder="--" />
<view class="sub">ml</view>
</view>
</view>
</view>
<view class="row">
<view class="label">预计瓶数</view>
<view class="r-container">
<view class="columns">
<input class="input" disabled type="number" placeholder-class="input-place" type="" placeholder="--" />
<view class="sub">瓶</view>
</view>
</view>
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">提交</view>

1
src/patient/pages/bindDoctor/index.json

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
{
"navigationStyle": "custom",
"usingComponents": {
"popup": "/components/popup/index",
"navbar": "/components/navbar/index"
}
}

82
src/patient/pages/bindDoctor/index.ts

@ -1,8 +1,86 @@ @@ -1,8 +1,86 @@
const _app = getApp<IAppOption>()
import { parseScene } from '@/utils/util'
const app = getApp<IAppOption>()
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()
},

10
src/patient/pages/bindDoctor/index.wxml

@ -14,6 +14,14 @@ @@ -14,6 +14,14 @@
医生可以实时看到您的检查进展
</view>
<view class="tip">您可以扫描不同医生邀约码绑定多个医生</view>
<view class="submit">继续绑定</view>
<view class="submit" bind:tap="handleBindDoctor">继续绑定</view>
<view class="cancel" bind:tap="handleBack">取消</view>
</view>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save