Browse Source

医生端页面开发

dev
kola-web 3 weeks ago
parent
commit
829b4ff2f8
  1. 7
      .vscode/css-data.json
  2. 3
      .vscode/settings.json
  3. 39
      project.private.config.json
  4. 4
      src/app.json
  5. 345
      src/app.ts
  6. 19
      src/components/patient-tab-bar/index.ts
  7. 4
      src/gift/pages/myHealthRecord/index.ts
  8. BIN
      src/images/icon4.png
  9. BIN
      src/images/icon45.png
  10. BIN
      src/images/icon46.png
  11. BIN
      src/images/icon47.png
  12. BIN
      src/images/icon48.png
  13. BIN
      src/images/icon49.png
  14. BIN
      src/images/icon5.png
  15. BIN
      src/images/icon50.png
  16. BIN
      src/images/icon51.png
  17. BIN
      src/images/icon52.png
  18. BIN
      src/images/icon53.png
  19. BIN
      src/images/icon54.png
  20. BIN
      src/images/icon55.png
  21. BIN
      src/images/icon56.png
  22. BIN
      src/images/icon57.png
  23. BIN
      src/images/icon58.png
  24. BIN
      src/images/icon59.png
  25. BIN
      src/images/icon6.png
  26. BIN
      src/images/icon60.png
  27. BIN
      src/images/icon61.png
  28. BIN
      src/images/icon62.png
  29. BIN
      src/images/icon63.png
  30. BIN
      src/images/icon64.png
  31. BIN
      src/images/icon65.png
  32. BIN
      src/images/icon66.png
  33. BIN
      src/images/icon67.png
  34. BIN
      src/images/invite-card.png
  35. BIN
      src/images/start.png
  36. BIN
      src/images/title7.png
  37. BIN
      src/images/title8.png
  38. BIN
      src/images/title9.png
  39. 3
      src/pages/d_interactive/index.json
  40. 71
      src/pages/d_interactive/index.scss
  41. 16
      src/pages/d_interactive/index.wxml
  42. 3
      src/pages/d_interactiveDoctor/index.json
  43. 193
      src/pages/d_interactiveDoctor/index.scss
  44. 255
      src/pages/d_interactiveDoctor/index.ts
  45. 143
      src/pages/d_interactiveDoctor/index.wxml
  46. 7
      src/pages/d_invite/index.json
  47. 29
      src/pages/d_invite/index.scss
  48. 114
      src/pages/d_invite/index.ts
  49. 6
      src/pages/d_invite/index.wxml
  50. 9
      src/pages/d_patient/index.json
  51. 344
      src/pages/d_patient/index.scss
  52. 212
      src/pages/d_patient/index.ts
  53. 46
      src/pages/d_patient/index.wxml
  54. 12
      src/pages/d_patient/index.wxs
  55. 5
      src/pages/d_patientDetail/index.json
  56. 549
      src/pages/d_patientDetail/index.scss
  57. 342
      src/pages/d_patientDetail/index.ts
  58. 462
      src/pages/d_patientDetail/index.wxml
  59. 57
      src/pages/d_userInfo/index.scss
  60. 116
      src/pages/d_userInfo/index.ts
  61. 12
      src/pages/d_userInfo/index.wxml
  62. 51
      src/pages/home/index.scss
  63. 184
      src/pages/home/index.ts
  64. 63
      src/pages/home/index.wxml
  65. 96
      src/pages/login/index.ts
  66. 8
      src/pages/my/index.scss
  67. 66
      src/pages/my/index.ts
  68. 11
      src/pages/my/index.wxml
  69. 4
      src/pages/start/index.scss
  70. 1
      src/pages/start/index.wxml
  71. 2
      src/patient/pages/adlResult/index.ts
  72. 2
      src/patient/pages/adlShare/index.ts
  73. 1
      src/patient/pages/cancellation/index.scss
  74. 2
      src/patient/pages/cancellation/index.ts
  75. 2
      src/patient/pages/cancellation/index.wxml
  76. 5
      src/patient/pages/certReslove/index.scss
  77. 2
      src/patient/pages/certReslove/index.wxml
  78. 2
      src/patient/pages/doctor/index.ts
  79. 11
      src/patient/pages/doctorDetail/index.scss
  80. 2
      src/patient/pages/doctorDetail/index.ts
  81. 21
      src/patient/pages/doctorDetail/index.wxml
  82. 6
      src/patient/pages/enterInfo/index.scss
  83. 48
      src/patient/pages/enterInfo/index.ts
  84. 54
      src/patient/pages/enterInfo/index.wxml
  85. 2
      src/patient/pages/hospital/index.ts
  86. 1
      src/patient/pages/index/index.json
  87. 11
      src/patient/pages/index/index.scss
  88. 93
      src/patient/pages/index/index.ts
  89. 8
      src/patient/pages/index/index.wxml
  90. 2
      src/patient/pages/interactivePatient/index.scss
  91. 6
      src/patient/pages/interactivePatient/index.wxml
  92. 2
      src/patient/pages/live/index.ts
  93. 12
      src/patient/pages/live/index.wxml
  94. 7
      src/patient/pages/liveDetail/index.scss
  95. 2
      src/patient/pages/liveDetail/index.ts
  96. 8
      src/patient/pages/liveDetail/index.wxml
  97. 9
      src/patient/pages/liveResult/index.ts
  98. 4
      src/patient/pages/liveResult/index.wxml
  99. 105
      src/patient/pages/login/index.ts
  100. 18
      src/patient/pages/login/index.wxml
  101. Some files were not shown because too many files have changed in this diff Show More

7
.vscode/css-data.json vendored

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
{
"version": 1.1,
"properties": [{ "name": "foo", "description": "Foo property" }],
"atDirectives": [{ "name": "@foo", "description": "Foo at directive" }],
"pseudoClasses": [{ "name": ":foo", "description": "Foo pseudo class" }],
"pseudoElements": [{ "name": "::foo", "description": "Foo pseudo elements" }]
}

3
.vscode/settings.json vendored

@ -7,4 +7,7 @@ @@ -7,4 +7,7 @@
"css.intUnit": "rpx",
"css.floatUnit": "rpx"
},
"css.customData": [
".vscode/css-data.json"
],
}

39
project.private.config.json

@ -23,11 +23,46 @@ @@ -23,11 +23,46 @@
"miniprogram": {
"list": [
{
"name": "start",
"pathName": "pages/start/index",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "医生-患者列表",
"pathName": "pages/d_patient/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "医生-个人信息",
"pathName": "pages/d_userInfo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "患者-直播详情页",
"pathName": "patient/pages/liveDetail/index",
"query": "id=5",
"launchMode": "default",
"scene": null
},
{
"name": "医生-患者详情",
"pathName": "pages/d_patientDetail/index",
"query": "id=10",
"launchMode": "default",
"scene": null
},
{
"name": "患者-直播结果页",
"pathName": "patient/pages/liveResult/index",
"query": "id=5",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
},
{
"name": "患者-医生详情",

4
src/app.json

@ -12,7 +12,9 @@ @@ -12,7 +12,9 @@
"pages/d_interactive/index",
"pages/d_interactiveDoctor/index",
"pages/d_patientDetail/index",
"pages/d_userInfo/index"
"pages/d_userInfo/index",
"pages/d_invite/index",
"pages/d_patient/index"
],
"subPackages": [
{

345
src/app.ts

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
import component from '@/utils/component';
import relativeTime from '@/utils/dayjs/relativeTime.js';
import page from '@/utils/page';
import { request } from '@/utils/request';
import { parseScene } from './utils/util';
const dayjs = require('dayjs');
const licia = require('miniprogram-licia');
import component from '@/utils/component'
import relativeTime from '@/utils/dayjs/relativeTime.js'
import page from '@/utils/page'
import { request } from '@/utils/request'
import { parseScene } from './utils/util'
const dayjs = require('dayjs')
const licia = require('miniprogram-licia')
require('/utils/dayjs/day-zh-cn.js');
require('/utils/dayjs/day-zh-cn.js')
dayjs.locale('zh-cn'); // 全局使用
dayjs.extend(relativeTime);
dayjs.locale('zh-cn') // 全局使用
dayjs.extend(relativeTime)
App<IAppOption>({
globalData: {
@ -30,6 +30,7 @@ App<IAppOption>({ @@ -30,6 +30,7 @@ App<IAppOption>({
isLogin: 0,
isNewReg: 0,
loginType: 0,
anyWhere: false,
scene: {},
@ -98,21 +99,21 @@ App<IAppOption>({ @@ -98,21 +99,21 @@ App<IAppOption>({
},
},
onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor;
Component = component as WechatMiniprogram.Component.Constructor;
Page = page as WechatMiniprogram.Page.Constructor
Component = component as WechatMiniprogram.Component.Constructor
wx.ajax = licia.curry(request)({ gUrl: this.globalData.url });
wx.ajax = licia.curry(request)({ gUrl: this.globalData.url })
this.startLogin();
this.startLogin()
wx.setInnerAudioOption({
obeyMuteSwitch: false,
mixWithOther: false,
});
})
},
onShow(options) {
if (options.query.scene) {
this.globalData.scene = parseScene(options.query.scene);
this.globalData.scene = parseScene(options.query.scene)
}
},
startLogin(callback) {
@ -125,16 +126,16 @@ App<IAppOption>({ @@ -125,16 +126,16 @@ App<IAppOption>({
code: res.code,
},
}).then((res: any) => {
this.globalData.loginState = res.loginState;
this.globalData.isLogin = res.isLogin;
this.globalData.isNewReg = res.isNewReg;
this.globalData.loginType = res.loginType;
this.globalData.loginState = res.loginState
this.globalData.isLogin = res.isLogin
this.globalData.isNewReg = res.isNewReg
this.globalData.loginType = res.loginType
if (callback) {
callback();
callback()
}
});
})
},
});
})
},
updateLoginInfo(callback?: (any) => void) {
wx.ajax({
@ -142,87 +143,95 @@ App<IAppOption>({ @@ -142,87 +143,95 @@ App<IAppOption>({
url: '?r=xd/user/get-account-info',
data: {},
}).then((res) => {
this.globalData.isLogin = res.isLogin;
this.globalData.loginType = res.loginType;
this.globalData.isNewReg = res.isNewReg;
this.globalData.isLogin = res.isLogin
this.globalData.loginType = res.loginType
this.globalData.isNewReg = res.isNewReg
if (callback) {
callback(res);
callback(res)
}
});
})
},
waitLogin({ type = [0] } = { type: 'any' }) {
return new Promise((resolve) => {
const checkLogin = () => {
if (this.globalData.loginState) {
if (this.checkLoginType(type as pageType[] | 'any')) {
resolve();
resolve()
}
return;
return
}
setTimeout(() => {
checkLogin();
}, 500);
};
checkLogin();
});
},
checkLoginType(type) {
const { loginType, isLogin, isNewReg } = this.globalData;
checkLogin()
}, 500)
}
checkLogin()
})
},
checkLoginType(type, backPath = '') {
const { loginType, isLogin, isNewReg } = this.globalData
if(backPath){
app.globalData.backPath = backPath
}
if (type === 'any') {
return true;
return true
}
if (isLogin !== 1) {
if (type.includes(0) && [0, 1].includes(loginType)) {
return true;
return true
}
if (loginType === 1) {
if ([0, 1].includes(loginType)) {
wx.reLaunch({
url: '/patient/pages/login/index',
});
})
return false
}
if (loginType === 2) {
wx.reLaunch({
url: '/pages/login/index',
});
})
return false
}
return false;
return false
}
if (isNewReg !== 1) {
const typePageUrl = {
1: '/patient/pages/entryInfo/index',
1: '/patient/pages/enterInfo/index',
2: '/pages/login/index',
}[loginType as 1 | 2];
}[loginType as 1 | 2]
wx.reLaunch({
url: typePageUrl,
});
return false;
fail(err) {
console.log(err)
},
})
return false
}
if (!type.includes(loginType)) {
const typePageUrl = {
1: '/patient/pages/index/index',
2: '/pages/home/index',
}[loginType as 1 | 2];
}[loginType as 1 | 2]
wx.reLaunch({
url: typePageUrl,
});
return false;
})
return false
}
return true;
return true
},
getUserInfo(type: 0 | 1 | 2): Promise<never> {
const url = {
2: '?r=xd/doctor/index/get-doctor',
}[type];
}[type]
return wx.ajax({
method: 'GET',
url,
data: {},
}) as Promise<never>;
}) as Promise<never>
},
mpBehavior(data) {
wx.ajax({
@ -231,23 +240,23 @@ App<IAppOption>({ @@ -231,23 +240,23 @@ App<IAppOption>({
data,
loading: false,
showMsg: false,
});
})
},
getMenuInfo(self) {
const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
const menuButtonInfo = wx.getMenuButtonBoundingClientRect()
self.setData({
menuButtonInfo,
});
})
},
// zd相关函数
zdMpBehavior(data: { PageName: string; doctor?: boolean }) {
const { loginType } = this.globalData;
if (loginType === 0) return;
let url = '?r=zd/mp-behavior/add';
const { loginType } = this.globalData
if (loginType === 0) return
let url = '?r=zd/mp-behavior/add'
if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add';
url = '?r=zd/doctor/mp-behavior/add'
}
delete data.doctor;
delete data.doctor
wx.ajax({
method: 'POST',
url,
@ -255,90 +264,90 @@ App<IAppOption>({ @@ -255,90 +264,90 @@ App<IAppOption>({
loading: false,
showMsg: false,
}).then((res) => {
console.log('res: ', res);
});
console.log('res: ', res)
})
},
zdGetTheme() {
return new Promise((resolve) => {
resolve('PATIENT');
});
resolve('PATIENT')
})
},
zdWaitLogin({ isReg = true, loginPage = false, pub = false } = { isReg: true, loginPage: false, pub: false }) {
let time: number;
let time: number
const regFun = (resolve) => {
if (this.zdVerifySys(pub)) {
if (this.globalData.loginType === 1) {
this.zdRegistrationVerification(() => resolve(), loginPage);
this.zdRegistrationVerification(() => resolve(), loginPage)
} else {
resolve();
resolve()
}
}
}
};
const unRegFun = (resolve) => {
if (!this.zdVerifySys(pub)) return;
resolve();
};
if (!this.zdVerifySys(pub)) return
resolve()
}
return new Promise((resolve: (value?) => void) => {
if (isReg) {
if (Object.keys(this.globalData.zdUserInfo).length) {
regFun(resolve);
return;
regFun(resolve)
return
}
time = setInterval(() => {
if (Object.keys(this.globalData.zdUserInfo).length) {
clearInterval(time);
regFun(resolve);
clearInterval(time)
regFun(resolve)
}
}, 500);
return;
}, 500)
return
}
this.globalData.anyWhere = true;
this.globalData.anyWhere = true
if (this.globalData.loginState) {
unRegFun(resolve);
return;
unRegFun(resolve)
return
}
time = setInterval(() => {
if (this.globalData.loginState) {
clearInterval(time);
unRegFun(resolve);
clearInterval(time)
unRegFun(resolve)
}
}, 500);
});
}, 500)
})
},
zdRegistrationVerification(callback: () => void, loginPage = false) {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo;
const { anyWhere, first } = this.globalData;
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo
const { anyWhere, first } = this.globalData
if (loginPage || (anyWhere && first)) {
callback();
return;
callback()
return
}
if (UserType == 4) {
this.globalData.first = false;
callback();
return;
this.globalData.first = false
callback()
return
}
if (UserType == 1) {
this.globalData.registChannel = 0;
this.globalData.first = false;
this.globalData.registChannel = 0
this.globalData.first = false
wx.reLaunch({
url: '/patient/pages/login/index',
});
return;
})
return
}
let urlKey = '';
let urlKey = ''
if (!PatientId) {
urlKey = 'enterInfo';
urlKey = 'enterInfo'
} else if (AuditStatus == 0) {
urlKey = 'noCert';
urlKey = 'noCert'
} else if (AuditStatus == 1) {
urlKey = isFollow ? 'nopending' : 'pending';
urlKey = isFollow ? 'nopending' : 'pending'
} else if (AuditStatus == 2) {
urlKey = 'reject';
urlKey = 'reject'
}
let navUrl = {
enterInfo: '/patient/pages/enterInfo/index',
@ -346,29 +355,29 @@ App<IAppOption>({ @@ -346,29 +355,29 @@ App<IAppOption>({
reject: '/patient/pages/enterInfo/index',
pending: '/patient/pages/enterInfo/index',
nopending: '/patient/pages/enterInfo/index',
}[urlKey];
}[urlKey]
if (navUrl && first) {
this.globalData.registChannel = 0;
this.globalData.first = false;
this.globalData.registChannel = 0
this.globalData.first = false
wx.reLaunch({
url: navUrl,
});
this.globalData.first = false;
return;
})
this.globalData.first = false
return
}
this.globalData.first = false;
callback();
this.globalData.first = false
callback()
},
zdVerifySys(pub = false) {
// 1:患者 2:医生
const { loginType, isLogin, anyWhere } = this.globalData;
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const url = currentPage.route;
const options = currentPage.options;
const ignorePath = ['pages/start/index'];
const { loginType, isLogin, anyWhere } = this.globalData
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const url = currentPage.route
const options = currentPage.options
const ignorePath = ['pages/start/index']
// 未登录用户
if (!isLogin) {
@ -376,80 +385,80 @@ App<IAppOption>({ @@ -376,80 +385,80 @@ App<IAppOption>({
if (url.includes('doctor/pages')) {
wx.reLaunch({
url: '/doctor/pages/d_login/index',
});
return false;
})
return false
}
// 患者端随便看看
if (anyWhere) {
return true;
return true
}
wx.reLaunch({
url: '/patient/pages/login/index',
});
return false;
})
return false
}
if (ignorePath.includes(url)) return true;
if (ignorePath.includes(url)) return true
if (loginType === 1) {
if (url.includes('doctor/pages')) {
wx.reLaunch({
url: '/pages/index/index',
});
return false;
})
return false
} else {
return true;
return true
}
}
if (loginType === 2 && !pub) {
if (url.includes('doctor/pages')) {
return true;
return true
} else {
const params = Object.entries(options)
.map(([key, value]) => `${key}=${value}`)
.join('&');
.join('&')
wx.reLaunch({
url: '/doctor/pages/d_trans/index?path=' + encodeURIComponent(`/${url}?${params}`),
});
return false;
})
return false
}
}
return true;
return true
},
zdPermissionVerification(grade = 1, registChannel = 0, backPage = null, regBusinessId = '') {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo;
const that = this;
this.globalData.registChannel = registChannel;
this.globalData.regBusinessId = regBusinessId;
let isReject = false;
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo
const that = this
this.globalData.registChannel = registChannel
this.globalData.regBusinessId = regBusinessId
let isReject = false
return new Promise((resolve, reject) => {
if (grade == 2 && Number(UserType) < 2) {
wx.reLaunch({
url: '/patient/pages/login/index',
});
isReject = true;
})
isReject = true
}
if (grade == 3 && Number(UserType) < 3) {
if (UserType == 1) {
wx.reLaunch({
url: '/patient/pages/login/index',
});
isReject = true;
})
isReject = true
}
if (UserType == 2) {
let urlKey = '';
let urlKey = ''
if (!PatientId) {
urlKey = 'enterInfo';
urlKey = 'enterInfo'
} else if (AuditStatus == 0) {
urlKey = 'noCert';
urlKey = 'noCert'
} else if (AuditStatus == 1) {
if (backPage && (backPage as string).includes('liveResult')) {
urlKey = 'liveResult';
urlKey = 'liveResult'
} else {
urlKey = isFollow ? 'nopending' : 'pending';
urlKey = isFollow ? 'nopending' : 'pending'
}
} else if (AuditStatus == 2) {
urlKey = 'reject';
urlKey = 'reject'
}
let navUrl = {
enterInfo: '/patient/pages/enterInfo/index',
@ -458,55 +467,55 @@ App<IAppOption>({ @@ -458,55 +467,55 @@ App<IAppOption>({
pending: '/patient/pages/enterInfo/index',
nopending: '/patient/pages/enterInfo/index',
liveResult: backPage,
}[urlKey];
}[urlKey]
if (urlKey == 'liveResult') {
wx.navigateTo({
url: navUrl as string,
});
})
} else {
wx.reLaunch({
url: navUrl as string,
});
})
}
isReject = true;
isReject = true
}
}
if (grade == 4 && Number(UserType) < 4) {
wx.reLaunch({
url: '/patient/pages/vipLogin/index',
});
isReject = true;
})
isReject = true
}
if (isReject) {
that.globalData.backPage = backPage;
reject(null);
return;
that.globalData.backPage = backPage
reject(null)
return
}
resolve(null);
});
resolve(null)
})
},
getZdUserInfo(self, update = false, callback = (_zdUserInfo) => {}) {
if (this.globalData.zdUserInfo?.UserId && !update) {
self?.setData({
zdUserInfo: this.globalData.zdUserInfo,
});
callback(this.globalData.zdUserInfo);
return;
})
callback(this.globalData.zdUserInfo)
return
}
wx.ajax({
method: 'GET',
url: '?r=zd/account/info',
showMsg: false,
}).then((res) => {
res.UserType = res.UserType || 1;
res.UserType = res.UserType || 1
if (res.UserType > 2) {
this.globalData.anyWhere = false;
this.globalData.anyWhere = false
}
this.globalData.zdUserInfo = res;
this.globalData.zdUserInfo = res
self?.setData({
zdUserInfo: res,
});
const { doctorId, inviteChan } = this.globalData.scene;
})
const { doctorId, inviteChan } = this.globalData.scene
if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) {
wx.ajax({
method: 'POST',
@ -515,9 +524,9 @@ App<IAppOption>({ @@ -515,9 +524,9 @@ App<IAppOption>({
inviteDoctorId: doctorId,
inviteChannel: inviteChan,
},
});
})
}
callback(res);
});
callback(res)
})
},
});
})

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

@ -71,29 +71,12 @@ Component({ @@ -71,29 +71,12 @@ Component({
onChange() {},
handleNav(e) {
const { index } = e.currentTarget.dataset
const { list, config } = this.data
const { list } = this.data
const pagePath = list[index].pagePath
app.globalData.BeginnerCardId = ''
if (pagePath == '/patient/pages/my/index') {
app.zdPermissionVerification(2, 0, `/patient/pages/index/index`).then(() => {
wx.reLaunch({
url: pagePath,
})
})
} else if (pagePath == '/patient/pages/repository/index' && config.picTextEbookStatus == 1) {
app.zdPermissionVerification(2, 0, `/pages/repository/index`).then(() => {
const webviewUrl = encodeURIComponent(
`${app.globalData.url}/zdcare/#/cover?loginState=${app.globalData.loginState}`,
)
wx.navigateTo({
url: `/patient/pages/webview/index?url=${webviewUrl}`,
})
})
} else {
wx.reLaunch({
url: pagePath,
})
}
},
},
})

4
src/gift/pages/myHealthRecord/index.ts

@ -991,7 +991,7 @@ Page({ @@ -991,7 +991,7 @@ Page({
if (index != 0) return;
wx.showModal({
title: '确认删除?',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success: (res) => {
if (res.confirm) {
wx.ajax({
@ -1048,7 +1048,7 @@ Page({ @@ -1048,7 +1048,7 @@ Page({
}
wx.showModal({
title: '确认删除?',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success: (res) => {
if (res.confirm) {
wx.ajax({

BIN
src/images/icon4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon45.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/images/icon46.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon47.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon49.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon50.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon51.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/icon52.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/images/icon53.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
src/images/icon54.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/images/icon55.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon56.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/icon57.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon58.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/icon59.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/images/icon6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/images/icon60.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/images/icon61.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon62.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/icon63.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/icon64.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/icon65.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/images/icon66.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/icon67.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/images/invite-card.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
src/images/start.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/images/title7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
src/images/title8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/images/title9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

3
src/pages/d_interactive/index.json

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
{
"navigationStyle": "custom",
"navigationBarTitleText": "互动",
"navigationStyle": "default",
"usingComponents": {
"zd-navBar": "/components/zd-navBar/navBar",
"van-icon": "@vant/weapp/icon/index",

71
src/pages/d_interactive/index.scss

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
page {
background-color: rgba(242, 244, 245, 1);
background-color: rgba(246, 248, 249, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
}
.page {
@ -7,20 +7,19 @@ page { @@ -7,20 +7,19 @@ page {
.page-header {
position: sticky;
top: 0;
padding: 30rpx;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
padding: 32rpx 40rpx;
z-index: 10;
background-color: rgba(246, 248, 249, 1);
.wrap {
display: flex;
align-items: center;
.search {
flex: 1;
padding: 18rpx 32rpx;
padding: 12rpx 32rpx;
display: flex;
align-items: center;
gap: 16rpx;
background: linear-gradient(to top, #ffffff 0%, #ebf3f4 100%);
box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(40, 48, 49, 0.04);
background: #ffffff;
border-radius: 140rpx 140rpx 140rpx 140rpx;
border: 2rpx solid #ffffff;
.icon {
@ -37,60 +36,16 @@ page { @@ -37,60 +36,16 @@ page {
}
.clear {
margin-left: 32rpx;
width: 44rpx;
height: 44rpx;
}
}
.navbar {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.nav {
position: relative;
flex: 1;
text-align: center;
font-size: 32rpx;
color: rgba(103, 113, 114, 1);
transition: all 0.3s;
.dot {
padding: 0 4rpx;
position: absolute;
left: 50%;
transform: translateX(35rpx);
top: 0;
min-width: 18rpx;
height: 26rpx;
font-size: 18rpx;
line-height: 26rpx;
color: rgba(255, 255, 255, 1);
border-radius: 50%;
background: rgba(215, 108, 108, 1);
}
&.active {
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
font-weight: bold;
&::after {
position: absolute;
bottom: -30rpx;
left: 50%;
transform: translateX(-50%);
content: '';
width: 52rpx;
height: 8rpx;
border-radius: 24rpx 24rpx 0 0;
background: #62bed0;
}
}
width: 56rpx;
height: 56rpx;
}
}
}
.list {
margin: 30rpx;
margin: 30rpx 40rpx;
.list-item {
margin-bottom: 24rpx;
padding: 30rpx;
padding: 32rpx;
border-radius: 24rpx;
background-color: #fff;
display: flex;
@ -123,8 +78,8 @@ page { @@ -123,8 +78,8 @@ page {
align-items: center;
justify-content: space-between;
.name {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-size: 36rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
.date {
@ -147,10 +102,10 @@ page { @@ -147,10 +102,10 @@ page {
}
}
.content {
margin-top: 20rpx;
margin-top: 16rpx;
max-width: 18em;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
color: rgba(105, 104, 110, 1);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

16
src/pages/d_interactive/index.wxml

@ -1,28 +1,20 @@ @@ -1,28 +1,20 @@
<view class="page">
<view
class="page-header"
style="background:#fff url({{imageUrl}}za-images/doctor/d_patient-bg.png?t={{Timestamp}}) no-repeat top center/100% 456rpx"
>
<zd-navBar title="互动" back home="{{false}}" bind:back="handleBack"></zd-navBar>
<view class="page-header">
<view class="wrap">
<view class="search">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-search.png?t={{Timestamp}}"></image>
<image class="icon" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<input
type="text"
class="input"
placeholder-class="input-place"
placeholder="搜索姓名、手机号"
placeholder="可根据姓名、手机号搜索患者"
model:value="{{search}}"
confirm-type="search"
bindconfirm="handleSearch"
bind:tap="handleTapSearch"
/>
</view>
<image
class="clear"
src="{{imageUrl}}za-images/doctor/icon-clear.png?t={{Timestamp}}"
bind:tap="hancleClaer"
></image>
<!-- <image class="clear" src="{{imageUrl}}icon47.png?t={{Timestamp}}" bind:tap="hancleClaer"></image> -->
</view>
<!-- <view class="navbar"> -->
<!-- <view class="nav {{!active && 'active'}}" bind:tap="handleNav" data-active=""> -->

3
src/pages/d_interactiveDoctor/index.json

@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
{
"navigationBarTitleText": "互动",
"navigationStyle": "default",
"navigationStyle": "custom",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"navbar": "/components/navbar/index",
"van-popup": "@vant/weapp/popup/index"
}
}

193
src/pages/d_interactiveDoctor/index.scss

@ -3,20 +3,23 @@ page { @@ -3,20 +3,23 @@ page {
}
.page {
height: 100vh;
box-sizing: border-box;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
.page-header {
margin: 0 30rpx;
padding-bottom: 30rpx;
border-radius: 0 0 24rpx 24rpx;
background-color: #fff;
background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.46) 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
.user {
flex-shrink: 0;
padding: 36rpx 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
.avatar {
width: 104rpx;
height: 104rpx;
@ -24,147 +27,32 @@ page { @@ -24,147 +27,32 @@ page {
}
.wrap {
flex: 1;
padding: 0 20rpx;
padding: 0 16rpx;
.name {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 40rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
.tip {
display: block;
padding: 2rpx 16rpx;
.edc {
margin-left: 10rpx;
display: inline-block;
padding: 0 8rpx;
font-size: 24rpx;
color: #fff;
border-radius: 0 30rpx 30rpx 30rpx;
background-color: #67baca;
}
.detail {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
color: rgba(255, 255, 255, 1);
font-weight: normal;
background-color: rgba(185, 130, 255, 1);
}
}
.tags {
.date {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
gap: 12rpx;
.tag {
padding: 4rpx 16rpx;
font-size: 22rpx;
color: rgba(103, 113, 114, 1);
border-radius: 8rpx;
background-color: rgba(242, 244, 245, 1);
}
}
}
}
.adl {
margin: 32rpx 30rpx 0;
background: #ffffff;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.a-header {
display: flex;
align-items: flex-start;
flex-direction: column;
.content {
border-radius: 24rpx 0 24rpx 0;
padding: 14rpx 28rpx;
font-size: 28rpx;
line-height: 1;
color: rgba(98, 190, 208, 1);
background-color: rgba(242, 248, 249, 1);
}
.box {
width: 40rpx;
height: 40rpx;
background-color: rgba(242, 248, 249, 1);
}
}
.a-content {
position: relative;
z-index: 1;
margin-top: -40rpx;
padding: 32rpx 30rpx;
background-color: #fff;
border-radius: 24rpx;
.row {
display: flex;
align-items: center;
gap: 20rpx;
&:first-of-type {
margin-bottom: 24rpx;
}
.label {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
color: rgba(105, 104, 110, 1);
}
.num {
min-width: 3em;
font-size: 28rpx;
color: rgba(40, 48, 49, 1);
}
.tag {
display: flex;
align-items: center;
background-color: rgba(232, 245, 248, 1);
border-radius: 12rpx;
.t-label {
padding: 8rpx 12rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1);
border-radius: 12rpx;
display: flex;
align-items: center;
gap: 8rpx;
.detail {
flex-shrink: 0;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.t-content {
padding: 0 16rpx 0 8rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
display: flex;
align-items: center;
gap: 4rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 28rpx;
}
}
&.tag-warn {
background-color: rgba(227, 220, 64, 0.1);
.t-label {
background-color: rgba(225, 217, 45, 1);
}
.t-content {
color: rgba(225, 217, 45, 1);
}
}
&.tag-error {
background-color: rgba(248, 234, 234, 1);
.t-label {
background-color: rgba(215, 108, 108, 1);
}
.t-content {
color: rgba(215, 108, 108, 1);
}
}
}
}
color: rgba(185, 130, 255, 1);
font-weight: normal;
}
}
}
@ -200,7 +88,7 @@ page { @@ -200,7 +88,7 @@ page {
.guide {
margin-bottom: 32rpx;
padding: 32rpx 30rpx;
border-radius: 0 32rpx 32rpx;
border-radius: 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%);
border: 2rpx solid #ffffff;
.title {
@ -252,7 +140,7 @@ page { @@ -252,7 +140,7 @@ page {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background-color: #fff;
border-radius: 0 32rpx 32rpx;
border-radius: 32rpx;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
white-space: pre-line;
@ -321,8 +209,8 @@ page { @@ -321,8 +209,8 @@ page {
.guide {
margin-bottom: 32rpx;
padding: 32rpx 30rpx;
border-radius: 32rpx 0 32rpx 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%);
border-radius: 32rpx 32rpx;
background: linear-gradient(180deg, #f6efff 0%, #ffffff 100%);
border: 2rpx solid #ffffff;
.title {
font-size: 32rpx;
@ -337,10 +225,13 @@ page { @@ -337,10 +225,13 @@ page {
.list {
.l-item {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 30rpx;
&:last-of-type {
margin-bottom: 0;
}
.order {
margin-top: 6rpx;
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
@ -350,11 +241,11 @@ page { @@ -350,11 +241,11 @@ page {
justify-content: center;
color: rgba(255, 255, 255, 1);
border-radius: 6rpx;
background: #67baca;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
}
.content {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
color: rgba(33, 29, 46, 1);
}
}
}
@ -372,8 +263,8 @@ page { @@ -372,8 +263,8 @@ page {
.message {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background: #67baca;
border-radius: 32rpx 0 32rpx 32rpx;
background: rgba(185, 130, 255, 1);
border-radius: 32rpx;
font-size: 32rpx;
color: #fff;
white-space: pre-line;
@ -382,10 +273,10 @@ page { @@ -382,10 +273,10 @@ page {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background-color: #fff;
border-radius: 32rpx 0 32rpx 32rpx;
border-radius: 32rpx;
.w-title {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
color: rgba(33, 29, 46, 1);
text-align: right;
}
.w-container {
@ -408,7 +299,7 @@ page { @@ -408,7 +299,7 @@ page {
justify-content: center;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1);
background-color: rgba(185, 130, 255, 1);
}
.content {
width: 156rpx;
@ -417,8 +308,8 @@ page { @@ -417,8 +308,8 @@ page {
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
background-color: rgba(242, 244, 245, 1);
color: rgba(33, 29, 46, 1);
background-color: rgba(234, 238, 240, 1);
}
&:first-of-type {
.label {
@ -439,13 +330,21 @@ page { @@ -439,13 +330,21 @@ page {
&:not(:last-of-type) {
border-bottom: 2rpx solid #fff;
}
&:nth-of-type(2n) {
.label {
background-color: rgba(214, 181, 255, 1);
}
.content {
background-color: rgba(246, 248, 249, 1);
}
}
}
}
}
.adl {
margin-bottom: 32rpx;
padding: 32rpx 156rpx 34rpx 30rpx;
border-radius: 0 32rpx 32rpx;
border-radius: 32rpx;
background: linear-gradient(141deg, #edfcff 0%, #d4f3f9 100%);
border: 2rpx solid #fff;
.title {
@ -478,7 +377,7 @@ page { @@ -478,7 +377,7 @@ page {
.audio {
margin-bottom: 32rpx;
padding: 22rpx 24rpx;
border-radius: 32rpx 0 32rpx 32rpx;
border-radius: 32rpx;
background: #67baca;
min-width: 218rpx;
font-size: 32rpx;
@ -497,7 +396,7 @@ page { @@ -497,7 +396,7 @@ page {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background-color: #fff;
border-radius: 32rpx 0 32rpx 32rpx;
border-radius: 32rpx;
.content {
font-size: 28rpx;
color: #283031;

255
src/pages/d_interactiveDoctor/index.ts

@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
import dayjs from 'dayjs';
import dayjs from 'dayjs'
const app = getApp<IAppOption>();
const app = getApp<IAppOption>()
interface IMessageItem {
msgId: string;
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any;
msgVisitTime: string;
msgVisitTimeType?: string;
msgFromType: '1' | '2'; // 1: 患者 2: 医生
isPlay?: boolean;
msgCreateTime: string; // 消息创建时间
msgCreateTimeName?: string; // 消息创建时间
showTime?: boolean;
msgId: string
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any
msgVisitTime: string
msgVisitTimeType?: string
msgFromType: '1' | '2' // 1: 患者 2: 医生
isPlay?: boolean
msgCreateTime: string // 消息创建时间
msgCreateTimeName?: string // 消息创建时间
showTime?: boolean
}
interface Item {
wordId: string;
word: string;
wordId: string
word: string
}
Page({
@ -47,23 +47,23 @@ Page({ @@ -47,23 +47,23 @@ Page({
onLoad(options) {
this.innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: true,
});
})
this.setData({
patientId: options.patientId,
});
})
},
onShow() {
app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' });
this.getDoctorDetail();
this.getPatientDetail();
this.getMessageList();
this.getWordList();
});
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' })
this.getDoctorDetail()
this.getPatientDetail()
this.getMessageList()
this.getWordList()
})
},
onUnload() {
if (this.innerAudioContext) {
this.innerAudioContext.stop();
this.innerAudioContext.stop()
}
},
getDoctorDetail() {
@ -74,8 +74,8 @@ Page({ @@ -74,8 +74,8 @@ Page({
}).then((res) => {
this.setData({
doctor: res.doctor,
});
});
})
})
},
getPatientDetail() {
wx.ajax({
@ -86,19 +86,19 @@ Page({ @@ -86,19 +86,19 @@ Page({
},
}).then((res) => {
if (res.LastAdlTime) {
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '');
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '')
}
this.setData({
patientDetail: res,
});
});
})
})
},
getMessageList() {
if (this.data.isLoad || this.data.isFinish) return;
if (this.data.isLoad || this.data.isFinish) return
this.setData({
isLoad: true,
});
const nextMsgId = this.data.nextMsgId;
})
const nextMsgId = this.data.nextMsgId
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/message-interact/doctor-get-message-list',
@ -109,21 +109,21 @@ Page({ @@ -109,21 +109,21 @@ Page({
}).then((res) => {
res.messageList.map((item) => {
if (item.msgContentType === '4') {
item.msgContent = JSON.parse(item.msgContent);
item.msgContent = JSON.parse(item.msgContent)
}
if (item.msgContentType === '2') {
item.msgVisitTime = item.msgVisitTimeType == 2 ? item.msgVisitTime : JSON.parse(item.msgVisitTime);
item.msgVisitTime = item.msgVisitTimeType == 2 ? item.msgVisitTime : JSON.parse(item.msgVisitTime)
}
if (item.msgContentType === '5') {
item.welcomeMsg = JSON.parse(item.welcomeMsg);
item.welcomeMsg = JSON.parse(item.welcomeMsg)
}
if (item.msgContentType === '9') {
item.ReVisitInfo = JSON.parse(item.ReVisitInfo);
item.ReVisitInfo.visitDateName = dayjs(item.ReVisitInfo.visitDate).format('YYYY年M月DD日');
item.ReVisitInfo = JSON.parse(item.ReVisitInfo)
item.ReVisitInfo.visitDateName = dayjs(item.ReVisitInfo.visitDate).format('YYYY年M月DD日')
}
return item;
});
return item
})
if (!this.data.nextMsgId && !res.messageList.length) {
res.messageList = [
{
@ -133,7 +133,7 @@ Page({ @@ -133,7 +133,7 @@ Page({
msgVisitTime: '',
msgFromType: '2',
},
];
]
}
this.setData({
messageList: [...res.messageList.reverse(), ...this.data.messageList],
@ -144,16 +144,16 @@ Page({ @@ -144,16 +144,16 @@ Page({
adlMsgId: res.adlMsgId,
isLoad: false,
isFinish: nextMsgId === res.nextMsgId,
});
this.filterCreateTime();
})
this.filterCreateTime()
if (!nextMsgId) {
this.handleView();
this.handleView()
}
});
})
},
scrolltoupper(e) {
if (e.detail.direction === 'top') {
this.getMessageList();
this.getMessageList()
}
},
getWordList() {
@ -164,15 +164,15 @@ Page({ @@ -164,15 +164,15 @@ Page({
}).then((res) => {
this.setData({
wordList: res,
});
});
})
})
},
handleSendDate() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' })
const {
messageList,
doctor: { Clinic },
} = this.data;
} = this.data
if (!Clinic || (Array.isArray(Clinic) && !Clinic.length)) {
wx.showModal({
title: '完善出诊时间?',
@ -183,11 +183,11 @@ Page({ @@ -183,11 +183,11 @@ Page({
if (res.confirm) {
wx.navigateTo({
url: '/pages/d_userInfo/index',
});
})
}
},
});
return;
})
return
}
wx.showModal({
title: '提示',
@ -208,40 +208,40 @@ Page({ @@ -208,40 +208,40 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.filterCreateTime();
})
this.filterCreateTime()
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/send-visit-time',
data: {
patientId: this.data.patientId,
},
});
this.handleView();
})
this.handleView()
}
},
});
})
},
handleSendShow() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' })
this.setData({
messageListShow: true,
});
})
},
handlePopupMessageClose() {
this.setData({
messageListShow: false,
});
})
},
handleWord(e) {
const { index } = e.currentTarget.dataset;
const { index } = e.currentTarget.dataset
this.setData({
wordIndex: index,
});
})
},
handleSendWord() {
const { messageList, wordList, wordIndex } = this.data;
const { wordId, word } = wordList[wordIndex];
const { messageList, wordList, wordIndex } = this.data
const { wordId, word } = wordList[wordIndex]
this.setData({
messageList: [
...messageList,
@ -254,10 +254,10 @@ Page({ @@ -254,10 +254,10 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.filterCreateTime();
this.handlePopupMessageClose();
this.handleView();
})
this.filterCreateTime()
this.handlePopupMessageClose()
this.handleView()
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/send-word-message',
@ -265,30 +265,30 @@ Page({ @@ -265,30 +265,30 @@ Page({
patientId: this.data.patientId,
wordId,
},
});
})
},
handleSendUserConform(e) {
const { id } = e.currentTarget.dataset;
const { id } = e.currentTarget.dataset
const title = {
6: '发送后患者将收到补充姓名通知',
7: '发送后患者将收到完善信息通知',
}[id];
}[id]
wx.showModal({
title,
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
this.handleSendUser(id);
this.handleSendUser(id)
}
},
});
})
},
handleSendUser(id) {
const { messageList } = this.data;
const { messageList } = this.data
const content = {
6: '请完善您的真实姓名,以便我清楚了解您的病情',
7: '请完善您的个人信息,以便我清楚了解您的病情',
}[id];
}[id]
this.setData({
messageList: [
...messageList,
@ -301,110 +301,110 @@ Page({ @@ -301,110 +301,110 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.filterCreateTime();
this.handlePopupMessageClose();
this.handleView();
})
this.filterCreateTime()
this.handlePopupMessageClose()
this.handleView()
const url = {
6: '?r=zd/doctor/message-interact/send-remind-name',
7: '?r=zd/doctor/message-interact/send-remind-init',
}[id];
}[id]
wx.ajax({
method: 'POST',
url,
data: {
patientId: this.data.patientId,
},
});
})
},
formatTime(date: string) {
let msgCreateTimeName = '';
let msgCreateTimeName = ''
if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) {
msgCreateTimeName = dayjs(date).format('HH:mm');
msgCreateTimeName = dayjs(date).format('HH:mm')
} else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`;
msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`
} else if (dayjs().diff(date, 'day') < 7) {
msgCreateTimeName = dayjs(date).format(`dddd HH:mm`);
msgCreateTimeName = dayjs(date).format(`dddd HH:mm`)
} else {
msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm');
msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm')
}
return msgCreateTimeName;
return msgCreateTimeName
},
filterCreateTime() {
const gapTime = 5 * 60 * 1000;
const { messageList } = this.data;
const gapTime = 5 * 60 * 1000
const { messageList } = this.data
let preTime = 0;
let preTime = 0
messageList.forEach((item, index) => {
if (index === 0) {
item.showTime = true;
preTime = dayjs(item.msgCreateTime).valueOf();
item.msgCreateTimeName = this.formatTime(item.msgCreateTime);
item.showTime = true
preTime = dayjs(item.msgCreateTime).valueOf()
item.msgCreateTimeName = this.formatTime(item.msgCreateTime)
} else {
const curTime = dayjs(item.msgCreateTime).valueOf();
const curTime = dayjs(item.msgCreateTime).valueOf()
if (curTime - preTime > gapTime) {
item.showTime = true;
item.msgCreateTimeName = this.formatTime(item.msgCreateTime);
preTime = dayjs(item.msgCreateTime).valueOf();
item.showTime = true
item.msgCreateTimeName = this.formatTime(item.msgCreateTime)
preTime = dayjs(item.msgCreateTime).valueOf()
}
}
});
})
this.setData({
messageList,
});
})
},
handleView(index = -1) {
this.setData({
scrollIntoView: index > -1 ? `view${index}` : `place`,
});
})
},
handlePatientDetail() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' })
wx.navigateTo({
url: `/pages/d_patientDetail/index?id=${this.data.patientId}`,
});
})
},
handleAudio(e) {
const { index } = e.currentTarget.dataset;
const { messageList } = this.data;
const messageItem = messageList[index];
const { url } = messageItem.msgContent[0];
const { index } = e.currentTarget.dataset
const { messageList } = this.data
const messageItem = messageList[index]
const { url } = messageItem.msgContent[0]
if (this.innerAudioContext) {
if (messageItem.isPlay) {
this.innerAudioContext.stop();
messageItem.isPlay = false;
this.innerAudioContext.stop()
messageItem.isPlay = false
this.setData({
messageList,
});
return;
})
return
}
this.innerAudioContext.stop();
this.innerAudioContext.src = url;
this.innerAudioContext.play();
messageItem.isPlay = true;
this.innerAudioContext.stop()
this.innerAudioContext.src = url
this.innerAudioContext.play()
messageItem.isPlay = true
this.innerAudioContext.onEnded(() => {
messageItem.isPlay = false;
messageItem.isPlay = false
this.setData({
messageList,
});
});
})
})
this.innerAudioContext.onStop(() => {
messageItem.isPlay = false;
messageItem.isPlay = false
this.setData({
messageList,
});
});
})
})
this.setData({
messageList,
});
})
}
},
handleAdl() {
wx.showToast({
title: '患者点击此按钮可进入ADL测评页面',
icon: 'none',
});
})
},
handleReferral() {
wx.showModal({
@ -433,11 +433,14 @@ Page({ @@ -433,11 +433,14 @@ Page({
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.handleView();
});
})
this.handleView()
})
}
},
});
})
},
});
handleBack() {
wx.navigateBack()
},
})

143
src/pages/d_interactiveDoctor/index.wxml

@ -1,4 +1,10 @@ @@ -1,4 +1,10 @@
<view class="page">
<navbar fixed title="互动" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+21}}px;"
>
<view class="page-header">
<view class="user">
<image class="avatar" src="{{patientDetail.userAvatar}}"></image>
@ -6,117 +12,12 @@ @@ -6,117 +12,12 @@
<view class="name">
<view class="left">
{{patientDetail.patientName}}
<view
class="tip"
wx:if="{{patientDetail.patientNameInit==='2'}}"
bind:tap="handleSendUserConform"
data-id="6"
>
提醒补充真实姓名
</view>
</view>
<view class="detail" bind:tap="handlePatientDetail">
患者档案
<van-icon name="arrow" />
</view>
</view>
<view class="tags">
<view class="tag" wx:for="{{patientDetail.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
</view>
</view>
<view class="adl" wx:if="{{patientDetail.LastAdlTime}}">
<view class="a-header">
<view class="content">最近一次测评:{{patientDetail.LastAdlTimeName}}</view>
<view class="box"></view>
</view>
<view class="a-content">
<view class="row" wx:if="{{patientDetail.AdlScore}}">
<view class="label">最新ADL评分</view>
<view class="num">{{patientDetail.AdlScore}}</view>
<view class="tag" wx:if="{{patientDetail.AdlScore<=1}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-warn" wx:elif="{{patientDetail.AdlScore<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-warn.png?t={{Timestamp}}"></image>
接近达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-warn.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-warn.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
</view>
<view class="row" wx:if="{{patientDetail.SteroidDailyDose}}">
<view class="label">最新激素用量</view>
<view class="num">{{patientDetail.SteroidDailyDose}}mg</view>
<view class="tag" wx:if="{{patientDetail.SteroidDailyDose<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{patientDetail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{patientDetail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{patientDetail.SteroidDailyDoseChange}}mg
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{patientDetail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{patientDetail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{patientDetail.SteroidDailyDoseChange}}mg
</view>
<view class="edc">EDC患者</view>
</view>
</view>
<view class="date">上次就诊时间:2025-08-10</view>
</view>
<view class="detail" bind:tap="handlePatientDetail">查看档案</view>
</view>
</view>
<view class="page-container" id="page-container">
@ -149,12 +50,18 @@ @@ -149,12 +50,18 @@
<view class="sub-title">我的方案是</view>
<view class="r-list">
<view class="item" wx:if="{{message.ReVisitInfo.hormone==1}}">1.激素</view>
<view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)</view>
<view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">
2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.gammaGlobulin==1}}">3.静脉输注丙种球蛋白</view>
<view class="item" wx:if="{{message.ReVisitInfo.plasmaExchange==1}}">4.血浆置换</view>
<view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)</view>
<view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">
5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.fcRnAntagonists==1}}">6.FcRn拮抗剂(如:艾加莫德)</view>
<view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">7.C5补体抑制剂(如:依库珠单抗)</view>
<view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">
7.C5补体抑制剂(如:依库珠单抗)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.chineseMedicine==1}}">8.中药或中成药</view>
<view class="item" wx:if="{{message.ReVisitInfo.other==1}}">9.其他</view>
</view>
@ -172,10 +79,6 @@ @@ -172,10 +79,6 @@
<view class="content">{{item.question}}</view>
</view>
</view>
<view class="tip">
{{message.welcomeMsg.guideClick}}
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-down1.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="week" wx:elif="{{message.msgContentType==='2'}}">
@ -252,18 +155,10 @@ @@ -252,18 +155,10 @@
</view>
<view class="page-footer">
<view class="send" bind:tap="handleSendShow">发送消息</view>
<view class="send-date" wx:if="{{patientDetail.patientInit==='2'}}" bind:tap="handleSendUserConform" data-id="7">
<image class="icon" src="{{imageUrl}}za-images/3/icon-user.png?t={{Timestamp}}"></image>
<view>完善个人信息</view>
</view>
<view class="send-date" bind:tap="handleSendDate">
<image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image>
<view>我的出诊时间</view>
</view>
<view class="send-date" bind:tap="handleReferral">
<image class="icon" src="{{imageUrl}}za-images/5/icon-referral.png?t={{Timestamp}}"></image>
<view style="color: #67baca">复诊提醒</view>
</view>
</view>
</view>

7
src/pages/d_invite/index.json

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
{
"navigationBarTitleText": "重症肌无力医生端",
"navigationStyle": "default",
"usingComponents": {
"customPoster": "/components/customPoster/index"
}
}

29
src/pages/d_invite/index.scss

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
page{
background-color: #c65174;
}
.page {
position: relative;
height: 1448rpx;
.poster {
width: 100%;
height: 100%;
}
.btn {
position: absolute;
bottom: 88rpx;
left: 50%;
transform: translateX(-50%);
margin: 36rpx auto;
padding: 18rpx 44rpx;
font-size: 36rpx;
line-height: 48rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 1);
border-radius: 64rpx 64rpx 64rpx 64rpx;
border: 1px solid rgba(255, 255, 255, 1);
box-sizing: border-box;
}
}

114
src/pages/d_invite/index.ts

@ -0,0 +1,114 @@ @@ -0,0 +1,114 @@
const app = getApp<IAppOption>()
Page({
data: {
doctor: {},
hospital: {},
qrCode: '',
posterUrl: '',
params: {},
},
onLoad() {
const SystemInfo = app.globalSystemInfo
if (SystemInfo) {
const { bottom } = SystemInfo.capsulePosition
this.setData({
bottom,
})
}
app.waitLogin().then((_res) => {
wx.showLoading({
title: '加载中',
})
app.mpBehavior({ doctor: true, PageName: 'PG_DOCTORINVITEPATIENT' })
this.getDetail()
})
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/account/info',
data: {},
}).then((res) => {
this.setData({
doctor: res.doctor,
hospital: res.hospital,
})
this.getPrepare(res.doctor.Id)
})
},
getPrepare(id) {
wx.ajax({
method: 'POST',
url: '?r=poster/prepare',
data: {
posterId: 'doctor_mini',
doctorId: id,
},
}).then((res) => {
this.setData({
params: res,
})
})
},
getQrCode() {
this.setData({
qrCode: `${app.globalData.url}?r=zd/doctor/account/mp-info&loginState=${app.globalData.loginState}`,
})
},
handleDownload() {
wx.showToast({
title: '请长按海报图片进行保存',
icon: 'none',
})
// wx.showLoading({
// title: '加载中',
// })
// wx.downloadFile({
// url: this.data.posterUrl,
// success: (res) => {
// if (res.statusCode === 200) {
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: () => {
// wx.hideLoading()
// wx.showToast({
// title: '保存成功,请到相册中查看',
// })
// },
// fail: () => {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '保存失败,请稍后重试',
// })
// },
// })
// } else {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '下载失败,请稍后重试',
// })
// }
// },
// fail: () => {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '下载失败,请稍后重试',
// })
// },
// })
},
handlePosterFinish(e: any) {
this.setData({
posterUrl: e.detail,
})
wx.hideLoading()
},
handleBack() {
wx.navigateBack()
},
})

6
src/pages/d_invite/index.wxml

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
<view class="page">
<image class="poster" show-menu-by-longpress src="{{posterUrl}}"></image>
<view class="btn" bind:tap="handleDownload">长按图片保存</view>
</view>
<customPoster params="{{params}}" bind:finish="handlePosterFinish"></customPoster>

9
src/pages/d_patient/index.json

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "患者列表",
"usingComponents": {
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index"
}
}

344
src/pages/d_patient/index.scss

@ -0,0 +1,344 @@ @@ -0,0 +1,344 @@
page {
background-color: rgba(242, 244, 245, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
}
.page {
min-height: 100vh;
.page-header {
position: sticky;
top: 0;
padding: 30rpx;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
background-color: #fff;
z-index: 10;
.search {
padding: 12rpx 32rpx;
display: flex;
align-items: center;
gap: 16rpx;
background: rgba(246, 248, 249, 1);
border-radius: 140rpx 140rpx 140rpx 140rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
.input {
flex: 1;
font-size: 28rpx;
}
.input-place {
color: rgba(173, 179, 180, 1);
}
}
.navbar {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.nav {
position: relative;
flex: 1;
text-align: center;
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
transition: all 0.3s;
.dot {
padding: 0 4rpx;
position: absolute;
left: 50%;
transform: translateX(35rpx);
top: 0;
min-width: 18rpx;
height: 26rpx;
font-size: 18rpx;
line-height: 26rpx;
color: rgba(255, 255, 255, 1);
border-radius: 50%;
background: rgba(215, 108, 108, 1);
}
&.active {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
&::after {
position: absolute;
bottom: -30rpx;
left: 50%;
transform: translateX(-50%);
content: '';
width: 38rpx;
height: 8rpx;
border-radius: 12rpx;
background: rgba(185, 130, 255, 1);
}
}
}
}
}
.total-line {
padding: 34rpx 30rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
.wrap {
display: flex;
align-items: center;
gap: 20rpx;
.user {
font-size: 32rpx;
color: rgba(154, 161, 162, 1);
.num {
margin-left: 10rpx;
color: rgba(43, 160, 184, 1);
}
}
.message {
font-size: 32rpx;
color: rgba(43, 160, 184, 1);
}
}
.btn {
padding: 10rpx 32rpx;
font-size: 32rpx;
line-height: 1;
color: rgba(98, 190, 208, 1);
background: #ffffff;
border-radius: 80rpx 80rpx 80rpx 80rpx;
border: 2rpx solid #62bed0;
display: flex;
align-items: center;
.icon {
width: 32rpx;
height: 32rpx;
}
}
}
.list {
margin: 0 30rpx;
.list-item {
margin-top: 24rpx;
padding: 32rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
display: flex;
align-items: center;
.avatar {
flex-shrink: 0;
.avatar-img {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
.container {
flex: 1;
padding-left: 20rpx;
.title {
display: flex;
align-items: center;
justify-content: space-between;
.name {
font-size: 36rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
.edc {
margin-left: 16rpx;
display: inline-block;
padding: 0 8rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
border-radius: 4rpx;
font-weight: normal;
background-color: rgba(185, 130, 255, 1);
}
}
}
.replay-date {
margin-top: 16rpx;
font-size: 28rpx;
color: #9aa1a2;
}
}
.send {
padding: 8rpx 22rpx;
font-size: 24rpx;
color: rgba(185, 130, 255, 1);
line-height: 1;
border-radius: 32rpx 32rpx 32rpx 32rpx;
border: 2rpx solid rgba(185, 130, 255, 1);
display: flex;
align-items: center;
gap: 8rpx;
.icon {
width: 28rpx;
height: 28rpx;
}
}
}
}
}
.popup {
padding: 92rpx 30rpx calc(30rpx + env(safe-area-inset-bottom));
.form {
max-height: 60vh;
overflow-y: auto;
overflow-x: hidden;
.form-item {
margin-bottom: 48rpx;
.f-title {
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.select {
margin-top: 24rpx;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
.s-item {
padding: 18rpx 0;
text-align: center;
border-radius: 12rpx;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
background: #f2f4f5;
&.active {
color: #fff;
background-color: rgba(103, 186, 202, 1);
}
}
}
.custom {
margin-top: 16rpx;
display: flex;
align-items: center;
gap: 12rpx;
.c-item {
padding: 18rpx 24rpx;
display: flex;
align-items: center;
font-size: 32rpx;
color: rgba(103, 113, 114, 1);
border-radius: 12rpx;
background-color: rgba(242, 244, 245, 1);
.input {
padding: 0;
margin: 0;
width: 3em;
font-size: 32rpx;
line-height: 1;
}
.input-place {
color: rgba(194, 201, 202, 1);
line-height: 1;
}
}
}
.date {
margin-top: 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
.picker {
flex: 1;
.d-item {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 32rpx;
background: #f7f8f9;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.icon {
width: 32rpx;
height: 32rpx;
}
.content {
font-size: 32rpx;
color: #677172;
&:empty::after {
content: attr(data-place);
color: rgba(194, 201, 202, 1);
}
}
}
}
.sion {
flex-shrink: 0;
margin: 0 14rpx;
font-size: 32rpx;
color: #677172;
}
}
}
}
.p-footer {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
gap: 26rpx;
.reset {
flex: 1;
height: 84rpx;
font-size: 36rpx;
color: rgba(103, 186, 202, 1);
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
background: #ffffff;
border-radius: 98rpx 98rpx 98rpx 98rpx;
border: 2rpx solid #67baca;
}
.submit {
flex: 1;
height: 84rpx;
font-size: 36rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
background: rgba(103, 186, 202, 1);
border-radius: 98rpx 98rpx 98rpx 98rpx;
}
}
}

212
src/pages/d_patient/index.ts

@ -0,0 +1,212 @@ @@ -0,0 +1,212 @@
import dayjs from 'dayjs'
const filterColumns = {}
const app = getApp<IAppOption>()
Page({
data: {
active: 0,
list: [] as any[],
total: 0,
pagination: {
page: 1,
pages: 1,
count: 1,
},
// form
Search: '',
HasAdl: 0,
DoubleStandard: 0,
AdlTime: 0,
AdlScore: [] as any,
AdlScoreChange: [],
AdlScoreChangeType: 0,
AdlScoreChangeMax: '',
AdlScoreChangeMin: '',
SteroidDailyDose: [] as any,
SteroidDailyDoseChange: [] as any,
IsThisWeekAdl: 0,
PharyngealSymptoms: 0,
AntibodyType: 0,
ThyroidAbnormal: 0,
PreviousConvulsion: 0,
TraditionalImmunosuppressant: 0,
MedicalInsuranceType: 0,
BindStartDate: '',
BindEndDate: '',
HasAdlIndex: 0,
HasAdlName: '全部',
DoubleStandardIndex: 0,
DoubleStandardName: '全部',
AdlTimeIndex: 0,
AdlTimeName: '全部',
...filterColumns,
},
onLoad(options) {
this.setData({
BindStartDate: options.BindStartDate || '',
BindEndDate: options.BindEndDate || '',
HasAdl: Number(options.HasAdl || ''),
DoubleStandard: Number(options.DoubleStandard || ''),
AdlScore: options.AdlScore ? options.AdlScore.split('-').map(Number) : [],
SteroidDailyDose: options.SteroidDailyDose ? options.SteroidDailyDose.split('-').map(Number) : [],
IsThisWeekAdl: Number(options.IsThisWeekAdl || ''),
})
},
onShow() {
app.waitLogin().then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTLIST' })
this.getList()
})
},
handleReset() {
this.setData({
Search: '',
HasAdl: 0,
HasAdlIndex: 0,
HasAdlName: '全部',
DoubleStandard: 0,
DoubleStandardIndex: 0,
DoubleStandardName: '全部',
AdlTime: 0,
AdlTimeName: '全部',
AdlScore: [],
AdlScoreChange: [],
AdlScoreChangeType: 0,
AdlScoreChangeMax: '',
AdlScoreChangeMin: '',
SteroidDailyDose: [],
SteroidDailyDoseChange: [],
IsThisWeekAdl: 0,
PharyngealSymptoms: 0,
AntibodyType: 0,
ThyroidAbnormal: 0,
PreviousConvulsion: 0,
TraditionalImmunosuppressant: 0,
MedicalInsuranceType: 0,
BindStartDate: '',
BindEndDate: '',
})
this.getList()
},
handleTapSearch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTSEARCH' })
},
handleNav(e) {
const { active } = e.currentTarget.dataset
this.setData({
active,
})
this.handleSearch()
},
handleSearch() {
this.getList()
},
getList(newPage = 1) {
const { active } = this.data
const params = {
search: this.data.Search,
}
const url = {
0: '?r=zd/doctor/patient/get-my-list',
1: '?r=zd/doctor/patient/get-my-list&IsEDC=1',
}[active] as string
wx.ajax({
method: 'GET',
url,
data: {
page: newPage,
...params,
},
}).then((res) => {
res.list.forEach((item) => {
if (item.BecomePatientTime) {
item.BecomePatientTime = dayjs(item.BecomePatientTime).format('YYYY-MM-DD')
}
})
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list]
this.setData({
total: res.count,
list,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
})
})
},
onReachBottom() {
const { page, pages } = this.data.pagination
if (pages > page) {
this.getList(page + 1)
}
},
handlePickerChange(e: any) {
const { key } = e.currentTarget.dataset
const index = e.detail.value
const data = this.data[`${key}Column`]
this.setData({
[`${key}Index`]: index,
[`${key}Name`]: data[index].value,
[`${key}`]: data[index].id,
})
this.handleSearch()
},
handleRadio(e: any) {
const { key, index } = e.currentTarget.dataset
const data = this.data[`${key}Column`]
this.setData({
[`${key}`]: data[index].id,
[`${key}Name`]: data[index].value,
[`${key}Index`]: index,
})
},
handleCheckbox(e: any) {
const { index, key } = e.currentTarget.dataset
const data = this.data[`${key}Column`]
const oldValue = this.data[`${key}`]
const value = oldValue.includes(data[index].id)
? oldValue.filter((item: any) => item !== data[index].id)
: [...oldValue, data[index].id]
this.setData({
[`${key}`]: data[index].id ? value : [],
})
},
handleDetail(e: any) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTVIEW' })
const { index } = e.currentTarget.dataset
const item = this.data.list[index]
wx.navigateTo({
url: `/pages/d_patientDetail/index?id=${item.PatientId}`,
})
},
handleSend(e) {
const { index } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/d_interactiveDoctor/index?patientId=${this.data.list[index].PatientId}`,
})
},
handleSendGroup() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTMASSMESSAGE' })
wx.navigateTo({
url: '/pages/d_taskList/index',
})
},
onShareAppMessage() {
return {
title: '重症肌无力加油站,重拾生活掌控感!',
path: '/pages/d_patient/index',
}
},
handleBack() {
wx.navigateBack()
},
})

46
src/pages/d_patient/index.wxml

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
<wxs src="./index.wxs" module="tools" />
<view class="page">
<view class="page-header">
<navBar title="患者列表" back home="{{false}}" bind:back="handleBack"></navBar>
<view class="search">
<image class="icon" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<input
type="text"
model:value="{{Search}}"
class="input"
placeholder-class="input-place"
placeholder="可根据姓名、手机号搜索患者"
confirm-type="search"
bindconfirm="handleSearch"
bind:tap="handleTapSearch"
/>
</view>
<view class="navbar">
<view class="nav {{active===0 && 'active'}}" bind:tap="handleNav" data-active="{{0}}">
我的患者
<view class="dot" wx:if="{{unReadCount>0}}">{{unReadCount}}</view>
</view>
<view class="nav {{active===1 && 'active'}}" bind:tap="handleNav" data-active="{{1}}">EDC患者</view>
</view>
</view>
<view class="list">
<view class="list-item" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-index="{{index}}">
<view class="avatar">
<image class="avatar-img" src="{{item.UserImg}}"></image>
</view>
<view class="container">
<view class="title">
<view class="name">
{{item.Name}}
<view class="edc" wx:if="{{item.IsEDC==1}}">EDC患者</view>
</view>
</view>
<view class="replay-date">入组时间:{{item.BecomePatientTime}}</view>
</view>
<view class="send" catch:tap="handleSend" data-index="{{index}}">消息</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</view>
<tabbar active="{{1}}"></tabbar>

12
src/pages/d_patient/index.wxs

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
function include(value, arr) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] === value) {
return true
}
}
return false
}
module.exports = {
include: include,
}

5
src/pages/d_patientDetail/index.json

@ -1,10 +1,9 @@ @@ -1,10 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"zd-navBar": "/components/zd-navBar/navBar",
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index",
"ec-canvas": "/components/ec-canvas/ec-canvas",
"toast": "/components/toast/index"
"ec-canvas": "/components/ec-canvas/ec-canvas"
}
}

549
src/pages/d_patientDetail/index.scss

@ -1,15 +1,16 @@ @@ -1,15 +1,16 @@
page {
background-color: rgba(242, 244, 245, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
background-color: rgba(246, 248, 249, 1);
}
.page {
width: 100vw;
overflow-x: hidden;
min-height: 100vh;
.banner {
margin: 40rpx 30rpx 32rpx;
padding: 36rpx 20rpx;
background: #ffffff;
margin: 40rpx 30rpx 0;
padding: 0 20rpx;
background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.46) 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
position: relative;
.watermark {
@ -26,44 +27,60 @@ page { @@ -26,44 +27,60 @@ page {
}
}
.banner-container {
.user {
display: flex;
position: relative;
z-index: 3;
padding: 120rpx 0 38rpx;
.avatar {
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, -50%);
.avatar-img {
width: 100rpx;
height: 100rpx;
width: 174rpx;
height: 174rpx;
border-radius: 50%;
}
.icon {
position: absolute;
bottom: 0;
right: 0;
width: 40rpx;
height: 40rpx;
}
}
.wrap {
padding-left: 20rpx;
.w-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8rpx;
text-align: center;
.name {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-size: 48rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
.age {
display: inline;
color: rgba(173, 172, 178, 1);
font-weight: normal;
.sub {
font-size: 28rpx;
}
}
.icon {
width: 32rpx;
height: 32rpx;
}
.tel {
position: relative;
z-index: 3;
font-size: 32rpx;
color: rgba(154, 161, 162, 1);
margin-top: 28rpx;
font-size: 28rpx;
color: rgba(33, 29, 46, 1);
display: flex;
align-items: center;
justify-content: center;
.tel-icon {
margin-left: 10rpx;
width: 32rpx;
height: 32rpx;
width: 40rpx;
height: 40rpx;
}
}
.date {
margin-top: 28rpx;
font-size: 28rpx;
color: rgba(105, 104, 110, 1);
}
.send {
margin-left: 32rpx;
width: 92rpx;
@ -75,6 +92,9 @@ page { @@ -75,6 +92,9 @@ page {
border-radius: 58rpx 58rpx 58rpx 58rpx;
}
}
.user {
.wrap {
padding-left: 20rpx;
.w-tags {
margin-top: 28rpx;
display: flex;
@ -307,461 +327,64 @@ page { @@ -307,461 +327,64 @@ page {
}
}
}
.chart-container {
margin: 30rpx;
padding: 30rpx;
border-radius: 24rpx;
background-color: #fff;
position: relative;
.watermark {
position: absolute;
top: 80rpx;
z-index: 2;
font-size: 36rpx;
line-height: 58rpx;
color: rgba(0, 0, 0, 0.05);
transform: rotate(-12deg);
text-align: center;
.p {
max-width: 90vw;
white-space: wrap;
}
}
.container {
.c-nav {
position: relative;
z-index: 3;
display: flex;
padding: 8rpx;
border-radius: 98rpx;
background-color: #f2f4f5;
.nav-item {
flex: 1;
padding: 12rpx;
font-size: 32rpx;
color: #677172;
text-align: center;
&.active {
color: #fff;
border-radius: 62rpx;
background-color: #62bed0;
}
}
}
.filter {
position: relative;
z-index: 3;
margin-top: 32rpx;
display: flex;
gap: 16rpx;
align-items: center;
border-radius: 80rpx 80rpx 80rpx 80rpx;
.type {
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
background-color: rgba(242, 244, 245, 1);
border-radius: 34rpx;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.range {
padding: 10rpx 32rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
border-radius: 34rpx;
background-color: rgba(242, 244, 245, 1);
.icon {
width: 24rpx;
height: 24rpx;
}
}
}
.card {
margin: 32rpx 0 0;
padding: 20rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
.info-card {
margin: 24rpx 30rpx 0;
padding: 0 32rpx;
background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.87) 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.pie {
height: 376rpx;
}
.line {
border-top: 1px dashed rgba(242, 244, 245, 1);
}
.w-header {
padding-top: 32rpx;
display: flex;
justify-content: space-between;
.title {
font-size: 32rpx;
color: #484848;
}
.legend {
display: flex;
align-items: center;
gap: 25rpx;
.item {
font-size: 20rpx;
color: #4f4f4f;
display: flex;
align-items: center;
.logo {
margin-right: 8rpx;
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #cf5375;
&.hormone {
background-color: #3192a1;
}
}
.icon {
margin-right: 8rpx;
width: 17rpx;
height: 24rpx;
}
}
}
}
.column {
height: 400rpx;
}
}
.module {
margin-top: 30rpx;
.module-header {
display: flex;
.date {
flex-shrink: 0;
font-size: 24rpx;
color: #333333;
}
.tags {
margin-left: 14rpx;
flex: 1;
display: flex;
flex-wrap: nowrap;
overflow-x: scroll;
white-space: nowrap;
&::-webkit-scrollbar {
display: none;
}
.tag1 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #d86687;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
.tag2 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #0b184f;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
.tag3 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #24d8c8;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
}
}
.module-container {
margin-top: 24rpx;
display: flex;
.aside {
margin-right: 30rpx;
padding-left: 14rpx;
border-right: 1px dashed #dddddd;
}
.m-card {
flex: 1;
box-shadow: 0 4rpx 29rpx 0rpx rgba(207, 83, 116, 0.25);
border-radius: 24rpx;
.card-header {
padding: 20rpx 18rpx 4rpx 48rpx;
border-radius: 24rpx 24rpx 0 0;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 8rpx 8rpx 16rpx 0rpx rgba(143, 217, 226, 0.1);
&.grade1 {
background: linear-gradient(90deg, #26dac9 7%, rgba(143, 217, 226, 0) 70%, rgba(143, 217, 226, 0) 100%);
}
&.grade2 {
background: linear-gradient(
90deg,
rgba(235, 111, 87, 1) 7%,
rgba(143, 217, 226, 0) 70%,
rgba(143, 217, 226, 0) 100%
);
}
&.grade3 {
background: linear-gradient(
90deg,
rgba(207, 83, 117, 1) 7%,
rgba(143, 217, 226, 0) 70%,
rgba(143, 217, 226, 0) 100%
);
}
.num {
display: flex;
align-items: baseline;
font-size: 96rpx;
line-height: 1;
color: #ffffff;
letter-spacing: 4rpx;
.sub {
font-size: 24rpx;
color: #fff;
}
}
.num-detail {
border: 2rpx solid #ffffff;
.row {
padding: 32rpx;
display: flex;
.n-item {
width: 73rpx;
&.active {
.box {
background-color: #cf5375;
}
border-bottom: 1px solid rgba(173, 172, 178, 0.1);
&:last-of-type {
border: none;
}
.box {
width: 45rpx;
height: 45rpx;
width: 45rpx;
height: 45rpx;
.label {
width: 11em;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 45rpx;
background: #333333;
border-radius: 12rpx 12rpx 12rpx 12rpx;
color: rgba(173, 172, 178, 1);
}
.name {
font-size: 24rpx;
line-height: 48rpx;
color: rgba(51, 51, 51, 0.5);
}
}
}
.status {
font-size: 24rpx;
color: #989898;
text-align: right;
.s-num {
.content {
font-size: 32rpx;
}
.s-core {
font-size: 24rpx;
color: #989898;
// background: #484848;
border-radius: 6rpx;
color: rgba(33, 29, 46, 1);
}
}
}
.card-container {
padding: 8rpx 23rpx 20rpx;
border-radius: 0 0 24rpx 24rpx;
.edc-card {
margin: 24rpx 30rpx 0;
padding: 30rpx 32rpx;
display: flex;
align-items: center;
gap: 24rpx;
background-color: #fff;
.cc-title {
text-indent: 22rpx;
font-size: 24rpx;
color: rgba(79, 79, 79, 1);
}
.cc-content {
margin-top: 12rpx;
padding: 16rpx 20rpx;
border-radius: 24rpx;
background-color: rgba(249, 249, 249, 1);
.line {
font-size: 24rpx;
color: #666666;
line-height: 36rpx;
.dot {
color: #666666;
font-weight: bold;
}
.red {
color: #cf5375;
}
.green {
color: #25d9c8;
}
}
}
.fold {
margin-top: 16rpx;
.fold-header {
display: flex;
justify-content: flex-end;
font-size: 24rpx;
color: rgba(204, 204, 204, 1);
}
.fold-container {
padding-top: 10rpx;
height: 500rpx;
overflow: hidden;
transition: all 0.5s;
&.hide {
padding: 0;
height: 0;
}
.fold-img {
width: 100%;
}
.scurt {
width: 100%;
border: 1px solid rgba(0, 0, 0, 0.1);
box-sizing: border-box;
.s-header {
display: flex;
height: 40rpx;
margin-bottom: -1px;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
.none {
flex-shrink: 0;
width: 226rpx;
background-color: rgba(228, 228, 228, 1);
}
.bar {
flex: 1;
display: flex;
.num {
flex: 1;
text-align: center;
font-size: 24rpx;
color: #fff;
line-height: 40rpx;
.icon {
width: 48rpx;
height: 48rpx;
}
.content {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
}
.s-body {
.footer {
margin: 60rpx 30rpx 0;
display: flex;
.s-aside {
width: 28rpx;
background-color: rgba(102, 102, 102, 0.15);
flex-shrink: 0;
.sa-item {
display: flex;
text-align: center;
justify-content: center;
align-items: center;
font-size: 18rpx;
color: rgba(102, 102, 102, 1);
line-height: 1;
overflow: hidden;
&:not(:last-of-type) {
margin-bottom: -1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
}
.sa-item1 {
height: 158rpx;
}
.sa-item2 {
height: 54rpx;
}
.sa-item3 {
height: 106rpx;
}
.sa-item4 {
height: 108rpx;
}
}
.s-container {
flex: 1;
.sc-row {
display: flex;
height: 54rpx;
overflow: hidden;
.sc-title {
width: 198rpx;
font-size: 18rpx;
color: rgba(102, 102, 102, 1);
text-align: center;
line-height: 53rpx;
}
.sc-col {
margin-left: -1px;
border-left: 1px solid rgba(0, 0, 0, 0.1);
flex: 1;
text-align: center;
.icon {
margin-top: 11rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.sc-row:not(:last-of-type) {
margin-bottom: -1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.sc-row:nth-of-type(2n-1) {
background-color: rgba(217, 217, 217, 0.2);
}
}
}
}
}
}
}
}
.drug-card {
margin-top: 30rpx;
gap: 26rpx;
.btn {
flex: 1;
box-shadow: 0 4rpx 29rpx 0rpx rgba(207, 83, 116, 0.25);
border-radius: 24rpx;
.d-header {
border-radius: 24rpx 0 0 0;
padding: 20rpx 50rpx;
height: 88rpx;
background: #ffffff;
font-size: 32rpx;
color: rgba(185, 130, 255, 1);
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(95deg, #26dac9 7%, rgba(143, 217, 226, 0) 100%);
.name {
font-size: 28rpx;
color: #ffffff;
}
.status {
font-size: 22rpx;
color: #5b6363;
.num {
font-size: 22rpx;
color: #cf5375;
}
}
}
.content {
padding: 20rpx 50rpx;
font-size: 22rpx;
color: #666666;
}
}
}
}
justify-content: center;
border-radius: 48rpx 48rpx 48rpx 48rpx;
border: 2rpx solid #b982ff;
}
}
}
@ -882,3 +505,5 @@ page { @@ -882,3 +505,5 @@ page {
}
}
}

342
src/pages/d_patientDetail/index.ts

@ -1,14 +1,9 @@ @@ -1,14 +1,9 @@
import dayjs from 'dayjs';
import dayjs from 'dayjs'
const app = getApp<IAppOption>();
const app = getApp<IAppOption>()
let echarts: any = null;
Page({
data: {
toastShow: false,
toastType: 'patientDetailSafeDoctor',
toastParams: {} as any,
showTel: false,
doctor: {},
@ -166,26 +161,16 @@ Page({ @@ -166,26 +161,16 @@ Page({
count: 1,
},
},
ecDataTrendComponent1: null as any,
ecDataTrendComponent2: null as any,
ecDataTrendComponent3: null as any,
ecDataTrendComponent4: null as any,
async onLoad(option) {
this.setData({
id: option.id,
});
echarts = await require.async('../../gift/compontnts/echart/echarts.js');
this.ecDataTrendComponent1 = this.selectComponent('#chart1');
this.ecDataTrendComponent2 = this.selectComponent('#chart2');
this.ecDataTrendComponent3 = this.selectComponent('#chart3');
this.ecDataTrendComponent4 = this.selectComponent('#chart4');
})
app.waitLogin({ type: [2] }).then(async (_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTDETAIL' });
this.getDoctorDetail();
await this.getDetail();
this.handleNav({ currentTarget: { dataset: { index: '0' } } }, false);
});
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTDETAIL' })
this.getDoctorDetail()
await this.getDetail()
})
},
getDoctorDetail() {
wx.ajax({
@ -196,14 +181,8 @@ Page({ @@ -196,14 +181,8 @@ Page({
this.setData({
doctor: res.doctor,
hospital: res.hospital,
toastShow: true,
toastType: 'patientDetailSafeDoctor',
toastParams: {
Name: res.doctor.Name,
HospitalName: res.hospital.Name,
},
});
});
})
})
},
getDetail() {
return wx
@ -214,57 +193,57 @@ Page({ @@ -214,57 +193,57 @@ Page({
})
.then((res) => {
if (res.LastAdlTime) {
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '');
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '')
}
if (res.LastUseDrugsTime) {
res.LastUseDrugsTimeName =
dayjs().format('YYYY-MM-DD') === res.LastUseDrugsTime
? ''
: dayjs(res.LastUseDrugsTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '');
: dayjs(res.LastUseDrugsTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '')
}
this.setData({
detail: {
...res,
hideName: res.Name.replace(/^(.)(.*)$/, (_, first, rest) => first + '*'.repeat(rest.length)),
},
});
});
})
})
},
handleTypeChange(e) {
const index = e.detail.value;
const { typeRange, nav } = this.data;
const type = typeRange[index].id;
const typeName = typeRange[index].value;
let EndDate = '';
let StartDate = '';
const index = e.detail.value
const { typeRange, nav } = this.data
const type = typeRange[index].id
const typeName = typeRange[index].value
let EndDate = ''
let StartDate = ''
if (type === '1') {
EndDate = dayjs().format('YYYY-MM-DD');
StartDate = dayjs().subtract(6, 'd').format('YYYY-MM-DD');
EndDate = dayjs().format('YYYY-MM-DD')
StartDate = dayjs().subtract(6, 'd').format('YYYY-MM-DD')
} else if (type === '2') {
EndDate = dayjs().format('YYYY-MM');
StartDate = dayjs().subtract(1, 'M').format('YYYY-MM');
EndDate = dayjs().format('YYYY-MM')
StartDate = dayjs().subtract(1, 'M').format('YYYY-MM')
} else if (type === '3') {
EndDate = dayjs().format('YYYY');
StartDate = dayjs().subtract(1, 'y').format('YYYY');
EndDate = dayjs().format('YYYY')
StartDate = dayjs().subtract(1, 'y').format('YYYY')
}
this.setData({
type,
typeName,
EndDate,
StartDate,
});
})
if (nav === '0') {
this.getGraph();
this.getGraph()
} else {
this.getAdlList();
this.getAdlList()
}
},
handleChange() {
const { nav } = this.data;
const { nav } = this.data
if (nav === '0') {
this.getGraph();
this.getGraph()
} else {
this.getAdlList();
this.getAdlList()
}
},
getGraph() {
@ -279,50 +258,50 @@ Page({ @@ -279,50 +258,50 @@ Page({
count: 0,
},
}).then(async (res) => {
this.initChart1(res.adlSummary);
this.initChart2(res.adlSummary);
this.initChart1(res.adlSummary)
this.initChart2(res.adlSummary)
const medication = res.medication.map((item) => {
return {
Date: item.InjectionDate,
...item,
};
});
const list = res.list;
const newList: any[] = this.mergeArr(list, medication);
const chart3 = await this.initChart3(newList as never[]);
const chart4 = await this.initChart4(newList as never[]);
echarts.connect([chart3, chart4]);
});
}
})
const list = res.list
const newList: any[] = this.mergeArr(list, medication)
const chart3 = await this.initChart3(newList as never[])
const chart4 = await this.initChart4(newList as never[])
echarts.connect([chart3, chart4])
})
},
mergeArr(array1: any[] = [], array2: any[] = []) {
// 合并两个数组中相同Date字段的对象
const mergedArray: any[] = [];
const mergedMap = new Map();
const mergedArray: any[] = []
const mergedMap = new Map()
array1.concat(array2).forEach((obj) => {
const date = obj.Date;
const date = obj.Date
if (mergedMap.has(date)) {
mergedMap.get(date).push(obj);
mergedMap.get(date).push(obj)
} else {
mergedMap.set(date, [obj]);
mergedMap.set(date, [obj])
}
});
})
mergedMap.forEach((objs: any) => {
if (objs.length === 1) {
mergedArray.push(objs[0]);
mergedArray.push(objs[0])
} else {
const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur }));
mergedArray.push(mergedObj);
const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur }))
mergedArray.push(mergedObj)
}
});
})
// 按照Date字段对合并后的数组进行排序
mergedArray.sort((a, b) => {
return a.Date.localeCompare(b.Date);
});
return mergedArray;
return a.Date.localeCompare(b.Date)
})
return mergedArray
},
initChart1(adlSummary = {}) {
this.ecDataTrendComponent1.init((canvas, width, height, dpr) => {
@ -330,8 +309,8 @@ Page({ @@ -330,8 +309,8 @@ Page({
width,
height,
devicePixelRatio: dpr, // new
});
canvas.setChart(chart);
})
canvas.setChart(chart)
const option = {
tooltip: {
@ -369,13 +348,13 @@ Page({ @@ -369,13 +348,13 @@ Page({
maxSurfaceAngle: 80,
},
labelLayout(params) {
const isLeft = params.labelRect.x < chart.getWidth() / 2;
const points = params.labelLinePoints;
const isLeft = params.labelRect.x < chart.getWidth() / 2
const points = params.labelLinePoints
// Update the end point.
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width;
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width
return {
labelLinePoints: points,
};
}
},
data: [
{ value: adlSummary.adlNearNum, name: 'ADL接近达标' },
@ -391,11 +370,11 @@ Page({ @@ -391,11 +370,11 @@ Page({
},
},
],
};
}
chart.setOption(option);
return chart;
});
chart.setOption(option)
return chart
})
},
initChart2(adlSummary = {}) {
this.ecDataTrendComponent2.init((canvas, width, height, dpr) => {
@ -403,8 +382,8 @@ Page({ @@ -403,8 +382,8 @@ Page({
width,
height,
devicePixelRatio: dpr, // new
});
canvas.setChart(chart);
})
canvas.setChart(chart)
const option = {
tooltip: {
@ -442,13 +421,13 @@ Page({ @@ -442,13 +421,13 @@ Page({
maxSurfaceAngle: 80,
},
labelLayout(params) {
const isLeft = params.labelRect.x < chart.getWidth() / 2;
const points = params.labelLinePoints;
const isLeft = params.labelRect.x < chart.getWidth() / 2
const points = params.labelLinePoints
// Update the end point.
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width;
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width
return {
labelLinePoints: points,
};
}
},
data: [
{ value: adlSummary.SteroidDailyDoseUnStandardNum, name: '激素未达标' },
@ -463,24 +442,24 @@ Page({ @@ -463,24 +442,24 @@ Page({
},
},
],
};
}
chart.setOption(option);
return chart;
});
chart.setOption(option)
return chart
})
},
initChart3(defaultList = []) {
const { userInfo } = this.data;
const list: any = defaultList;
const { userInfo } = this.data
const list: any = defaultList
return new Promise((reslove) => {
this.ecDataTrendComponent3.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr, // new
});
canvas.setChart(chart);
})
canvas.setChart(chart)
const option: any = {
tooltip: {
@ -528,7 +507,7 @@ Page({ @@ -528,7 +507,7 @@ Page({
data: list.map((item) => dayjs(item.Date).format('MM-DD')),
axisLabel: {
formatter() {
return '';
return ''
},
},
},
@ -601,7 +580,7 @@ Page({ @@ -601,7 +580,7 @@ Page({
endValue: list.length - 1,
filterMode: 'none',
},
};
}
if (this.data.detail.UserType === 4) {
const markLineData = list
@ -623,8 +602,8 @@ Page({ @@ -623,8 +602,8 @@ Page({
color: '#25D9C8',
offset: [60, 0],
},
};
});
}
})
option.series.push({
name: '用药',
data: list.map((item) => (item.InjectionBottles ? 0 : null)),
@ -647,7 +626,7 @@ Page({ @@ -647,7 +626,7 @@ Page({
symbol: ['none', 'none'],
data: markLineData,
},
});
})
// option.series.push({
// name: "用药时间",
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
@ -669,23 +648,23 @@ Page({ @@ -669,23 +648,23 @@ Page({
// });
}
chart.setOption(option);
reslove(chart);
return chart;
});
});
chart.setOption(option)
reslove(chart)
return chart
})
})
},
initChart4(defaultList = []) {
const { userInfo } = this.data;
const list: any = defaultList;
const { userInfo } = this.data
const list: any = defaultList
return new Promise((reslove) => {
this.ecDataTrendComponent4.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr, // new
});
canvas.setChart(chart);
})
canvas.setChart(chart)
const option: any = {
tooltip: {
@ -738,12 +717,12 @@ Page({ @@ -738,12 +717,12 @@ Page({
type: 'value',
minInterval: 1,
max(value) {
return value.max + 20 > 999 ? 999 : value.max + 20;
return value.max + 20 > 999 ? 999 : value.max + 20
},
axisLabel: {
// width: 20,
formatter(value: number) {
return value;
return value
},
},
},
@ -765,7 +744,7 @@ Page({ @@ -765,7 +744,7 @@ Page({
color: '#18474e',
z: 11,
formatter({ value }) {
return `${value}mg`;
return `${value}mg`
},
},
itemStyle: {
@ -829,7 +808,7 @@ Page({ @@ -829,7 +808,7 @@ Page({
endValue: list.length - 1,
filterMode: 'none',
},
};
}
if (this.data.detail.UserType === 4) {
const markLineData = list
.filter((item) => item.InjectionBottles)
@ -849,9 +828,9 @@ Page({ @@ -849,9 +828,9 @@ Page({
color: '#25D9C8',
offset: [60, 0],
},
};
});
const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose));
}
})
const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose))
option.series.push({
name: '用药',
data: list.map((item) => (item.InjectionBottles ? 0 : null)),
@ -874,7 +853,7 @@ Page({ @@ -874,7 +853,7 @@ Page({
symbol: ['none', 'none'],
data: markLineData,
},
});
})
// option.series.push({
// name: "用药时间",
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
@ -896,37 +875,37 @@ Page({ @@ -896,37 +875,37 @@ Page({
// });
}
chart.setOption(option);
reslove(chart);
return chart;
});
});
chart.setOption(option)
reslove(chart)
return chart
})
})
},
handleRemark() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREMARK' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREMARK' })
this.setData({
popupRemarkShow: true,
remark: this.data.detail.DoctorRemark,
});
})
setTimeout(() => {
this.setData({
remarkFocus: true,
});
}, 300);
})
}, 300)
},
handleRemarkClose() {
this.setData({
popupRemarkShow: false,
remarkFocus: false,
remark: '',
});
})
},
handleRemarkSubmit() {
if (!this.data.remark) {
wx.showToast({
icon: 'none',
title: '请输入备注',
});
})
}
wx.ajax({
method: 'POST',
@ -936,34 +915,34 @@ Page({ @@ -936,34 +915,34 @@ Page({
DoctorRemark: this.data.remark,
},
}).then((_res) => {
this.handleRemarkClose();
this.getDetail();
});
this.handleRemarkClose()
this.getDetail()
})
},
handleEditUser() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILEDIT' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILEDIT' })
this.setData({
popupEditShow: true,
});
})
},
handleUserCancel() {
this.setData({
popupEditShow: false,
});
})
},
handleUserSubmit() {
this.handleUserCancel();
this.handlePatientUpdate();
this.handleUserCancel()
this.handlePatientUpdate()
},
handleRadio(e) {
const { id, key } = e.currentTarget.dataset;
const { id, key } = e.currentTarget.dataset
this.setData({
[`detail.${key}`]: id,
});
})
},
handlePatientUpdate() {
const { detail } = this.data;
const { detail } = this.data
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/patient/update',
@ -979,35 +958,35 @@ Page({ @@ -979,35 +958,35 @@ Page({
wx.showToast({
icon: 'none',
title: '更新成功',
});
this.getDetail();
});
})
this.getDetail()
})
},
handleBack() {
wx.navigateBack();
wx.navigateBack()
},
handleSend() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILMESSAGE' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILMESSAGE' })
wx.navigateTo({
url: `/pages/d_interactiveDoctor/index?patientId=${this.data.detail.PatientId}`,
});
})
},
handleNav(e, mp = true) {
const { index } = e.currentTarget.dataset;
const { index } = e.currentTarget.dataset
if (index == 0 && mp) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREPORTGUIDE' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREPORTGUIDE' })
}
if (index == 1 && mp) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILNOTEGUIDE' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILNOTEGUIDE' })
}
this.setData({
nav: index,
});
this.handleTypeChange({ detail: { value: '2' } });
})
this.handleTypeChange({ detail: { value: '2' } })
},
getAdlList(newPage = 1) {
const { detail, EndDate, StartDate, type } = this.data;
const { detail, EndDate, StartDate, type } = this.data
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/patient/adl-list',
@ -1020,20 +999,20 @@ Page({ @@ -1020,20 +999,20 @@ Page({
},
}).then((res) => {
res.list.map((item) => {
let grade = 1;
let grade = 1
if (item.TotalScore < 5) {
grade = 1;
grade = 1
} else if (item.TotalScore >= 5 && item.TotalScore < 15) {
grade = 2;
grade = 2
} else {
grade = 3;
grade = 3
}
item.grade = grade;
item.fold = false;
return item;
});
item.grade = grade
item.fold = false
return item
})
const adlList = res.page === 1 ? res.list : [...this.data.adlList, ...res.list];
const adlList = res.page === 1 ? res.list : [...this.data.adlList, ...res.list]
this.setData({
adlList,
pagination: {
@ -1041,35 +1020,46 @@ Page({ @@ -1041,35 +1020,46 @@ Page({
pages: res.pages,
count: res.count,
},
});
});
})
})
},
onReachBottom() {
const { page, pages } = this.data.pagination;
const nav = this.data.nav;
const { page, pages } = this.data.pagination
const nav = this.data.nav
if (pages > page && nav === '1') {
this.getAdlList(page + 1);
this.getAdlList(page + 1)
}
},
handleFold(e) {
const { index } = e.currentTarget.dataset;
const { index } = e.currentTarget.dataset
this.setData({
[`adlList[${index}].fold`]: !this.data.adlList[index].fold,
});
})
},
handleAdlDetail() {},
handleToastOk() {
this.setData({
toastShow: false,
});
})
},
handleToastCancel() {
wx.navigateBack();
wx.navigateBack()
},
handleToggleTel() {
console.log(11111);
console.log(11111)
this.setData({
showTel: !this.data.showTel,
});
})
},
});
handleEDC() {
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/patient/set-edc',
data: { patientId: this.data.detail.PatientId },
}).then((res) => {
this.setData({
['detail.IsEDC']: this.data.detail.IsEDC == 1 ? 2 : 1,
})
})
},
})

462
src/pages/d_patientDetail/index.wxml

@ -1,452 +1,60 @@ @@ -1,452 +1,60 @@
<navbar fixed title="患者档案" custom-style="background:{{background}}" z-index="10">
<van-icon name="arrow-left" slot="left" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="background: url({{imageUrl}}za-images/doctor/d_patient-detail-bg.png?t={{Timestamp}}) no-repeat top center/100% 640rpx"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+70}}px;"
>
<zd-navBar background="{{background}}" title="患者档案" back bind:back="handleBack"></zd-navBar>
<view class="banner">
<view class="watermark">
<view class="p">本页面内容涉及患者个人信息</view>
<view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view>
<view class="p">不可用于其他用途</view>
<view class="p">【gMG给力加油站】</view>
</view>
<view class="banner-container">
<view class="user">
<view class="avatar">
<image class="avatar-img" src="{{detail.UserImg}}"></image>
<image wx:if="{{detail.Gender==='1'}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:if="{{detail.Gender==='2'}}" class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
</view>
<view class="wrap">
<view class="w-header">
<view class="name">{{showTel ? detail.Name : detail.hideName}}</view>
<image
wx:if="{{detail.Gender==='1'}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-man.png?t={{Timestamp}}"
></image>
<image
wx:if="{{detail.Gender==='2'}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-woman.png?t={{Timestamp}}"
></image>
<view class="name">
{{showTel ? detail.Name : detail.hideName}}
<view class="age">{{detail.AgeRangeName}}</view>
</view>
<view class="tel" bind:tap="handleToggleTel">
{{showTel ? detail.Telephone : '***********'}}
<image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}za-images/5/eye2.png?t={{Timestamp}}"></image>
<image wx:else class="tel-icon" src="{{imageUrl}}za-images/5/eye1.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-tags">
<image
wx:if="{{detail.UserType===4}}"
class="label"
src="{{imageUrl}}za-images/doctor/drug-label.png?t={{Timestamp}}"
></image>
<view class="tag" wx:for="{{detail.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
</view>
</view>
<view class="adl" wx:if="{{detail.LastAdlTime}}">
<view class="a-header">
<view class="content">
<view class="sub-content1">最近一次测评:{{detail.LastAdlTimeName}}</view>
<view class="sub-content2" wx:if="{{detail.LastAdlNeedFollowStatus==1}}">需随访</view>
</view>
<view class="box"></view>
</view>
<view class="a-content">
<view class="row" wx:if="{{detail.AdlScore}}">
<view class="label">最新ADL评分</view>
<view class="num">{{detail.AdlScore}}</view>
<view class="tag" wx:if="{{detail.AdlScore<=1}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-warn" wx:elif="{{detail.AdlScore<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-warn.png?t={{Timestamp}}"></image>
接近达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-warn.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-warn.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
<image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
<image wx:else class="tel-icon" src="{{imageUrl}}icon62.png?t={{Timestamp}}"></image>
</view>
</view>
</view>
<view class="row" wx:if="{{detail.SteroidDailyDose}}">
<view class="label">最新激素用量</view>
<view class="num">{{detail.SteroidDailyDose}}mg</view>
<view class="tag" wx:if="{{detail.SteroidDailyDose<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{detail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{detail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{detail.SteroidDailyDoseChange}}mg
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{detail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{detail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{detail.SteroidDailyDoseChange}}mg
</view>
</view>
</view>
<view class="d-row" wx:if="{{detail.LastUseDrugsTime}}">
<view class="label">最近用药</view>
<view class="content">
{{detail.LastUseDrugsTime}}
<block wx:if="{{detail.LastUseDrugsTimeName}}">({{detail.LastUseDrugsTimeName}})</block>
</view>
</view>
<view class="d-row" wx:if="{{detail.DoctorRemark}}">
<view class="label">备注</view>
<view class="content">{{detail.DoctorRemark}}</view>
<view class="date">入组时间:2025-08-10</view>
</view>
</view>
</view>
<view class="info-card">
<view class="ic-item">
<view class="label">抗体类型:</view>
<view class="content">{{antibodyTypeRangeList[detail.AntibodyType-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">既往发生危象:</view>
<view class="content">{{previousConvulsionRangeList[detail.PreviousConvulsion-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">胸腺异常:</view>
<view class="content">{{thyroidAbnormalRangeList[detail.ThyroidAbnormal-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">医保类型:</view>
<view class="content">{{medicalInsuranceTypeRangeList[detail.MedicalInsuranceType-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">免疫抑制剂:</view>
<view class="content">
{{traditionalImmunosuppressantRangeList[detail.TraditionalImmunosuppressant-1].value}}
</view>
</view>
<view class="edit" bind:tap="handleEditUser">
<image class="icon" src="{{imageUrl}}za-images/3/icon-edit-white.png?t={{Timestamp}}"></image>
编辑
</view>
</view>
<view class="b-footer">
<view class="send" bind:tap="handleSend">发消息</view>
<view class="remark" bind:tap="handleRemark">备注</view>
</view>
</view>
</view>
<view class="chart-container">
<view class="watermark">
<view class="p">本页面内容涉及患者个人信息</view>
<view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view>
<view class="p">不可用于其他用途</view>
<view class="p">【gMG给力加油站】</view>
</view>
<view class="container">
<view class="c-nav">
<view class="nav-item {{nav ==='0' && 'active'}}" data-index="0" bind:tap="handleNav">双达标测评报告</view>
<view class="nav-item {{nav ==='1' && 'active'}}" data-index="1" bind:tap="handleNav">双达标笔记</view>
</view>
<view class="filter">
<picker class="type" mode="selector" range="{{typeRange}}" range-key="value" bind:change="handleTypeChange">
{{typeName}}
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</picker>
<view class="range">
<picker
mode="date"
end="{{EndDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{StartDate}}"
bindchange="handleChange"
>
{{StartDate}}
</picker>
~
<picker
mode="date"
start="{{StartDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{EndDate}}"
bindchange="handleChange"
>
{{EndDate}}
</picker>
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</view>
</view>
<view hidden="{{nav!=='0'}}">
<view class="card">
<view class="w-header">
<view class="title">ADL评分记录曲线</view>
<view class="legend">
<view class="item">
<view class="logo"></view>
ADL分数
</view>
<view class="item">
<image class="icon" src="{{imageUrl}}za-imagesdouble-standard/adl-cure.png?t={{Timestamp}}"></image>
用药时间
</view>
</view>
</view>
<view class="column">
<ec-canvas id="chart3" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="w-header">
<view class="title">激素日用量记录曲线</view>
<view class="legend">
<view class="item">
<view class="logo hormone"></view>
激素用量
</view>
</view>
</view>
<view class="column">
<ec-canvas id="chart4" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="card">
<view class="pie">
<ec-canvas id="chart1" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="line"></view>
<view class="pie">
<ec-canvas id="chart2" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
</view>
<view hidden="{{nav !== '1'}}">
<view class="module" wx:for="{{adlList}}" wx:key="index">
<view class="module-header">
<view class="date">{{item.CreateTime || item.InjectionDate}}</view>
<view class="tags">
<view class="tag3" wx:if="{{item.IsInsuranceProject==1}}">商保项目记录</view>
</view>
</view>
<view class="module-container">
<view class="aside"></view>
<view style="flex: 1">
<view
class="m-card"
bind:tap="handleAdlDetail"
data-id="{{item.Id}}"
data-isi="{{item.IsInsuranceProject}}"
data-index="{{index}}"
>
<view class="card-header grade{{item.grade}}">
<view class="num">
{{item.TotalScore}}
<view class="sub">分</view>
</view>
<view class="num-detail">
<view class="n-item {{item.MedullaTypeScore >=7 && 'active'}}">
<view class="box">{{item.MedullaTypeScore}}</view>
<view class="name">延髓</view>
</view>
<view class="n-item {{item.BreathTypeScore>=3 && 'active'}}">
<view class="box">{{item.BreathTypeScore}}</view>
<view class="name">呼吸</view>
</view>
<view class="n-item {{item.LimbsTypeScore>=5 && 'active'}}">
<view class="box">{{item.LimbsTypeScore}}</view>
<view class="name">四肢</view>
</view>
<view class="n-item {{item.EyeTypeScore >=5 && 'active'}}">
<view class="box">{{item.EyeTypeScore}}</view>
<view class="name">眼睛</view>
</view>
</view>
</view>
<view class="card-container">
<view class="cc-title">注意事项</view>
<view class="cc-content">
<view class="line" wx:if="{{item.TotalScore < 5}}">
1 总分
<text decode="true ">&lt;</text>
<text class="red">5分</text>
,日常请注意观察
</view>
<view class="line" wx:elif="{{item.TotalScore >= 5}}">
1 总分
<text decode="true ">&gt;=</text>
<text class="red">5分</text>
,您的症状控制欠佳,建议必要时就医
</view>
<block wx:if="{{item.LastTotalScore !== null}}">
<view class="line" wx:if="{{item.TotalScore - item.LastTotalScore < 0 }}">
2 较上次得分变化
<text class="green">{{item.TotalScore - item.LastTotalScore }},有进步,加油!</text>
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore == 0 }}">
2 与上次得分一致,请继续保持
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore == 1 }}">
2 较上次得分变化
<text class="red">+{{item.TotalScore - item.LastTotalScore }},请继续关注!</text>
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore >= 0 }}">
2 较上次得分变化
<text class="red">+{{item.TotalScore - item.LastTotalScore }},需要重点关注!</text>
</view>
</block>
<view class="line" wx:if="{{item.EyeTypeScore / item.TotalScore < 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比
<text decode="true ">&lt;</text>
50%,以全身症状为主,应注意休息警惕病情加重
</view>
<view class="line" wx:elif="{{item.EyeTypeScore / item.TotalScore > 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比
<text decode="true ">&gt;</text>
50%,危象风险不高,请继续关注
</view>
<view class="line" wx:elif="{{item.EyeTypeScore / item.TotalScore == 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比=50%,危象风险不高,请继续关注
</view>
</view>
<view class="fold" wx:if="{{item.ResultsImgUrl}}">
<view class="fold-header" catch:tap="handleFold" data-index="{{index}}">
{{item.fold ? '展开':'收起'}}详细评测报告
<van-icon name="arrow-{{!item.fold ? 'up' : 'down'}}" />
</view>
<view class="fold-container {{item.fold && 'hide'}}">
<!-- <image class="fold-img" mode="widthFix" src="{{item.ResultsImgUrl}}" show-menu-by-longpress></image> -->
<view class="scurt">
<view class="s-header">
<view class="none"></view>
<view
class="bar"
style="background: url({{imageUrl}}za-images/1/adl-scurt.png?t={{Timestamp}}) no-repeat center / 100% 100% ;"
>
<view class="num">0分</view>
<view class="num">1分</view>
<view class="num">2分</view>
<view class="num">3分</view>
</view>
</view>
<view class="s-body">
<view class="s-aside">
<view class="sa-item sa-item1">延髓</view>
<view class="sa-item sa-item2">呼吸</view>
<view class="sa-item sa-item3">四肢</view>
<view class="sa-item sa-item4">眼肌</view>
</view>
<view class="s-container">
<view class="sc-row" wx:for="{{tableData}}" wx:for-item="subItem" wx:key="index">
<view class="sc-title">{{subItem.title}}</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 0}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 1}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 2}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 3}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class="drug-card"
wx:if="{{item.SteroidDailyDose}}"
bind:tap="handleAdlDetail"
data-id="{{item.Id}}"
data-isi="{{item.IsInsuranceProject}}"
data-index="{{index}}"
>
<view class="d-header">
<view class="name">激素用量</view>
<view class="status">
本次激素用量为
<text class="num">{{item.SteroidDailyDose}}mg</text>
/天
</view>
</view>
<view class="content" wx:if="{{item.SteroidDailyDose>5}}">距离达标还需努力,请遵医嘱规律治疗</view>
<view class="content" wx:else>恭喜达标,您的激素用量已少于95% 的患友</view>
</view>
<view class="row">
<view class="label">Graves病病史</view>
<view class="content">{{detail.IsGravesName}}</view>
</view>
<view class="row">
<view class="label">
TED(甲状腺眼突)
<view></view>
及其相关眼部手术史
</view>
<view class="content">{{detail.HasTedSurgeryName}}</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
<view class="edc-card" bind:tap="handleEDC">
<image wx:if="{{detail.IsEDC==1}}" class="icon" src="{{imageUrl}}icon50.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon66.png?t={{Timestamp}}"></image>
<view class="content">标识为EDC患者</view>
</view>
<view class="footer">
<view class="btn" bind:tap="handleSend">发消息</view>
<view class="btn" bind:tap="handleRemark">备注</view>
</view>
</view>
@ -578,11 +186,3 @@ @@ -578,11 +186,3 @@
</view>
</view>
</van-popup>
<toast
bind:cancel="handleToastCancel"
bind:ok="handleToastOk"
show="{{toastShow}}"
type="{{toastType}}"
params="{{toastParams}}"
></toast>

57
src/pages/d_userInfo/index.scss

@ -2,48 +2,21 @@ page { @@ -2,48 +2,21 @@ page {
background: #f2f4f5;
}
.page {
padding: 164rpx 30rpx 40rpx;
padding: 32rpx 30rpx 40rpx;
.container {
position: relative;
padding: 92rpx 30rpx 64rpx;
padding: 0 32rpx 64rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.avatar {
position: absolute;
top: -90rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.avatar-user {
flex-shrink: 0;
width: 156rpx;
height: 156rpx;
border-radius: 50%;
}
.edit {
margin-top: -15rpx;
padding: 8rpx 24rpx;
background: #f2f4f5;
border-radius: 108rpx 108rpx 108rpx 108rpx;
font-size: 24rpx;
color: rgba(40, 48, 49, 1);
display: flex;
align-items: center;
line-height: 1;
.icon {
margin-right: 8rpx;
width: 24rpx;
height: 24rpx;
}
}
}
.row {
margin-top: 64rpx;
padding: 32rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(173, 172, 178, 0.1);
&:last-of-type {
border: none;
}
.label {
flex-shrink: 0;
font-size: 32rpx;
@ -51,16 +24,24 @@ page { @@ -51,16 +24,24 @@ page {
width: 6em;
}
.switch-row {
flex: 1;
display: flex;
justify-content: flex-end;
.switch {
transform: scale(0.8);
}
}
.avatar {
flex: 1;
.avatar-user {
width: 156rpx;
height: 156rpx;
border-radius: 50%;
}
}
.content {
flex: 1;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
color: rgba(33, 29, 46, 1);
}
.option {
flex-shrink: 0;
@ -68,7 +49,7 @@ page { @@ -68,7 +49,7 @@ page {
align-items: center;
.change {
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
color: rgba(185, 130, 255, 1);
}
.icon {
color: #d4d9da;

116
src/pages/d_userInfo/index.ts

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
const app = getApp<IAppOption>();
const app = getApp<IAppOption>()
Page({
data: {
@ -57,9 +57,9 @@ Page({ @@ -57,9 +57,9 @@ Page({
onLoad() {},
onShow() {
app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' });
this.getDetail();
});
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' })
this.getDetail()
})
},
getDetail() {
wx.ajax({
@ -67,28 +67,28 @@ Page({ @@ -67,28 +67,28 @@ Page({
url: '?r=zd/doctor/account/info',
data: {},
}).then((res) => {
const { ClinicList } = this.data;
const { ClinicList } = this.data
let weekName = '';
let weekName = ''
if (res.doctor.ClinicType == 2) {
weekName = res.doctor.Clinic;
weekName = res.doctor.Clinic
} else {
(res.doctor.Clinic ? res.doctor.Clinic : []).forEach((subItem: any) => {
;(res.doctor.Clinic ? res.doctor.Clinic : []).forEach((subItem: any) => {
if (subItem.timeType == 1) {
ClinicList[subItem.weekday - 1].timeTypeActive1 = true;
ClinicList[subItem.weekday - 1].timeTypeActive1 = true
}
if (subItem.timeType == 2) {
ClinicList[subItem.weekday - 1].timeTypeActive2 = true;
ClinicList[subItem.weekday - 1].timeTypeActive2 = true
}
});
})
weekName = (res.doctor.Clinic ? res.doctor.Clinic : [])
.map((subItem: { weekday: string | number; timeType: string | number }) => {
const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
const timeDay = { 1: '上午', 2: '下午' };
return `${week[Number(subItem.weekday) - 1]}${timeDay[subItem.timeType]}`;
const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
const timeDay = { 1: '上午', 2: '下午' }
return `${week[Number(subItem.weekday) - 1]}${timeDay[subItem.timeType]}`
})
.join(',');
.join(',')
}
this.setData({
@ -99,68 +99,68 @@ Page({ @@ -99,68 +99,68 @@ Page({
},
hospital: res.hospital,
ClinicList,
});
});
})
})
},
handleChangeClinicType(e) {
const value = e.detail.value;
const value = e.detail.value
if (value) {
this.setData({
'doctor.ClinicType': 2,
'doctor.Clinic': '',
'doctor.weekName': '',
});
})
} else {
this.setData({
'doctor.ClinicType': 1,
'doctor.Clinic': [],
'doctor.weekName': '',
});
})
}
this.handleWeekIntroduceSubmit();
this.handleWeekIntroduceSubmit()
},
handleChangePhone() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' })
wx.navigateTo({
url: '/doctor/pages/d_changePhone/index',
});
})
},
handleWeek() {
const { doctor } = this.data;
const { doctor } = this.data
this.setData({
PopupClinic: Array.isArray(doctor.Clinic) ? '' : doctor.Clinic,
popupDateShow: true,
});
})
setTimeout(() => {
this.setData({
popupDateFocus: true,
});
}, 300);
})
}, 300)
},
handleWeekSelect(e) {
const { type, index } = e.currentTarget.dataset;
const ClinicList = this.data.ClinicList;
ClinicList[index][`timeTypeActive${type}`] = !ClinicList[index][`timeTypeActive${type}`];
const { type, index } = e.currentTarget.dataset
const ClinicList = this.data.ClinicList
ClinicList[index][`timeTypeActive${type}`] = !ClinicList[index][`timeTypeActive${type}`]
this.setData({
ClinicList,
});
})
},
handleWeekIntroduceSubmit() {
const { doctor, PopupClinic } = this.data;
let Clinic = '';
const { doctor, PopupClinic } = this.data
let Clinic = ''
if (doctor.ClinicType == 2) {
Clinic = PopupClinic;
Clinic = PopupClinic
} else {
const ClinicList = this.data.ClinicList;
const ClinicList = this.data.ClinicList
Clinic = ClinicList.reduce((pre, cur) => {
if (cur.timeTypeActive1) {
pre.push({ weekday: cur.weekday, timeType: 1 });
pre.push({ weekday: cur.weekday, timeType: 1 })
}
if (cur.timeTypeActive2) {
pre.push({ weekday: cur.weekday, timeType: 2 });
pre.push({ weekday: cur.weekday, timeType: 2 })
}
return pre;
}, [] as any);
return pre
}, [] as any)
}
wx.ajax({
method: 'POST',
@ -171,25 +171,25 @@ Page({ @@ -171,25 +171,25 @@ Page({
ClinicType: doctor.ClinicType,
},
}).then(() => {
this.onClose();
});
this.onClose()
})
},
handleBrief() {
this.setData({
popupBriefShow: true,
});
})
setTimeout(() => {
this.setData({
popupBriefFocus: true,
});
}, 300);
})
}, 300)
},
handleBriefInput(e) {
const doctor = this.data.doctor;
doctor.Introduce = e.detail.value;
const doctor = this.data.doctor
doctor.Introduce = e.detail.value
this.setData({
doctor,
});
})
},
onClose() {
this.setData({
@ -197,14 +197,14 @@ Page({ @@ -197,14 +197,14 @@ Page({
popupBriefShow: false,
popupBriefFocus: false,
popupDateFocus: false,
});
this.getDetail();
})
this.getDetail()
},
handleSwitch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' });
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' })
wx.navigateTo({
url: '/doctor/pages/d_changeDoctor/index',
});
})
},
handleLoginOut() {
wx.showModal({
@ -217,15 +217,15 @@ Page({ @@ -217,15 +217,15 @@ Page({
url: '?r=zd/doctor/account/reg-logout',
data: {},
}).then((_res) => {
app.globalData.loginType = 1;
app.globalData.anyWhere = true;
app.globalData.first = true;
app.globalData.loginType = 1
app.globalData.anyWhere = true
app.globalData.first = true
wx.reLaunch({
url: '/pages/login/index',
});
});
})
})
}
},
});
})
},
});
})

12
src/pages/d_userInfo/index.wxml

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
<view class="page">
<view class="container">
<view class="row">
<view class="label">头像</view>
<view class="avatar">
<image class="avatar-user" mode="aspectFill" src="{{doctor.Img}}"></image>
<!-- <view class="edit"> -->
<!-- <image class="icon" src="{{imageUrl}}/doctor/icon-edit.png?t={{Timestamp}}"></image> -->
<!-- 更换 -->
<!-- </view> -->
</view>
<view class="option"></view>
</view>
<view class="row">
<view class="label">姓名</view>
@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
<switch
class="switch"
checked="{{doctor.ClinicType==2}}"
color="#67baca"
color="#b683fe"
bind:change="handleChangeClinicType"
></switch>
</view>
@ -36,12 +36,10 @@ @@ -36,12 +36,10 @@
<view class="row" bind:tap="handleWeek">
<view class="label">门诊时间</view>
<view class="content pre-line">{{doctor.weekName || '暂无'}}</view>
<view class="option"><van-icon class="icon" name="arrow" /></view>
</view>
<view class="row" bind:tap="handleBrief">
<view class="label">个人简介</view>
<view class="content">{{doctor.Introduce || '暂无'}}</view>
<view class="option"><van-icon class="icon" name="arrow" /></view>
</view>
</view>
<!-- <view class="switch-btn" bind:tap="handleSwitch">切换账号</view> -->

51
src/pages/home/index.scss

@ -57,6 +57,57 @@ page { @@ -57,6 +57,57 @@ page {
}
}
}
.stat {
margin-top: 48rpx;
.s-header {
.title {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
}
.s-container {
margin-top: 24rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30rpx;
.card {
padding: 32rpx;
background-color: #fff;
border-radius: 24rpx;
display: flex;
gap: 22rpx;
.icon {
width: 84rpx;
height: 84rpx;
}
.content {
.text {
display: flex;
align-items: center;
gap: 8rpx;
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
line-height: 36rpx;
.question {
width: 28rpx;
height: 28rpx;
}
}
.num {
margin-top: 16rpx;
font-size: 48rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
.sub {
font-size: 24rpx;
color: rgba(173, 172, 178, 1);
}
}
}
}
}
}
.banner {
margin-top: 50rpx;
display: grid;

184
src/pages/home/index.ts

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
import dayjs from 'dayjs';
import dayjs from 'dayjs'
const app = getApp<IAppOption>();
const app = getApp<IAppOption>()
Page({
data: {
@ -39,18 +39,18 @@ Page({ @@ -39,18 +39,18 @@ Page({
},
onShow() {
app.waitLogin({ type: [2] }).then(() => {
this.getNotice();
this.getBanner();
this.getBriefingList();
this.getSopList();
this.getList();
this.getNotice()
this.getBanner()
this.getBriefingList()
this.getSopList()
this.getList()
app.getUserInfo(2).then((userInfo) => {
this.setData({
userInfo,
});
this.getTab();
});
});
})
this.getTab()
})
})
},
getTab() {
wx.ajax({
@ -66,19 +66,19 @@ Page({ @@ -66,19 +66,19 @@ Page({
close: true,
...this.data.userInfo,
},
});
})
}
});
})
},
handleWebview() {
// wx.showToast({
// title: '访问路径:公众号“TED关爱中心”底部菜单栏',
// icon: 'none',
// });
const encodeUrl = encodeURIComponent('https://dct.meddb.cn');
const encodeUrl = encodeURIComponent('https://dct.meddb.cn')
wx.navigateTo({
url: `/pages/webview/index?url=${encodeUrl}`,
});
})
},
getNotice() {
wx.ajax({
@ -87,49 +87,49 @@ Page({ @@ -87,49 +87,49 @@ Page({
data: {},
}).then((res) => {
if (res.list.length) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id });
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id })
}
this.setData({
notice: res.list.map((item) => {
item.year = dayjs(item.PublishDate).format('YYYY');
item.month = dayjs(item.PublishDate).format('MM');
item.day = dayjs(item.PublishDate).format('DD');
return item;
item.year = dayjs(item.PublishDate).format('YYYY')
item.month = dayjs(item.PublishDate).format('MM')
item.day = dayjs(item.PublishDate).format('DD')
return item
}),
});
});
})
})
},
handleNotice() {
wx.navigateTo({
url: '/pages/message/index',
});
})
},
handleNoticeDetail(e) {
const { index } = e.currentTarget.dataset;
const { Id, Url } = this.data.notice[index];
app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id });
const { index } = e.currentTarget.dataset
const { Id, Url } = this.data.notice[index]
app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id })
if (Url) {
wx.navigateTo({
url: Url,
fail() {
wx.reLaunch({
url: Url,
});
})
},
});
})
} else {
this.handleNotice();
this.handleNotice()
}
},
handleSwiperChange(e) {
const current = e.detail.current;
const current = e.detail.current
this.setData({
current: e.detail.current,
});
})
const { Id } = this.data.notice[current] || {};
const { Id } = this.data.notice[current] || {}
if (Id) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id });
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id })
}
},
getBanner() {
@ -142,21 +142,21 @@ Page({ @@ -142,21 +142,21 @@ Page({
}).then((res) => {
this.setData({
bannerList: res.list,
});
});
})
})
},
handleBanner(e) {
const { index } = e.currentTarget.dataset;
const { LinkUrl } = this.data.bannerList[index];
if (!LinkUrl) return;
const { index } = e.currentTarget.dataset
const { LinkUrl } = this.data.bannerList[index]
if (!LinkUrl) return
wx.navigateTo({
url: LinkUrl,
fail() {
wx.switchTab({
url: LinkUrl,
});
})
},
});
})
},
getBriefingList() {
wx.ajax({
@ -168,12 +168,12 @@ Page({ @@ -168,12 +168,12 @@ Page({
},
}).then((res) => {
res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD');
});
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD')
})
this.setData({
briefingList: res.list,
});
});
})
})
},
getSopList() {
wx.ajax({
@ -185,12 +185,12 @@ Page({ @@ -185,12 +185,12 @@ Page({
},
}).then((res) => {
res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD');
});
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD')
})
this.setData({
sopList: res.list,
});
});
})
})
},
getList() {
wx.ajax({
@ -202,44 +202,44 @@ Page({ @@ -202,44 +202,44 @@ Page({
},
}).then((res) => {
res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD');
item.FileType = item.FileList[0]?.FileType || '';
});
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD')
item.FileType = item.FileList[0]?.FileType || ''
})
this.setData({
list: res.list,
});
});
})
})
},
handleBriefingDetail(e: any) {
const { id } = e.currentTarget.dataset;
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`,
});
})
},
handleSop(e) {
const { index } = e.currentTarget.dataset;
const { Id, FileList } = this.data.sopList[index];
const params: any = FileList[0];
const { index } = e.currentTarget.dataset
const { Id, FileList } = this.data.sopList[index]
const params: any = FileList[0]
if (!params) {
return;
return
}
wx.showLoading({
title: '加载中',
mask: true,
});
app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string });
this.handleFile(params);
})
app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string })
this.handleFile(params)
},
handleDetail(e: any) {
const { id, index } = e.currentTarget.dataset;
const params = this.data.list[index];
const { id, index } = e.currentTarget.dataset
const params = this.data.list[index]
if (params.ContentType === '5' && params.FileList[0]) {
app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string });
this.handleFile(params.FileList[0]);
app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string })
this.handleFile(params.FileList[0])
} else {
wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`,
});
})
}
},
handleFile({ FileUrl, FileName }) {
@ -252,43 +252,49 @@ Page({ @@ -252,43 +252,49 @@ Page({
showMenu: false,
filePath: res.filePath,
success: () => {
wx.hideLoading();
wx.hideLoading()
},
fail: () => {
wx.showToast({
title: '下载文件失败',
icon: 'none',
});
wx.hideLoading();
})
wx.hideLoading()
},
});
})
} else {
wx.hideLoading();
wx.hideLoading()
wx.showToast({
title: '下载文件失败',
icon: 'none',
});
})
}
},
fail() {
wx.hideLoading();
wx.hideLoading()
wx.showToast({
title: '下载文件失败',
icon: 'none',
});
})
},
});
})
},
handleMore() {
wx.switchTab({
url: '/pages/information/index',
});
})
},
handlePatient() {
wx.navigateTo({
url: '/pages/d_patient/index',
})
},
handlePopupOk() {
const { popupType } = this.data;
const { popupType } = this.data
},
handlePopupCancel() {
const { popupType } = this.data;
const { popupType } = this.data
if (popupType === 'popup1') {
wx.ajax({
method: 'POST',
@ -299,28 +305,28 @@ Page({ @@ -299,28 +305,28 @@ Page({
popupShow: false,
popupType: '',
popupParams: {},
});
});
return;
})
})
return
}
this.setData({
popupShow: false,
});
})
},
onShareAppMessage(e) {
if (e.from === 'button') {
const { Title, CoverImgUrl, Id } = e.target.dataset.params;
app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id });
const { Title, CoverImgUrl, Id } = e.target.dataset.params
app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id })
return {
title: Title,
path: `/pages/informationDetail/index?id=${Id}`,
imageUrl: CoverImgUrl,
};
}
}
return {
imageUrl: `${app.globalData.imageUrl}share.png?t=${this.data.Timestamp}`,
};
}
},
});
})
export {};
export {}

63
src/pages/home/index.wxml

@ -143,6 +143,65 @@ @@ -143,6 +143,65 @@
</view>
</view>
</view>
<view class="stat" bind:tap="handlePatient">
<view class="s-header">
<view class="title">统计数据截止到昨天</view>
</view>
<view class="s-container">
<view class="card">
<image class="icon" src="{{imageUrl}}icon52.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
100
<text class="sub">人</text>
</view>
</view>
</view>
<view class="card">
<image class="icon" src="{{imageUrl}}icon53.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
10
<text class="sub">人</text>
</view>
</view>
</view>
<view class="card">
<image class="icon" src="{{imageUrl}}icon45.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
100
<text class="sub">人</text>
</view>
</view>
</view>
<view class="card">
<image class="icon" src="{{imageUrl}}icon54.png?t={{Timestamp}}"></image>
<view class="content">
<view class="text">
总病例数
<image class="question" src="{{imageUrl}}icon46.png?t={{Timestamp}}"></image>
</view>
<view class="num">
100
<text class="sub">人</text>
</view>
</view>
</view>
</view>
</view>
<view class="ad" wx:if="{{bannerList.length > 0}}">
<swiper
class="swiper"
@ -165,10 +224,6 @@ @@ -165,10 +224,6 @@
<view class="briefing" wx:if="{{briefingList.length > 0}}">
<view class="b-header">
<image class="title" src="{{imageUrl}}title4.png?t={{Timestamp}}"></image>
<!-- <view class="more"> -->
<!-- 查看全部 -->
<!-- <van-icon name="arrow" /> -->
<!-- </view> -->
</view>
<view class="scroll">
<image

96
src/pages/login/index.ts

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
const app = getApp<IAppOption>();
let timer = null as null | number;
const app = getApp<IAppOption>()
let timer = null as null | number
Page({
data: {
@ -19,22 +19,22 @@ Page({ @@ -19,22 +19,22 @@ Page({
},
onLoad() {},
getCode() {
if (timer) return;
const mobile = this.data.mobile;
if (timer) return
const mobile = this.data.mobile
if (!mobile) {
wx.showToast({
title: '手机号不能为空',
icon: 'none',
});
return;
})
return
}
// 验证手机号
if (!/^1[3-9,]\d{9}$/.test(mobile)) {
wx.showToast({
title: '手机号格式不正确',
icon: 'none',
});
return;
})
return
}
wx.ajax({
method: 'POST',
@ -46,56 +46,56 @@ Page({ @@ -46,56 +46,56 @@ Page({
wx.showToast({
icon: 'none',
title: '验证码已发送~',
});
let time = 60;
})
let time = 60
timer = setInterval(() => {
time--;
time--
this.setData({
codeText: `${time}s后重新发送`,
});
})
if (time <= 0) {
clearInterval(timer as number);
timer = null;
clearInterval(timer as number)
timer = null
this.setData({
codeText: '发送验证码',
});
})
}
}, 1000);
});
}, 1000)
})
},
handleCheck() {
this.setData({
check1: !this.data.check1,
});
})
},
handleDocRule() {
const { check1 } = this.data;
const { check1 } = this.data
return new Promise((resolve) => {
if (check1) {
return resolve(true);
return resolve(true)
}
wx.showToast({
title: '请同意相关协议',
icon: 'none',
});
});
})
})
},
async handleSubmit() {
await this.handleDocRule();
const { mobile, code } = this.data;
await this.handleDocRule()
const { mobile, code } = this.data
if (!mobile) {
wx.showToast({
title: '请输入手机号',
icon: 'none',
});
return;
})
return
}
if (!code) {
wx.showToast({
title: '请输入验证码',
icon: 'none',
});
return;
})
return
}
wx.ajax({
method: 'POST',
@ -107,21 +107,21 @@ Page({ @@ -107,21 +107,21 @@ Page({
showMsg: false,
})
.then(() => {
this.submitCallback();
this.submitCallback()
})
.catch((err) => {
if (err.data.code == 100) {
this.handleShowPopup();
this.handleShowPopup()
} else if (err.data.msg) {
wx.showToast({
title: err.data.msg,
icon: 'none',
});
})
}
});
})
},
handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
const { iv, encryptedData } = e.detail;
const { iv, encryptedData } = e.detail
if (iv && encryptedData) {
wx.ajax({
method: 'POST',
@ -133,18 +133,18 @@ Page({ @@ -133,18 +133,18 @@ Page({
showMsg: false,
})
.then(() => {
this.submitCallback();
this.submitCallback()
})
.catch((err) => {
if (err.data.code == 100) {
this.handleShowPopup();
this.handleShowPopup()
} else if (err.data.msg) {
wx.showToast({
title: err.data.msg,
icon: 'none',
});
})
}
});
})
}
},
submitCallback() {
@ -153,19 +153,19 @@ Page({ @@ -153,19 +153,19 @@ Page({
if (res.loginType == 2) {
wx.reLaunch({
url: '/pages/home/index',
});
})
} else {
this.handleShowPopup();
this.handleShowPopup()
}
} else {
this.handleShowPopup();
this.handleShowPopup()
}
});
})
},
handlePatient() {
wx.reLaunch({
url: '/patient/pages/login/index',
});
})
},
handleShowPopup() {
this.setData({
@ -174,23 +174,23 @@ Page({ @@ -174,23 +174,23 @@ Page({
popupParams: {
close: true,
},
});
})
},
handleShowTel() {
this.setData({
showTel: !this.data.showTel,
});
})
},
handleLink() {
wx.navigateTo({
url: '/doc/pages/doc1/index',
});
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
});
})
},
});
})
export {};
export {}

8
src/pages/my/index.scss

@ -44,7 +44,7 @@ page { @@ -44,7 +44,7 @@ page {
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
padding: 2rpx 10rpx;
background: #8c75d0;
background: linear-gradient(90deg, #ffd650 0%, #f8a61a 100%);
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
@ -55,6 +55,12 @@ page { @@ -55,6 +55,12 @@ page {
height: 48rpx;
}
}
.invite-card {
margin-top: 48rpx;
display: block;
width: 100%;
max-height: 200rpx;
}
.list {
margin-top: 32rpx;
padding: 0 32rpx;

66
src/pages/my/index.ts

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
const app = getApp<IAppOption>();
const app = getApp<IAppOption>()
Page({
data: {
@ -15,20 +15,20 @@ Page({ @@ -15,20 +15,20 @@ Page({
},
onShow() {
app.waitLogin({ type: [2] }).then(() => {
this.getUserInfo();
});
this.getUserInfo()
})
},
getUserInfo() {
app.getUserInfo(2).then((userInfo) => {
this.setData({
userInfo,
});
});
})
})
},
handleLogin() {
wx.navigateTo({
url: '/pages/login/index',
});
})
},
handleLoginOut() {
wx.showModal({
@ -44,31 +44,31 @@ Page({ @@ -44,31 +44,31 @@ Page({
app.startLogin(() => {
wx.reLaunch({
url: '/pages/start/index',
});
});
});
})
})
})
}
},
});
})
},
handleEditUser() {
wx.navigateTo({
url: '/pages/userInfo/index',
});
})
},
onChooseAvatar(e) {
const { avatarUrl } = e.detail;
const url = `${app.globalData.upFileUrl}?r=file-service/upload-img`;
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;
const data = JSON.parse(res.data)
const avatarUrl = data.data.Url
wx.ajax({
method: 'POST',
url: '?r=xd/doctor/index/update-doctor-img',
@ -77,28 +77,28 @@ Page({ @@ -77,28 +77,28 @@ Page({
},
})
.then(() => {
wx.hideLoading();
wx.hideLoading()
wx.showToast({
title: '头像更新成功!',
icon: 'none',
});
})
this.setData({
'userInfo.Img': avatarUrl,
});
})
})
.catch(() => {
wx.hideLoading();
});
wx.hideLoading()
})
},
fail() {
wx.hideLoading();
wx.hideLoading()
},
});
})
},
handleDoc() {
wx.navigateTo({
url: '/doc/pages/doc1/index',
});
})
},
handlePublic() {
this.setData({
@ -107,7 +107,7 @@ Page({ @@ -107,7 +107,7 @@ Page({
popupParams: {
close: true,
},
});
})
},
handleQuestion() {
this.setData({
@ -116,11 +116,21 @@ Page({ @@ -116,11 +116,21 @@ Page({
popupParams: {
close: true,
},
});
})
},
handleUserInfo() {
wx.navigateTo({
url: '/pages/d_userInfo/index',
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
});
})
},
handleInvite() {
wx.navigateTo({
url: '/pages/d_invite/index',
})
},
});
})

11
src/pages/my/index.wxml

@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
<navbar fixed title="我的" custom-style="background:{{background}}" back>
</navbar>
<navbar fixed title="我的" custom-style="background:{{background}}" back></navbar>
<view
class="page"
style="background: url('{{imageUrl}}bg1.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+21}}px;"
>
<view class="user">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
@ -17,7 +16,13 @@ @@ -17,7 +16,13 @@
</view>
<!-- <image class="edit" src="{{imageUrl}}icon2.png?t={{Timestamp}}"></image> -->
</view>
<image class="invite-card" mode="widthFix" src="{{imageUrl}}invite-card.png?t={{Timestamp}}" bind:tap="handleInvite"></image>
<view class="list">
<view class="list-item" bind:tap="handleUserInfo">
<image class="icon" src="{{imageUrl}}icon51.png?t={{Timestamp}}"></image>
<view class="content">个人信息</view>
<image class="more" src="{{imageUrl}}icon3?t={{Timestamp}}"></image>
</view>
<view class="list-item" bind:tap="handleDoc">
<image class="icon" src="{{imageUrl}}icon4.png?t={{Timestamp}}"></image>
<view class="content">隐私协议</view>

4
src/pages/start/index.scss

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
.page{
width: 100vw;
height: 100vh;
}

1
src/pages/start/index.wxml

@ -0,0 +1 @@ @@ -0,0 +1 @@
<image class="page" mode="aspectFill" src="{{imageUrl}}start.png?t={{Timestamp}}"></image>

2
src/patient/pages/adlResult/index.ts

@ -200,7 +200,7 @@ Page({ @@ -200,7 +200,7 @@ Page({
wx.showModal({
title: '确认重新测试?',
content: '重新测试后,此次评测结果将自动删除',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.confirm) {
wx.ajax({

2
src/patient/pages/adlShare/index.ts

@ -64,7 +64,7 @@ Page({ @@ -64,7 +64,7 @@ Page({
wx.showModal({
title: '请求授权相册权限',
content: '需要保存海报到相册,请确认授权',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success (res) {
if (res.cancel) {
//取消授权

1
src/patient/pages/cancellation/index.scss

@ -27,6 +27,7 @@ page { @@ -27,6 +27,7 @@ page {
border-radius: 24rpx;
color: rgba(173, 172, 178, 1);
background-color: #fff;
text-align: left;
}
.footer {
margin-top: 80rpx;

2
src/patient/pages/cancellation/index.ts

@ -21,7 +21,7 @@ Page({ @@ -21,7 +21,7 @@ Page({
wx.showModal({
title: '确认注销',
content: '',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.confirm) {
wx.ajax({

2
src/patient/pages/cancellation/index.wxml

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<view class="page">
<view class="container">
<view class="banner">
<image class="icon" src="/images/icon44.png"></image>
<image class="icon" src="{{imageUrl}}icon44.png?t={{Timestamp}}"></image>
<view class="title">注销后数据不可恢复 请谨慎操作</view>
<view class="tip">
注销账号后,系统会删除当前患者的全部信息和数据,包括基础信息数据,患者的健康记录数据,若您有亲友号绑定此患者,则亲友号也将同步自动注销。您注销后若重新注册,则为全新身份在平台内使用,原有的数据无法恢复。

5
src/patient/pages/certReslove/index.scss

@ -78,11 +78,10 @@ @@ -78,11 +78,10 @@
height: 88rpx;
line-height: 88rpx;
text-align: center;
border: 2rpx solid #e04775;
border-radius: 24rpx;
border-radius: 100rpx;
font-size: 34rpx;
font-weight: bold;
background-color: #e04775;
background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%);
color: #fff;
}
}

2
src/patient/pages/certReslove/index.wxml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<view class="page">
<!-- <image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-mask-bg.png?t={{Timestamp}}"></image> -->
<image class="bg" mode="aspectFill" src="{{imageUrl}}za-images/1/start.png?t={{Timestamp}}"></image>
<image class="bg" mode="aspectFill" src="{{imageUrl}}start.png?t={{Timestamp}}"></image>
<view class="page-container">
<!-- <pageNavbar drug="{{drug}}"></pageNavbar> -->
<!-- <image class="page-icon" src="{{imageUrl}}za-images/1/cert-reslove.png?t={{Timestamp}}"></image> -->

2
src/patient/pages/doctor/index.ts

@ -93,7 +93,7 @@ Page({ @@ -93,7 +93,7 @@ Page({
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权

11
src/patient/pages/doctorDetail/index.scss

@ -29,10 +29,14 @@ page { @@ -29,10 +29,14 @@ page {
font-weight: bold;
line-height: 48rpx;
.label {
margin-left: 10rpx;
display: inline;
font-weight: normal;
font-size: 28rpx;
color: rgba(105, 104, 110, 1);
.line {
margin: 0 6rpx;
}
}
}
.hostipal {
@ -44,7 +48,7 @@ page { @@ -44,7 +48,7 @@ page {
margin-right: 12rpx;
display: inline-block;
flex-shrink: 0;
padding: 4rpx 12rpx;
padding: 2rpx 12rpx;
font-size: 22rpx;
color: #fff;
border-radius: 8rpx;
@ -81,14 +85,15 @@ page { @@ -81,14 +85,15 @@ page {
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
.r-title {
width: 128rpx;
height: 32rpx;
width: 116rpx;
height: 42rpx;
}
.r-content {
margin-top: 16rpx;
font-size: 28rpx;
color: rgba(105, 104, 110, 1);
line-height: 44rpx;
white-space: pre-line;
}
}
}

2
src/patient/pages/doctorDetail/index.ts

@ -38,7 +38,7 @@ Page({ @@ -38,7 +38,7 @@ Page({
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权

21
src/patient/pages/doctorDetail/index.wxml

@ -11,14 +11,17 @@ @@ -11,14 +11,17 @@
</view>
<view class="name">
{{detail.Name}}
<view class="label">主任医生 | 眼科</view>
<view class="label">
{{detail.JobTitle}}
<text class="line" wx:if="{{detail.JobTitle && detail.Department}}">|</text>
{{detail.Department}}
</view>
</view>
<view class="hostipal">
<view class="tag">三级甲等</view>
<view class="tag" wx:if="{{detail.hospital.HospitalClassificationName || detail.hospital.HospitalLevelName}}">
{{detail.hospital.HospitalClassificationName}}{{detail.hospital.HospitalLevelName}}
</view>
{{detail.hospital.Name}}
<!-- <view class="tag" wx:if="{{detail.hospital.HospitalClassificationName || detail.hospital.HospitalLevelName}}"> -->
<!-- {{detail.hospital.HospitalClassificationName}}{{detail.hospital.HospitalLevelName}} -->
<!-- </view> -->
</view>
<view class="card">
<view
@ -26,25 +29,25 @@ @@ -26,25 +29,25 @@
bind:tap="handleOpenMap"
wx:if="{{detail.hospital.ProvinceName || detail.hospital.CityName || detail.hospital.CountyName || detail.hospital.Address}}"
>
<image class="icon" src="/images/icon41.png"></image>
<image class="icon" src="{{imageUrl}}icon41.png?t={{Timestamp}}"></image>
<view>
{{detail.hospital.ProvinceName}}{{detail.hospital.CityName}}{{detail.hospital.CountyName}}{{detail.hospital.Address}}
<view class="site-num">{{detail.hospital.dist}}</view>
</view>
</view>
<view class="c-row" bind:tap="handlePhone" wx:if="{{ detail.Telephone }}">
<image class="icon" src="/images/icon42.png"></image>
<image class="icon" src="{{imageUrl}}icon42.png?t={{Timestamp}}"></image>
{{ detail.Telephone }}
</view>
</view>
</view>
<view class="info-card" wx:if="{{detail.Introduce}}">
<image class="r-title" src="{{imageUrl}}za-images//doctor/my-title1.png?t={{Timestamp}}"></image>
<image class="r-title" src="{{imageUrl}}title8.png?t={{Timestamp}}"></image>
<view class="r-content">{{detail.Introduce}}</view>
</view>
<view class="info-card" wx:if="{{detail.weekName}}">
<image class="r-title" src="{{imageUrl}}za-images//doctor/my-title2.png?t={{Timestamp}}"></image>
<image class="r-title" src="{{imageUrl}}title9.png?t={{Timestamp}}"></image>
<view class="r-content pre-line">{{detail.weekName}}</view>
</view>
</view>

6
src/patient/pages/enterInfo/index.scss

@ -133,7 +133,7 @@ @@ -133,7 +133,7 @@
flex: 1;
padding: 12rpx 62rpx;
opacity: 1;
border: 2rpx solid #cccccc;
border: 2rpx solid rgba(246, 248, 249, 1);
font-size: 32rpx;
color: rgba(173, 172, 178, 1);
display: flex;
@ -163,10 +163,12 @@ @@ -163,10 +163,12 @@
justify-content: center;
border-radius: 150rpx;
box-sizing: border-box;
border: 2rpx solid #d2d2d2;
border: 2rpx solid rgba(246, 248, 249, 1);
background-color: rgba(246, 248, 249, 1);
&.active {
color: rgba(185, 130, 255, 1);
border-color: rgba(185, 130, 255, 1);
background-color: transparent;
}
}
}

48
src/patient/pages/enterInfo/index.ts

@ -10,6 +10,8 @@ Page({ @@ -10,6 +10,8 @@ Page({
ageRange: '',
diagnosisTime: '',
diagnoseType: '',
IsGraves: '',
HasTedSurgery: '',
diagnoseTypeShow: false,
DiagnoseType: app.globalData.DiagnoseType,
@ -21,13 +23,16 @@ Page({ @@ -21,13 +23,16 @@ Page({
submiting: false,
proces: '0',
dict: {},
},
onLoad(options) {
this.setData({
pagePath: options.page,
proces: options.proces,
})
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.waitLogin().then(() => {
this.getDict()
app.getZdUserInfo(this, true, (zdUserInfo) => {
this.setData({
relationType: zdUserInfo.RelationType || '1',
@ -39,6 +44,17 @@ Page({ @@ -39,6 +44,17 @@ Page({
app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' })
})
},
getDict() {
wx.ajax({
method: 'GET',
url: '?r=xd/user/get-dict',
data: {},
}).then((res) => {
this.setData({
dict: res,
})
})
},
handleRelationType(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset
this.setData({
@ -57,10 +73,22 @@ Page({ @@ -57,10 +73,22 @@ Page({
ageRange: id,
})
},
handleSelectIsGraves(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset
this.setData({
IsGraves: id,
})
},
handleSelectHasTedSurgery(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset
this.setData({
HasTedSurgery: id,
})
},
handleSubmit() {
if (this.data.submiting) return
app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' })
const { name, gender, ageRange, relationType } = this.data
const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData
const { doctorId, inviteChan } = app.globalData.scene
let toast = ''
@ -95,6 +123,8 @@ Page({ @@ -95,6 +123,8 @@ Page({
registrationSource,
registChannel,
regBusinessId,
IsGraves,
HasTedSurgery,
WorkerId,
inviteDoctorId: doctorId,
inviteChannel: inviteChan,
@ -117,6 +147,20 @@ Page({ @@ -117,6 +147,20 @@ Page({
})
})
},
handleVisitors() {
wx.ajax({
method: 'POST',
url: '?r=zd/login/reg-logout',
data: {},
showMsg: false,
}).then(() => {
app.startLogin(() => {
wx.reLaunch({
url: '/patient/pages/index/index',
})
})
})
},
handleBack() {
wx.navigateBack({
fail() {

54
src/patient/pages/enterInfo/index.wxml

@ -1,20 +1,18 @@ @@ -1,20 +1,18 @@
<view class="page">
<navbar fixed title="录入信息" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<image class="bg" src="/images/bg10.png"></image>
<navbar fixed title="录入信息" custom-style="background:{{background}}"></navbar>
<image class="bg" src="{{imageUrl}}bg10.png?t={{Timestamp}}"></image>
<view class="page-container" style="padding-top:{{pageTop+24}}px;">
<view class="content">
<view class="switch">
<view class="item {{relationType==1 && 'active'}}" bind:tap="handleRelationType" data-id="1">
<view class="icon-wrap">
<image class="icon" src="/images/icon28.png"></image>
<image class="icon" src="{{imageUrl}}icon28.png?t={{Timestamp}}"></image>
</view>
<view class="name">患者本人</view>
</view>
<view class="item {{relationType==2 && 'active'}}" bind:tap="handleRelationType" data-id="2">
<view class="icon-wrap">
<image class="icon" src="/images/icon29.png"></image>
<image class="icon" src="{{imageUrl}}icon29.png?t={{Timestamp}}"></image>
</view>
<view class="name">患者亲友</view>
</view>
@ -35,48 +33,64 @@ @@ -35,48 +33,64 @@
<view class="item {{gender==2 && 'active'}}" bind:tap="handleGender" data-id="2">
<image
class="icon"
src="{{imageUrl}}za-images/1/woman{{gender==2 ? '-active' : ''}}.png?t={{Timestamp}}"
src="{{imageUrl}}{{gender==2 ? 'icon57' : 'icon55'}}.png?t={{Timestamp}}"
></image>
女性用户
</view>
<view class="item {{gender==1 && 'active'}}" bind:tap="handleGender" data-id="1">
<image
class="icon"
src="{{imageUrl}}za-images/1/man{{gender==1 ? '-active' : ''}}.png?t={{Timestamp}}"
src="{{imageUrl}}{{gender==1 ? 'icon58' : 'icon56'}}.png?t={{Timestamp}}"
></image>
男性用户
</view>
</view>
<view class="row-title">患者年龄范围</view>
<view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">18岁以下</view>
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">18岁-44岁</view>
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">45岁-59岁</view>
<view class="age-item {{ageRange==3 && 'active'}}" data-id="3" bind:tap="handleSelectAge">60岁-74岁</view>
<view class="age-item {{ageRange==4 && 'active'}}" data-id="4" bind:tap="handleSelectAge">75岁以上</view>
<view
class="age-item {{ageRange==index && 'active'}}"
data-id="{{index}}"
wx:for="{{dict.AgeRange}}"
wx:key="index"
bind:tap="handleSelectAge"
>
{{item}}
</view>
</view>
<view class="row-title">
是否有Graves病病史
<div class="sub">(非必填)</div>
</view>
<view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">是</view>
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">否</view>
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">不确定</view>
<view
class="age-item {{IsGraves==index && 'active'}}"
data-id="{{index}}"
wx:for="{{dict.IsGraves}}"
wx:key="index"
bind:tap="handleSelectIsGraves"
>
{{item}}
</view>
</view>
<view class="row-title">
是否有TED(甲状腺眼突)及其相关眼部手术史
<div class="sub">(非必填)</div>
</view>
<view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">是</view>
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">否</view>
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">不确定</view>
<view
class="age-item {{HasTedSurgery==index && 'active'}}"
data-id="{{index}}"
wx:for="{{dict.HasTedSurgery}}"
wx:key="index"
bind:tap="handleSelectHasTedSurgery"
>
{{item}}
</view>
</view>
</view>
</view>
<view class="footer">
<view bind:tap="handleSubmit" class="next">立即进入</view>
<view bind:tap="handleBack" class="cancel">取消</view>
<view bind:tap="handleVisitors" class="cancel">随便看看</view>
</view>
</view>

2
src/patient/pages/hospital/index.ts

@ -45,7 +45,7 @@ Page({ @@ -45,7 +45,7 @@ Page({
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权

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

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
"navigationStyle": "custom",
"usingComponents": {
"pageNavbar": "/components/pageNavbar/index",
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index",
"toast": "/components/toast/index",
"referralFrom": "/components/referralFrom/index",

11
src/patient/pages/index/index.scss

@ -3,13 +3,14 @@ page { @@ -3,13 +3,14 @@ page {
background-color: rgba(246, 248, 249, 1);
}
.page-title {
width: 226rpx;
height: 33rpx;
}
.page {
position: relative;
min-height: 100vh;
.page-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
box-sizing: border-box;
padding-bottom: 180rpx;
@ -115,7 +116,7 @@ page { @@ -115,7 +116,7 @@ page {
font-size: 22rpx;
line-height: 1;
color: #ffffff;
background: linear-gradient( 90deg, #FFD650 0%, #F8A61A 100%);
background: linear-gradient(90deg, #ffd650 0%, #f8a61a 100%);
line-height: 24rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
@ -317,7 +318,7 @@ page { @@ -317,7 +318,7 @@ page {
justify-content: space-between;
.title {
font-size: 32rpx;
color: #474747;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
.more {

93
src/patient/pages/index/index.ts

@ -80,7 +80,6 @@ Page({ @@ -80,7 +80,6 @@ Page({
zdUserInfo,
publicCard: zdUserInfo.isShowFollowGuide == 1,
})
this.getPopup()
this.getConfig(zdUserInfo)
this.getSystemConfig()
if (zdUserInfo.ExclusiveDoctorId > 0) {
@ -178,98 +177,6 @@ Page({ @@ -178,98 +177,6 @@ Page({
})
})
},
async getPopup() {
const data5 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 5,
},
})
if (data5.showAlert) {
this.setData({
toastShow: data5.showAlert,
toastType: 'doubleStandards',
toastParams: data5,
})
return
}
const data4 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 4,
},
})
if (data4.showAlert) {
this.setData({
toastShow: data4.showAlert,
toastType: 'vipScan',
toastParams: {},
})
return
}
const data1 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: { Type: 1 },
})
if (!Array.isArray(data1)) {
this.setData({
toastShow: true,
toastType: 'healthCare',
toastParams: data1,
})
return
}
const data2 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 2,
},
})
if (data2.showAlert && this.data.zdUserInfo.UserType == 4) {
this.setData({
toastShow: data2.showAlert,
toastType: 'aldAlert',
toastParams: {
id: data2.articleId,
},
})
}
const data3 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/info',
data: {
Type: 6,
},
})
if (data3.showAlert) {
this.setData({
toastShow: data3.showAlert,
toastType: 'dedicatedDoctor',
toastParams: {},
})
}
const data6 = await wx.ajax({
method: 'GET',
url: '?r=zd/re-visit/get-popup-show-status',
})
if (data6.showStatus === 1) {
this.setData({
toastShow: true,
toastType: 'referral-toast',
toastParams: {},
})
}
},
setPopupInfo() {
wx.ajax({
method: 'POST',

8
src/patient/pages/index/index.wxml

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
<navbar custom-style="background:{{background}}" fixed>
<image class="page-title" slot="left" src="{{imageUrl}}title7.png?t={{Timestamp}}"></image>
</navbar>
<view
class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop}}px;"
>
<view class="page-container">
<pageNavbar></pageNavbar>
<!-- style="background: url({{imageUrl}}za-images/2/doctor-home{{theme === 'DRUG' ? '-drug':''}}-bg.png?t={{Timestamp}}) no-repeat 16rpx 9rpx/606rpx 173rpx,{{theme === 'DRUG'? 'linear-gradient( 360deg, #25D9C8 0%, #25D9C8 73%, #B5EFEA 100%)':'linear-gradient( 360deg, #CF5375 0%, #CF5375 74%, #EE9FB9 100%) no-repeat top center/100% 100%'}}" -->
<view
class="doctor"
@ -111,7 +113,7 @@ @@ -111,7 +113,7 @@
<view class="c-footer">
<view class="date">{{item.BeginTime}}</view>
<view class="btn">
<image class="icon" src="/images/icon30.png"></image>
<image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image>
{{item.Status==2?'参会':'查看'}}
</view>
</view>

2
src/patient/pages/interactivePatient/index.scss

@ -108,7 +108,7 @@ page { @@ -108,7 +108,7 @@ page {
gap: 16rpx;
margin-bottom: 30rpx;
.order {
margin-top: 6rpx;
margin-top: 8rpx;
flex-shrink: 0;
width: 28rpx;
height: 28rpx;

6
src/patient/pages/interactivePatient/index.wxml

@ -6,12 +6,12 @@ @@ -6,12 +6,12 @@
<view
class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
>
<view class="page-header" bind:tap="handleDoctorDetail">
<image class="avatar" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image>
<view class="wrap">
<view class="naem">{{doctorDetail.doctorName}}</view>
<view class="name">{{doctorDetail.doctorName}}</view>
<view class="content">
{{doctorDetail.hospitalName}}
<view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view>
@ -184,7 +184,7 @@ @@ -184,7 +184,7 @@
<view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view>
<view class="icon-wrap">
<image class="icon" src="/images/icon38.png"></image>
<image class="icon" src="{{imageUrl}}icon38.png?t={{Timestamp}}"></image>
</view>
</view>
</view>

2
src/patient/pages/live/index.ts

@ -124,7 +124,7 @@ Page({ @@ -124,7 +124,7 @@ Page({
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权

12
src/patient/pages/live/index.wxml

@ -1,13 +1,11 @@ @@ -1,13 +1,11 @@
<navbar fixed title="大咖说" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<navbar fixed title="大咖说" custom-style="background:{{background}}" z-index="10"></navbar>
<view
class="page"
style="--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13);background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
style="--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13);background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
>
<view class="search">
<image class="icon" src="{{imageUrl}}za-images/1/search.png?t={{Timestamp}}"></image>
<image class="icon" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<input
class="input"
model:value="{{Search}}"
@ -47,8 +45,8 @@ @@ -47,8 +45,8 @@
</view>
<view class="inner">
<view class="title">{{item.Name}}</view>
<view class="labels" wx:if="{{item.doctorName}}">
{{item.doctorName}}
<view class="labels" wx:if="{{item.DoctorName}}">
{{item.DoctorName}}
<text class="line" wx:if="{{item.MasterHosipital}}"></text>
{{item.MasterHosipital}}
</view>

7
src/patient/pages/liveDetail/index.scss

@ -158,8 +158,10 @@ @@ -158,8 +158,10 @@
position: fixed;
right: 14rpx;
bottom: 264rpx;
width: 104rpx;
height: 104rpx;
width: 84rpx;
height: 84rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(51, 5, 109, 0.17);
border-radius: 50%;
}
.custom-popup {
@ -180,3 +182,4 @@ @@ -180,3 +182,4 @@
text-align: center;
}
}

2
src/patient/pages/liveDetail/index.ts

@ -232,7 +232,7 @@ Page({ @@ -232,7 +232,7 @@ Page({
wx.showModal({
title: '请求授权相册权限',
content: '需要保存海报到相册,请确认授权',
confirmColor: '#cf5375',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权

8
src/patient/pages/liveDetail/index.wxml

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<view
class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
>
<image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}"></image>
<view class="page-container">
@ -13,11 +13,11 @@ @@ -13,11 +13,11 @@
<view class="date">2025.7.15</view>
<view class="stat">
<view class="s-item" wx:if="{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}">
<image class="icon" src="/images/icon40.png"></image>
<image class="icon" src="{{imageUrl}}icon40.png?t={{Timestamp}}"></image>
{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}次
</view>
<view class="s-item" bind:tap="handleShare" wx:if="{{detail.ShareNum}}">
<image class="icon" src="/images/icon39.png"></image>
<image class="icon" src="{{imageUrl}}icon39.png?t={{Timestamp}}"></image>
{{detail.ShareNum}}次
</view>
</view>
@ -120,7 +120,7 @@ @@ -120,7 +120,7 @@
<image
class="fixed-share"
wx:if="{{detail.PosterUrl}}"
src="{{imageUrl}}za-images/1/fixed-share.png?t={{Timestamp}}"
src="{{imageUrl}}icon67.png?t={{Timestamp}}"
bind:tap="handleShare"
></image>

9
src/patient/pages/liveResult/index.ts

@ -74,6 +74,15 @@ Page({ @@ -74,6 +74,15 @@ Page({
url: '/patient/pages/index/index',
})
},
handleBack() {
wx.navigateBack({
fail: () => {
wx.reLaunch({
url: '/pages/start/index',
})
},
})
},
onShareAppMessage() {
return {
title: this.data.detail.ActivityName,

4
src/patient/pages/liveResult/index.wxml

@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
<van-icon name="arrow-left" slot="left" color="background=='#FFFFFF'?'#000':'#fff'" bind:tap="handleBack" />
</navbar>
<!-- padding-top:{{pageTop+22}}px; -->
<view class="page" style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx">
<view class="page" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx">
<view class="bg"></view>
<view class="page-container" style="top:{{pageTop+30}}px;">
<image class="badge" mode="aspectFit" src="/images/icon43.png"></image>
<image class="badge" mode="aspectFit" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image>
<view class="status">报名成功</view>
<view class="tip">欢迎您参与此次活动</view>
<view class="container">

105
src/patient/pages/login/index.ts

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
const app = getApp<IAppOption>();
let timer = null as null | number;
const app = getApp<IAppOption>()
let timer = null as null | number
Page({
data: {
@ -15,28 +15,28 @@ Page({ @@ -15,28 +15,28 @@ Page({
onLoad(options: any) {
this.setData({
page: options.page,
});
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' });
});
})
app.waitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' })
})
},
getCode() {
if (timer) return;
const mobile = this.data.mobile;
if (timer) return
const mobile = this.data.mobile
if (!mobile) {
wx.showToast({
title: '手机号不能为空',
icon: 'none',
});
return;
})
return
}
// 验证手机号
if (!/^1[3-9,]\d{9}$/.test(mobile)) {
wx.showToast({
title: '手机号格式不正确',
icon: 'none',
});
return;
})
return
}
wx.ajax({
method: 'POST',
@ -48,27 +48,27 @@ Page({ @@ -48,27 +48,27 @@ Page({
wx.showToast({
icon: 'none',
title: '验证码已发送~',
});
let time = 60;
})
let time = 60
timer = setInterval(() => {
time--;
time--
this.setData({
codeText: `${time}s后重新发送`,
});
})
if (time <= 0) {
clearInterval(timer as number);
timer = null;
clearInterval(timer as number)
timer = null
this.setData({
codeText: '发送验证码',
});
})
}
}, 1000);
});
}, 1000)
})
},
handleSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOGIN' });
const { mobile, code } = this.data;
const { registrationSource, registChannel, regBusinessId } = app.globalData;
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOGIN' })
const { mobile, code } = this.data
const { registrationSource, registChannel, regBusinessId } = app.globalData
wx.ajax({
method: 'POST',
url: '?r=zd/login/reg-login',
@ -80,13 +80,13 @@ Page({ @@ -80,13 +80,13 @@ Page({
regBusinessId,
},
}).then((_res) => {
this.submitCallback();
});
this.submitCallback()
})
},
handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTQUICKPATIENTLOGIN' });
const { iv, encryptedData } = e.detail;
const { registrationSource, registChannel, regBusinessId } = app.globalData;
app.zdMpBehavior({ PageName: 'BTN_PATIENTQUICKPATIENTLOGIN' })
const { iv, encryptedData } = e.detail
const { registrationSource, registChannel, regBusinessId } = app.globalData
if (iv && encryptedData) {
wx.ajax({
method: 'POST',
@ -99,61 +99,58 @@ Page({ @@ -99,61 +99,58 @@ Page({
regBusinessId,
},
}).then((_res) => {
this.submitCallback();
});
this.submitCallback()
})
}
},
handleWxCheck() {
wx.showToast({
icon: 'none',
title: '请先同意隐私政策',
});
})
},
submitCallback() {
app.globalData.loginType = 1;
app.globalData.isLogin = 1;
app.globalData.loginType = 1
app.globalData.isLogin = 1
app.updateLoginInfo((res) => {
const { loginType, isNewReg, isLogin } = res;
const backPage = app.globalData.backPage;
let url = backPage || '/patient/pages/index/index';
const { loginType, isNewReg, isLogin } = res
const backPage = app.globalData.backPage
let url = backPage || '/patient/pages/index/index'
if (isNewReg === 0) {
url = '/patient/pages/enterInfo/index';
url = '/patient/pages/enterInfo/index'
wx.navigateTo({
url,
});
return;
})
return
}
wx.reLaunch({
url,
});
});
})
})
},
handleVisitors() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOOKAROUND' });
app.globalData.anyWhere = true;
app.globalData.first = true;
app.globalData.loginType = 1;
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOOKAROUND' })
wx.reLaunch({
url: '/patient/pages/index/index',
});
})
},
handleDoctor() {
wx.reLaunch({
url: '/pages/login/index',
});
})
},
handleLink(e: any) {
const { url } = e.currentTarget.dataset;
const { url } = e.currentTarget.dataset
wx.navigateTo({
url,
});
})
},
handleCheck(e: any) {
const { key } = e.currentTarget.dataset;
const { key } = e.currentTarget.dataset
this.setData({
[key]: !this.data[key],
});
})
},
});
})
export {};
export {}

18
src/patient/pages/login/index.wxml

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<view class="page">
<image class="bg" src="/images/bg10.png"></image>
<image class="bg" src="{{imageUrl}}bg10.png?t={{Timestamp}}"></image>
<view class="container">
<image class="frame" src="/images/logo2.png"></image>
<image class="title" src="/images/title6.png"></image>
<image class="frame" src="{{imageUrl}}logo2.png?t={{Timestamp}}"></image>
<image class="title" src="{{imageUrl}}title6.png?t={{Timestamp}}"></image>
<button
wx:if="{{check1 && check2}}"
class="phone-btn"
@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
<image
wx:if="{{check1}}"
class="icon"
src="/images/icon25.png"
src="{{imageUrl}}icon25.png?t={{Timestamp}}"
bind:tap="handleCheck"
data-key="check1"
></image>
<image wx:else class="icon" src="/images/icon24.png" bind:tap="handleCheck" data-key="check1"></image>
<image wx:else class="icon" src="{{imageUrl}}icon24.png?t={{Timestamp}}" bind:tap="handleCheck" data-key="check1"></image>
<view class="a-content">
我已阅读并同意
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《用户协议》</text>
@ -33,11 +33,11 @@ @@ -33,11 +33,11 @@
<image
wx:if="{{check2}}"
class="icon"
src="/images/icon25.png"
src="{{imageUrl}}icon25.png?t={{Timestamp}}"
bind:tap="handleCheck"
data-key="check2"
></image>
<image wx:else class="icon" src="/images/icon24.png" bind:tap="handleCheck" data-key="check2"></image>
<image wx:else class="icon" src="{{imageUrl}}icon24.png?t={{Timestamp}}" bind:tap="handleCheck" data-key="check2"></image>
<view class="a-content">
我同意依照此
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《隐私政策》</text>
@ -50,11 +50,11 @@ @@ -50,11 +50,11 @@
</view>
<view class="other">
<view class="col" bind:tap="handleVisitors">
<image class="icon" src="/images/icon26.png"></image>
<image class="icon" src="{{imageUrl}}icon26.png?t={{Timestamp}}"></image>
随便看看
</view>
<view class="col" bind:tap="handleDoctor">
<image class="icon" src="/images/icon27.png"></image>
<image class="icon" src="{{imageUrl}}icon27.png?t={{Timestamp}}"></image>
我是医生
</view>
</view>

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

Loading…
Cancel
Save