Compare commits

...

6 Commits

  1. 2
      README.md
  2. 11
      project.private.config.json
  3. 18
      src/app.ts
  4. 63
      src/components/popup/index.scss
  5. 14
      src/components/popup/index.wxml
  6. 50
      src/components/toast/index.scss
  7. 14
      src/components/toast/index.wxml
  8. BIN
      src/images/bg16.png
  9. BIN
      src/images/bg18.png
  10. BIN
      src/images/bg22.png
  11. BIN
      src/images/bg23.png
  12. BIN
      src/images/bg24.png
  13. BIN
      src/images/bg31.png
  14. BIN
      src/images/icon76.png
  15. BIN
      src/images/icon77.png
  16. BIN
      src/images/icon78.png
  17. BIN
      src/images/icon79.png
  18. BIN
      src/images/icon80.png
  19. BIN
      src/images/icon81.png
  20. 4
      src/patient/pages/enterInfo/index.json
  21. 77
      src/patient/pages/enterInfo/index.scss
  22. 73
      src/patient/pages/enterInfo/index.ts
  23. 62
      src/patient/pages/enterInfo/index.wxml
  24. 42
      src/patient/pages/index/index.ts
  25. 3
      src/patient/pages/live/index.ts
  26. 3
      src/patient/pages/liveDetail/index.json
  27. 79
      src/patient/pages/liveDetail/index.scss
  28. 106
      src/patient/pages/liveDetail/index.ts
  29. 59
      src/patient/pages/liveDetail/index.wxml
  30. 4
      src/patient/pages/personalInformation/index.json
  31. 100
      src/patient/pages/personalInformation/index.scss
  32. 62
      src/patient/pages/personalInformation/index.ts
  33. 80
      src/patient/pages/personalInformation/index.wxml
  34. 8
      src/patient/pages/qol/index.scss
  35. 4
      src/patient/pages/qol/index.wxml
  36. 3
      src/patient/pages/qolAdd/index.json
  37. 9
      src/patient/pages/qolAdd/index.scss
  38. 49
      src/patient/pages/qolAdd/index.ts
  39. 8
      src/patient/pages/qolAdd/index.wxml
  40. 3
      src/patient/pages/qolResult/index.json
  41. 95
      src/patient/pages/qolResult/index.scss
  42. 42
      src/patient/pages/qolResult/index.ts
  43. 69
      src/patient/pages/qolResult/index.wxml
  44. 8
      src/utils/page.ts
  45. 2
      typings/index.d.ts

2
README.md

@ -10,7 +10,7 @@ images svn 地址
svn://39.106.86.127:28386/projects/xd/proj_src/shop/frontend/web/xd svn://39.106.86.127:28386/projects/xd/proj_src/shop/frontend/web/xd
svn://39.106.86.127:28386/projects/xd/proj_src/branches/dev_v2.0/shop/frontend/web/xd/ svn://39.106.86.127:28386/projects/xd/proj_src/branches/dev_v2.0/shop/frontend/web/xd/
(/images/)(\S\*(?=["|'])) (/images/)(\S*(?=["|']))
{{imageUrl}}$2?t={{Timestamp}} {{imageUrl}}$2?t={{Timestamp}}
ui问题 ui问题

11
project.private.config.json

@ -23,11 +23,18 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "患者-个人信息",
"pathName": "patient/pages/personalInformation/index",
"query": "bottom=1",
"launchMode": "default",
"scene": null
},
{
"name": "patient/pages/liveResult/index", "name": "patient/pages/liveResult/index",
"pathName": "patient/pages/liveResult/index", "pathName": "patient/pages/liveResult/index",
"query": "id=30&rewardScore=undefined", "query": "id=30&rewardScore=undefined",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "医生-患者详情", "name": "医生-患者详情",

18
src/app.ts

@ -114,6 +114,8 @@ App<IAppOption>({
onShow(options) { onShow(options) {
if (options.query.scene) { if (options.query.scene) {
this.globalData.scene = parseScene(options.query.scene) this.globalData.scene = parseScene(options.query.scene)
} else if (options.query.proMethodId) {
this.globalData.scene.proMethodId = options.query.proMethodId
} }
}, },
startLogin(callback) { startLogin(callback) {
@ -365,7 +367,7 @@ App<IAppOption>({
} else if (AuditStatus == 2) { } else if (AuditStatus == 2) {
urlKey = 'reject' urlKey = 'reject'
} }
let navUrl = { const navUrl = {
enterInfo: '/patient/pages/enterInfo/index', enterInfo: '/patient/pages/enterInfo/index',
noCert: '/patient/pages/enterInfo/index', noCert: '/patient/pages/enterInfo/index',
reject: '/patient/pages/enterInfo/index', reject: '/patient/pages/enterInfo/index',
@ -433,7 +435,7 @@ App<IAppOption>({
.map(([key, value]) => `${key}=${value}`) .map(([key, value]) => `${key}=${value}`)
.join('&') .join('&')
wx.reLaunch({ wx.reLaunch({
url: '/doctor/pages/d_trans/index?path=' + encodeURIComponent(`/${url}?${params}`), url: `/doctor/pages/d_trans/index?path=${encodeURIComponent(`/${url}?${params}`)}`,
}) })
return false return false
} }
@ -489,7 +491,7 @@ App<IAppOption>({
self?.setData({ self?.setData({
zdUserInfo: res, zdUserInfo: res,
}) })
const { doctorId, inviteChan } = this.globalData.scene const { doctorId, inviteChan, proMethodId } = this.globalData.scene
if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) { if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -503,6 +505,16 @@ App<IAppOption>({
this.getZdUserInfo(self, update, callback) this.getZdUserInfo(self, update, callback)
}) })
} }
if (proMethodId) {
wx.ajax({
method: 'POST',
url: '?r=zd/account/set-user-promotion-method',
showMsg: false,
data: {
promotionMethodId: proMethodId,
},
})
}
callback(res) callback(res)
}) })
}, },

63
src/components/popup/index.scss

@ -135,6 +135,69 @@
} }
} }
.popup7 {
.badge {
position: relative;
z-index: 1;
width: 126rpx;
height: 124rpx;
display: block;
margin: 0 auto;
}
.contaienr {
margin-top: -80rpx;
padding: 96rpx 0 0;
width: 540rpx;
border-radius: 24rpx;
box-sizing: border-box;
background: linear-gradient(353deg, #ffffff 0%, #f5eeff 100%);
box-shadow: inset 0rpx -1rpx 0rpx 0rpx #e5e6eb;
.content {
font-size: 28rpx;
color: #adacb2;
text-align: center;
}
.footer {
margin-top: 40rpx;
border-top: 1px solid #e5e6eb;
display: flex;
.sure,
.cancel {
flex: 1;
padding: 22rpx;
text-align: center;
font-size: 32rpx;
}
.cancel {
border-right: 1px solid #e5e6eb;
color: #211d2e;
}
.sure {
color: #b982ff;
}
}
}
}
.popup8 {
width: 590rpx;
height: 880rpx;
position: relative;
.p-img {
width: 100%;
height: 100%;
}
.code{
position: absolute;
top: 372rpx;
left: 50%;
transform: translateX(-50%);
border-radius: 24rpx;
width: 300rpx;
height: 300rpx;
}
}
.close { .close {
margin: 48rpx auto 0; margin: 48rpx auto 0;
display: block; display: block;

14
src/components/popup/index.wxml

@ -57,6 +57,20 @@
<view class="popup6" wx:if="{{type==='popup6'}}"> <view class="popup6" wx:if="{{type==='popup6'}}">
<image class="p-img" src="{{imageUrl}}bg20.png?t={{Timestamp}}" show-menu-by-longpress></image> <image class="p-img" src="{{imageUrl}}bg20.png?t={{Timestamp}}" show-menu-by-longpress></image>
</view> </view>
<view class="popup7" wx:if="{{type==='popup7'}}">
<image class="badge" src="{{imageUrl}}icon78.png?t={{Timestamp}}"></image>
<view class="contaienr">
<view class="content">要删除这张照片吗 ?</view>
<view class="footer">
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="sure" bind:tap="handleOk">确定</view>
</view>
</view>
</view>
<view class="popup8" wx:if="{{type==='popup8'}}">
<image class="p-img" src="{{imageUrl}}bg23.png?t={{Timestamp}}"></image>
<image class="code" src="{{params.subscribe_img}}" show-menu-by-longpress></image>
</view>
<image <image
wx:if="{{params.close}}" wx:if="{{params.close}}"

50
src/components/toast/index.scss

@ -2339,7 +2339,7 @@
.container { .container {
margin-top: 76rpx; margin-top: 76rpx;
font-size: 40rpx; font-size: 40rpx;
color: #211D2E; color: #211d2e;
text-align: center; text-align: center;
line-height: 68rpx; line-height: 68rpx;
.line { .line {
@ -2348,7 +2348,7 @@
justify-content: center; justify-content: center;
} }
.high { .high {
color: #B982FF; color: #b982ff;
font-weight: bold; font-weight: bold;
} }
} }
@ -2585,3 +2585,49 @@
} }
} }
} }
.popup-drug-guide {
.popup-container {
.badge {
position: relative;
z-index: 1;
display: block;
margin: 0 auto;
width: 302rpx;
height: 316rpx;
}
.container {
margin-top: -168rpx;
padding: 148rpx 0 0;
width: 630rpx;
height: 512rpx;
box-sizing: border-box;
.title {
font-size: 36rpx;
color: #211d2e;
text-align: center;
line-height: 52rpx;
font-weight: bold;
}
.content {
margin-top: 30rpx;
font-size: 32rpx;
color: #adacb2;
text-align: center;
}
.btn {
margin: 38rpx auto 0;
width: 364rpx;
height: 84rpx;
font-size: 36rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 98rpx 98rpx 98rpx 98rpx;
}
}
}
}

14
src/components/toast/index.wxml

@ -776,4 +776,18 @@
<image class="btn" bind:tap="handleOk" src="{{imageUrl}}za-images/icon16.png?t={{Timestamp}}"></image> <image class="btn" bind:tap="handleOk" src="{{imageUrl}}za-images/icon16.png?t={{Timestamp}}"></image>
</view> </view>
</view> </view>
<view class="popup-drug-guide" wx:if="{{type == 'drug-guide'}}">
<view class="popup-container">
<image class="badge" src="{{imageUrl}}icon80.png?t={{Timestamp}}"></image>
<view class="container" style="background: url('{{imageUrl}}bg31.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="title">
为更好地为您提供健康管理服务
<view></view>
需您补充完善个人信息
</view>
<view class="content">信息仅用于您的专属健康档案</view>
<view class="btn" bind:tap="handleOk">去完善</view>
</view>
</view>
</view>
</van-popup> </van-popup>

BIN
src/images/bg16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

After

Width:  |  Height:  |  Size: 306 KiB

BIN
src/images/bg18.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 389 KiB

BIN
src/images/bg22.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 KiB

BIN
src/images/bg23.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

BIN
src/images/bg24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

BIN
src/images/bg31.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

BIN
src/images/icon76.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
src/images/icon77.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

BIN
src/images/icon78.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/images/icon79.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

BIN
src/images/icon80.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
src/images/icon81.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

4
src/patient/pages/enterInfo/index.json

@ -6,6 +6,8 @@
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-divider": "@vant/weapp/divider/index", "van-divider": "@vant/weapp/divider/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"navbar": "/components/navbar/index" "navbar": "/components/navbar/index",
"uploadFile": "/components/uploadFile/index",
"popup": "/components/popup/index"
} }
} }

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

@ -8,7 +8,7 @@
height: 512rpx; height: 512rpx;
} }
.page-container { .page-container {
padding-bottom: 260rpx; padding-bottom: 300rpx;
position: absolute; position: absolute;
width: 100%; width: 100%;
top: 0; top: 0;
@ -65,6 +65,13 @@
color: rgba(105, 104, 110, 1); color: rgba(105, 104, 110, 1);
font-weight: normal; font-weight: normal;
} }
.rt-content {
margin-top: 8rpx;
font-size: 28rpx;
color: #adacb2;
font-weight: normal;
line-height: 52rpx;
}
} }
.row { .row {
margin-bottom: 40rpx; margin-bottom: 40rpx;
@ -110,7 +117,7 @@
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
background: #f6f8f9; background: #f6f8f9;
border-radius: 116rpx; border-radius: 16rpx;
} }
.input-place { .input-place {
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
@ -139,7 +146,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 116rpx; border-radius: 16rpx;
background: rgba(246, 248, 249, 1); background: rgba(246, 248, 249, 1);
.icon { .icon {
width: 64rpx; width: 64rpx;
@ -147,7 +154,7 @@
} }
&.active { &.active {
color: rgba(185, 130, 255, 1); color: rgba(185, 130, 255, 1);
background: #FAF6FF; background: #faf6ff;
border-color: rgba(185, 130, 255, 1); border-color: rgba(185, 130, 255, 1);
} }
} }
@ -161,17 +168,75 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 150rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid rgba(246, 248, 249, 1); border: 2rpx solid rgba(246, 248, 249, 1);
background-color: rgba(246, 248, 249, 1); background-color: rgba(246, 248, 249, 1);
&.active { &.active {
color: rgba(185, 130, 255, 1); color: rgba(185, 130, 255, 1);
border-color: rgba(185, 130, 255, 1); border-color: rgba(185, 130, 255, 1);
background-color: #FAF6FF; background-color: #faf6ff;
}
}
}
.upload {
margin-top: 24rpx;
width: 208rpx;
.upload-container {
position: relative;
width: 208rpx;
height: 208rpx;
border-radius: 16rpx;
background: #f6f8f9;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.upload-img {
position: relative;
width: 100%;
height: 100%;
.del {
position: absolute;
top: 0;
right: 0;
width: 40rpx;
height: 40rpx;
border-radius: 0 16rpx 0 16rpx;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
.d-icon {
width: 26rpx;
height: 26rpx;
}
}
.img {
display: block;
width: 100%;
height: 100%;
}
}
.icon {
display: block;
width: 112rpx;
height: 80rpx;
}
.name {
margin-top: 28rpx;
font-size: 28rpx;
color: #adacb2;
text-align: center;
} }
} }
} }
.row-sub {
margin-top: 8rpx;
font-size: 28rpx;
color: #adacb2;
}
.tip { .tip {
margin-top: -24rpx; margin-top: -24rpx;
margin-left: 46rpx; margin-left: 46rpx;

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

@ -12,6 +12,9 @@ Page({
diagnoseType: '', diagnoseType: '',
IsGraves: '', IsGraves: '',
HasTedSurgery: '', HasTedSurgery: '',
isKnowTituyo: '',
isUseTituyo: '',
prescriptionImg: '',
diagnoseTypeShow: false, diagnoseTypeShow: false,
DiagnoseType: app.globalData.DiagnoseType, DiagnoseType: app.globalData.DiagnoseType,
@ -25,6 +28,14 @@ Page({
proces: '0', proces: '0',
dict: {}, dict: {},
bolList: {
1: '是',
2: '否',
},
popupShow: false,
popupType: 'popup7',
popupParams: {} as any,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
@ -85,13 +96,38 @@ Page({
HasTedSurgery: id, HasTedSurgery: id,
}) })
}, },
handleSelectKnowTituyo(e) {
const { id } = e.currentTarget.dataset
this.setData({
isKnowTituyo: id,
})
},
handleSelectUseTituyo(e) {
const { id } = e.currentTarget.dataset
this.setData({
isUseTituyo: id,
})
wx.pageScrollTo({
scrollTop: 10000,
})
},
handleSubmit() { handleSubmit() {
app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' }) app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' })
if (this.data.submiting) return if (this.data.submiting) return
const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data const {
name,
gender,
ageRange,
relationType,
IsGraves,
HasTedSurgery,
isKnowTituyo,
isUseTituyo,
prescriptionImg,
} = this.data
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData
const { doctorId, inviteChan } = app.globalData.scene const { doctorId, inviteChan, proMethodId } = app.globalData.scene
let toast = '' let toast = ''
// if (!diagnosisTime) toast = "确诊时间不能为空"; // if (!diagnosisTime) toast = "确诊时间不能为空";
// if (!birth) toast = "出生日期不能为空"; // if (!birth) toast = "出生日期不能为空";
@ -126,10 +162,14 @@ Page({
regBusinessId, regBusinessId,
IsGraves, IsGraves,
HasTedSurgery, HasTedSurgery,
isKnowTituyo,
isUseTituyo,
prescriptionImg,
WorkerId, WorkerId,
inviteDoctorId: doctorId, inviteDoctorId: doctorId,
inviteChannel: inviteChan, inviteChannel: inviteChan,
IsAliQiWei, IsAliQiWei,
promotionMethodId: proMethodId,
}, },
}) })
.then((_res) => { .then((_res) => {
@ -163,6 +203,35 @@ Page({
}) })
}) })
}, },
handleSetData(e) {
this.setData({
prescriptionImg: e.detail.imgUrl,
})
},
handleDelData() {
this.setData({
popupShow: true,
popupType: 'popup7',
})
},
handlePopupOk() {
this.setData({
popupShow: false,
popupType: '',
prescriptionImg: '',
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
popupType: '',
})
},
handlePreview() {
wx.previewImage({
urls: [this.data.prescriptionImg],
})
},
handleBack() { handleBack() {
wx.navigateBack({ wx.navigateBack({
fail() { fail() {

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

@ -53,7 +53,7 @@
</view> </view>
<view class="row-title"> <view class="row-title">
是否有Graves病病史 是否有Graves病病史
<div class="sub">(非必填)</div> <text class="sub">(非必填)</text>
</view> </view>
<view class="row row-age"> <view class="row row-age">
<view <view
@ -68,7 +68,7 @@
</view> </view>
<view class="row-title"> <view class="row-title">
是否有TED(甲状腺眼突)及其相关眼部手术史 是否有TED(甲状腺眼突)及其相关眼部手术史
<div class="sub">(非必填)</div> <text class="sub">(非必填)</text>
</view> </view>
<view class="row row-age"> <view class="row row-age">
<view <view
@ -81,6 +81,56 @@
{{item}} {{item}}
</view> </view>
</view> </view>
<view class="row-title">
是否了解替妥尤单抗N01
<text class="sub">(非必填)</text>
</view>
<view class="row row-age">
<view
class="age-item {{isKnowTituyo==index && 'active'}}"
data-id="{{index}}"
wx:for="{{bolList}}"
wx:key="index"
bind:tap="handleSelectKnowTituyo"
>
{{item}}
</view>
</view>
<view class="row-title">
是否有使用替妥尤单抗N01
<text class="sub">(非必填)</text>
</view>
<view class="row row-age">
<view
class="age-item {{isUseTituyo==index && 'active'}}"
data-id="{{index}}"
wx:for="{{bolList}}"
wx:key="index"
bind:tap="handleSelectUseTituyo"
>
{{item}}
</view>
</view>
<block wx:if="{{isUseTituyo==1}}">
<view class="row-title">
请上传您的处方证明
<view class="rt-content">处方证明审核通过后,即可享受平台全部服务</view>
</view>
<uploadFile class="upload" accept="image" bind:file="handleSetData">
<view class="upload-container">
<view class="upload-img" wx:if="{{prescriptionImg}}">
<view class="del" catchtap="handleDelData">
<image class="d-icon" src="{{imageUrl}}icon77.png?t={{Timestamp}}"></image>
</view>
<image class="img" src="{{prescriptionImg}}" mode="aspectFill" catch:tap="handlePreview"></image>
</view>
<block wx:else>
<van-icon name="plus" style="font-size: 80rpx; color: rgba(173, 172, 178, 0.5)" />
</block>
</view>
</uploadFile>
<view class="row-sub">您可以上传您的诊断处方、住院小结等</view>
</block>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
@ -88,3 +138,11 @@
<view bind:tap="handleVisitors" class="cancel">随便看看</view> <view bind:tap="handleVisitors" class="cancel">随便看看</view>
</view> </view>
</view> </view>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

42
src/patient/pages/index/index.ts

@ -38,6 +38,7 @@ Page({
// toastType:"dedicatedDoctor", // toastType:"dedicatedDoctor",
// toastType: 'referral-toast', // toastType: 'referral-toast',
// toastType: 'public-toast', // toastType: 'public-toast',
// toastType: 'drug-guide',
toastShow: false, toastShow: false,
toastType: '', toastType: '',
@ -107,20 +108,35 @@ Page({
}) })
}, },
async getPopup() { async getPopup() {
const data3 = await wx.ajax({ const data1 = await wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/popup/info', url: '?r=zd/popup/info',
data: { data: {
Type: 6, Type: 6,
}, },
}) })
if (data3.showAlert) { if (data1.showAlert) {
this.setData({ this.setData({
toastShow: data3.showAlert, toastShow: data1.showAlert,
toastType: 'dedicatedDoctor', toastType: 'dedicatedDoctor',
toastParams: {}, toastParams: {},
}) })
} }
const data2 = await wx.ajax({
method: 'GET',
url: '?r=zd/popup/get-popup',
data: {
type: 1,
},
})
if (data2.showAlert) {
this.setData({
toastShow: data2.showAlert,
toastType: 'drug-guide',
toastParams: {},
})
}
}, },
getUnreadCount() { getUnreadCount() {
wx.ajax({ wx.ajax({
@ -166,7 +182,7 @@ Page({
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: `?r=zd/mini-conf/get-config`, url: `?r=zd/mini-conf/get-config`,
data: { userType: UserType }, data: { userType: UserType > 3 ? 3 : UserType },
}).then((res) => { }).then((res) => {
res = res.map((item: any) => { res = res.map((item: any) => {
if (item.code == 'spread1' || item.code == 'spread2' || item.code == 'serviceConf') { if (item.code == 'spread1' || item.code == 'spread2' || item.code == 'serviceConf') {
@ -449,6 +465,17 @@ Page({
data: {}, data: {},
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
} else if (toastType === 'drug-guide') {
wx.ajax({
method: 'POST',
url: '?r=zd/popup/add-record',
data: { type: 1 },
}).then(() => {
wx.navigateTo({
url: '/patient/pages/personalInformation/index?bottom=1',
})
})
this.handleToastCancel(null, false)
} }
}, },
handleToastCancel(_e = null, sure = true) { handleToastCancel(_e = null, sure = true) {
@ -475,7 +502,14 @@ Page({
url: '?r=zd/re-visit/update-popup-show-status', url: '?r=zd/re-visit/update-popup-show-status',
data: {}, data: {},
}) })
} else if (toastType === 'drug-guide' && sure) {
wx.ajax({
method: 'POST',
url: '?r=zd/popup/add-record',
data: { type: 1 },
})
} }
this.setData({ this.setData({
toastShow: false, toastShow: false,
toastType: '', toastType: '',

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

@ -230,9 +230,6 @@ Page({
handleDetail(e) { handleDetail(e) {
app.mpBehavior({ PageName: 'BTN_PatientLiveList' }) app.mpBehavior({ PageName: 'BTN_PatientLiveList' })
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
if (this.data.active == 0) {
} else if (this.data.active == 1) {
}
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/liveDetail/index?id=${id}`, url: `/patient/pages/liveDetail/index?id=${id}`,
}) })

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

@ -8,6 +8,7 @@
"customPoster": "/components/customPoster/index", "customPoster": "/components/customPoster/index",
"navbar": "/components/navbar/index", "navbar": "/components/navbar/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"popup": "/components/popup/index" "popup": "/components/popup/index",
"van-count-down": "@vant/weapp/count-down/index"
} }
} }

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

@ -10,7 +10,26 @@
box-shadow: 0 10rpx 16rpx #dcdcdc; box-shadow: 0 10rpx 16rpx #dcdcdc;
} }
.page-container { .page-container {
padding: 30rpx 40rpx 160rpx; padding: 30rpx 40rpx calc(env(safe-area-inset-bottom) + 160rpx);
.count-down {
margin-bottom: 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #b982ff;
gap: 8rpx;
.c-item {
padding: 0 8rpx;
line-height: 48rpx;
background-color: #b982ff;
color: #fff;
min-width: 50rpx;
text-align: center;
box-sizing: border-box;
border-radius: 4rpx;
}
}
.title { .title {
font-size: 40rpx; font-size: 40rpx;
color: #333333; color: #333333;
@ -124,6 +143,64 @@
height: 230rpx; height: 230rpx;
} }
} }
.lightspot {
margin-top: 32rpx;
.l-title {
font-size: 36rpx;
color: #333333;
font-weight: bold;
}
.l-list {
.l-item {
padding: 16rpx 0;
display: flex;
border-bottom: 1px dashed rgba(159, 168, 172, 0.1);
&:last-of-type {
border: none;
}
.photo {
flex-shrink: 0;
width: 290rpx;
height: 164rpx;
border-radius: 10rpx;
}
.wrap {
flex: 1;
padding-left: 24rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.w-title {
font-size: 32rpx;
color: #211d2e;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.time {
margin-top: 20rpx;
font-size: 32rpx;
color: #adacb2;
}
}
}
}
}
.public {
position: relative;
margin-top: 32rpx;
display: block;
height: 270rpx;
.p-code{
position: absolute;
top: 38rpx;
right: 74rpx;
width: 196rpx;
height: 196rpx;
}
}
.content { .content {
margin-top: 24rpx; margin-top: 24rpx;
.c-title { .c-title {

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

@ -1,4 +1,6 @@
/* eslint-disable eqeqeq */
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { parseScene } from '../../../utils/util'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
let live_time: null | number = null let live_time: null | number = null
@ -6,12 +8,20 @@ Page({
data: { data: {
id: '', id: '',
shareShow: false, shareShow: false,
dateValue: 0,
detail: {} as any, detail: {} as any,
zdUserInfo: {} as any, zdUserInfo: {} as any,
posterUrl: '', posterUrl: '',
params: {}, params: {},
play: false, play: false,
currentVideoSrc: '',
lightList: [],
timeData: {},
optionsScene: {} as any,
popupShow: false, popupShow: false,
popupType: 'popup6', // 登录失败弹窗 popupType: 'popup6', // 登录失败弹窗
popupParams: { popupParams: {
@ -20,10 +30,21 @@ Page({
}, },
videoContext: {} as WechatMiniprogram.VideoContext, videoContext: {} as WechatMiniprogram.VideoContext,
onLoad(options) { onLoad(options) {
const scene = app.globalData.scene
this.setData({ this.setData({
id: options.id || scene.id, id: options.id,
}) })
if (options.scene) {
const optionsScene: any = parseScene(options.scene)
this.setData({
optionsScene: optionsScene || {},
id: options.id || optionsScene?.id,
})
} else if (options.proMethodId) {
this.setData({
'optionsScene.proMethodId': options.proMethodId,
})
}
if (live_time) { if (live_time) {
clearInterval(live_time) clearInterval(live_time)
} }
@ -38,9 +59,14 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.mpBehavior({ PageName: 'PG_PatientLiveDetails' }) app.mpBehavior({
PageName: 'PG_PatientLiveDetails',
detailId: this.data.id,
promotionMethodId: this.data.optionsScene.proMethodId,
})
this.getDetail() this.getDetail()
this.setView() this.setView()
this.getLightList()
app.getZdUserInfo(this, true, () => { app.getZdUserInfo(this, true, () => {
this.getPosterParams() this.getPosterParams()
}) })
@ -49,6 +75,21 @@ Page({
onReady() { onReady() {
this.videoContext = wx.createVideoContext('video') this.videoContext = wx.createVideoContext('video')
}, },
getLightList() {
wx.ajax({
method: 'GET',
url: '?r=zd/activity/get-high-light-list',
data: { activityId: this.data.id },
}).then((res) => {
res.map((item: any) => {
item.duration = dayjs(item.duration * 1000).format('mm:ss')
return item
})
this.setData({
lightList: res,
})
})
},
getPosterParams() { getPosterParams() {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -109,11 +150,25 @@ Page({
}), }),
BeginTime: dayjs(res.BeginTime).format('YYYY-MM-DD HH:mm'), BeginTime: dayjs(res.BeginTime).format('YYYY-MM-DD HH:mm'),
}, },
currentVideoSrc: res.ReplayVideoUrl,
}) })
}) })
}, },
handleLightVideo(e) {
const { url } = e.currentTarget.dataset
this.setData({
currentVideoSrc: url,
})
this.videoContext.requestFullScreen({})
this.videoContext.seek(0)
this.videoContext.play()
},
handleReplay() { handleReplay() {
app.mpBehavior({ PageName: 'BTN_PatientLiveReview' }) app.mpBehavior({ PageName: 'BTN_PatientLiveReview' })
this.setData({
currentVideoSrc: this.data.detail.ReplayVideoUrl,
})
this.videoContext.requestFullScreen({}) this.videoContext.requestFullScreen({})
this.videoContext.seek(0) this.videoContext.seek(0)
this.videoContext.play() this.videoContext.play()
@ -121,6 +176,18 @@ Page({
handleFullscreenExit() { handleFullscreenExit() {
this.videoContext.pause() this.videoContext.pause()
}, },
handleBanner() {
const { detail, zdUserInfo, dateValue } = this.data
if (detail.IsSignUp && zdUserInfo.AuditStatus) {
if (zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4) {
if (detail.SignUpStatus == 2) {
if (detail.BeginTimeValue * 1 < dateValue * 1) {
this.handleLive()
}
}
}
}
},
handleLive() { handleLive() {
const { Type } = this.data.detail const { Type } = this.data.detail
app.mpBehavior({ PageName: 'BTN_PatientLiveEnter' }) app.mpBehavior({ PageName: 'BTN_PatientLiveEnter' })
@ -153,16 +220,33 @@ Page({
}) })
}, },
handleSignUp() { handleSignUp() {
const { SubscribeTemplateList } = this.data.detail
app.mpBehavior({ PageName: 'BTN_PatientLiveSign' }) app.mpBehavior({ PageName: 'BTN_PatientLiveSign' })
wx.requestSubscribeMessage({
tmplIds: SubscribeTemplateList,
success: (res) => {
const subscribe = SubscribeTemplateList.map((item) => {
return res[item] === 'accept' ? 1 : 2
})
this.handleSignUpCallback(subscribe)
},
fail: () => {
this.handleSignUpCallback([2, 2])
},
})
},
handleSignUpCallback(res = [2, 2]) {
const { Type } = this.data.detail const { Type } = this.data.detail
const { UserType } = this.data.zdUserInfo const { UserType } = this.data.zdUserInfo
const optionsScene = this.data.optionsScene
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/activity/sign-up', url: '?r=zd/activity/sign-up',
data: { data: {
Id: this.data.id, Id: this.data.id,
PreUserIdentity: UserType, PreUserIdentity: UserType,
promotionMethodId: optionsScene.proMethodId,
subscribe: [...res],
}, },
}).then((res) => { }).then((res) => {
app app
@ -323,8 +407,20 @@ Page({
}) })
}, },
handleAnswer() { handleAnswer() {
const link = this.data.detail.QuestionnaireUrl
wx.navigateTo({ wx.navigateTo({
url: `/pages/webview/index?url=${encodeURIComponent('https://shop.show.hbsaas.com/statics/#/?nId=bz56')}`, url: `/pages/webview/index?url=${encodeURIComponent(link)}`,
})
},
handleTimeChange(e) {
this.setData({
timeData: e.detail,
})
},
handleTimeFinish() {
this.setData({
dateValue: dayjs().valueOf(),
'detail.LeftTime': 0,
}) })
}, },
onShareAppMessage() { onShareAppMessage() {

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

@ -6,8 +6,34 @@
class="page" class="page"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') 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> <image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}" bind:tap="handleBanner"></image>
<view class="page-container"> <view class="page-container">
<van-count-down
wx:if="{{ detail.LeftTime > 0 }}"
use-slot
time="{{ detail.LeftTime*1000 }}"
bind:change="handleTimeChange"
bind:finish="handleTimeFinish"
>
<view class="count-down">
倒计时
<block>
<view class="c-item">{{timeData.days}}</view>
</block>
<block>
<view class="c-item">{{timeData.hours}}</view>
</block>
<block>
<view class="c-item">{{timeData.minutes}}</view>
</block>
<view class="c-item">{{timeData.seconds}}</view>
</view>
</van-count-down>
<view class="title">{{detail.Name}}</view> <view class="title">{{detail.Name}}</view>
<view class="info"> <view class="info">
<view class="date">{{detail.BeginTime}}</view> <view class="date">{{detail.BeginTime}}</view>
@ -37,7 +63,10 @@
</view> </view>
</block> </block>
</view> </view>
<view class="screen" wx:if="{{detail.SignUpRecord.length}}"> <view class="answer" wx:if="{{detail.Status==3 && detail.QuestionnaireUrl}}" bind:tap="handleAnswer">
<image class="a-img" src="{{imageUrl}}bg21.png?t={{Timestamp}}"></image>
</view>
<view class="screen" wx:elif="{{detail.SignUpRecord.length}}">
<swiper <swiper
class="screen-list" class="screen-list"
autoplay="{{detail.SignUpRecord.length>2}}" autoplay="{{detail.SignUpRecord.length>2}}"
@ -55,13 +84,31 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<!-- <view class="answer" bind:tap="handleAnswer"> --> <view class="lightspot" wx:if="{{lightList.length}}">
<!-- <image class="a-img" src="/images/bg21.png"></image> --> <view class="l-title">直播亮点</view>
<!-- </view> --> <view class="l-list">
<view
class="l-item"
wx:for="{{lightList}}"
wx:key="attachmentId"
bind:tap="handleLightVideo"
data-url="{{item.videoUrl}}"
>
<image class="photo" src="{{item.imgUrl}}" mode="aspectFill"></image>
<view class="wrap">
<view class="w-title">{{item.title}}</view>
<view class="time">{{item.duration}}</view>
</view>
</view>
</view>
</view>
<view class="content"> <view class="content">
<view class="c-title">详情介绍</view> <view class="c-title">详情介绍</view>
<image class="c-img" mode="widthFix" src="{{item.url}}" wx:for="{{detail.DetailJson}}" wx:key="name"></image> <image class="c-img" mode="widthFix" src="{{item.url}}" wx:for="{{detail.DetailJson}}" wx:key="name"></image>
</view> </view>
<view class="public" wx:if="{{detail.Status==3}}" style="background: url('{{imageUrl}}bg24.png?t={{Timestamp}}') no-repeat center/100%">
<image class="p-code" src="{{detail.subscribe_img}}" show-menu-by-longpress></image>
</view>
</view> </view>
<view class="footer"> <view class="footer">
<view class="btn active" wx:if="{{ detail.Status==99}}">已取消</view> <view class="btn active" wx:if="{{ detail.Status==99}}">已取消</view>
@ -114,7 +161,7 @@
show-progress show-progress
enable-play-gesture enable-play-gesture
bindfullscreenchange="handleFullscreenExit" bindfullscreenchange="handleFullscreenExit"
src="{{detail.ReplayVideoUrl}}" src="{{currentVideoSrc}}"
bindplay="handleVideoPlay" bindplay="handleVideoPlay"
bindpause="handleVideoPause" bindpause="handleVideoPause"
> >

4
src/patient/pages/personalInformation/index.json

@ -6,6 +6,8 @@
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-toast": "@vant/weapp/toast/index", "van-toast": "@vant/weapp/toast/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-switch": "@vant/weapp/switch/index" "van-switch": "@vant/weapp/switch/index",
"popup": "/components/popup/index",
"uploadFile": "/components/uploadFile/index"
} }
} }

100
src/patient/pages/personalInformation/index.scss

@ -2,10 +2,10 @@ page {
background-color: #f6f8f9; background-color: #f6f8f9;
} }
.page { .page {
padding: 40rpx; padding: 40rpx 30rpx;
padding-bottom: 200rpx; padding-bottom: 200rpx;
.page-container { .page-container {
padding: 48rpx 40rpx; padding: 48rpx 30rpx;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
background: linear-gradient(180deg, #faf6ff 0%, #ffffff 8%, #ffffff 100%); background: linear-gradient(180deg, #faf6ff 0%, #ffffff 8%, #ffffff 100%);
@ -36,12 +36,17 @@ page {
color: #cf5375; color: #cf5375;
} }
} }
.row-sub {
margin-top: 8rpx;
font-size: 28rpx;
color: #ADACB2;
}
.row-content { .row-content {
padding-top: 24rpx; padding-top: 24rpx;
.input { .input {
padding: 24rpx 48rpx; padding: 24rpx 48rpx;
background-color: rgba(246, 248, 249, 1); background-color: rgba(246, 248, 249, 1);
border-radius: 116rpx; border-radius: 16rpx;
color: #283031; color: #283031;
line-height: 40rpx; line-height: 40rpx;
} }
@ -51,7 +56,7 @@ page {
.radio-btns { .radio-btns {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 22rpx; gap: 20rpx;
&.radio-btns3 { &.radio-btns3 {
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
} }
@ -61,12 +66,12 @@ page {
} }
} }
.btn { .btn {
padding: 24rpx; padding: 18rpx 24rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
text-align: center; text-align: center;
line-height: 40rpx; line-height: 40rpx;
border-radius: 116rpx; border-radius: 16rpx;
border: 1px solid rgba(246, 248, 249, 1); border: 1px solid rgba(246, 248, 249, 1);
background-color: rgba(246, 248, 249, 1); background-color: rgba(246, 248, 249, 1);
display: flex; display: flex;
@ -132,6 +137,89 @@ page {
} }
} }
} }
.upload {
margin-top: 24rpx;
display: block;
position: relative;
.mask {
position: absolute;
z-index: 10;
width: 100%;
height: 100%;
}
.upload-container {
position: relative;
width: 208rpx;
height: 208rpx;
border-radius: 16rpx;
background: #f6f8f9;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.upload-img {
position: relative;
width: 100%;
height: 100%;
.del {
position: absolute;
top: 0;
right: 0;
width: 40rpx;
height: 40rpx;
border-radius: 0 16rpx 0 16rpx;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
.d-icon {
width: 26rpx;
height: 26rpx;
}
}
.img {
display: block;
width: 100%;
height: 100%;
}
.check {
position: absolute;
top: 0;
left: 0;
font-size: 32rpx;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
border-radius: 8rpx 8rpx 8rpx 8rpx;
.check-icon {
width: 36rpx;
height: 36rpx;
}
}
}
.icon {
display: block;
width: 112rpx;
height: 80rpx;
}
.name {
margin-top: 28rpx;
font-size: 28rpx;
color: #adacb2;
text-align: center;
}
}
}
.reject {
font-size: 32rpx;
color: #ef3939;
}
} }
// .footer-new { // .footer-new {

62
src/patient/pages/personalInformation/index.ts

@ -4,6 +4,7 @@ const licia = require('miniprogram-licia')
Page({ Page({
data: { data: {
scrollBottom: '',
isEdit: false, isEdit: false,
area: [] as string[][], area: [] as string[][],
city: [] as string[][], city: [] as string[][],
@ -32,6 +33,11 @@ Page({
}, },
], ],
bolList: {
1: '是',
2: '否',
},
ageRangeValue: '0', ageRangeValue: '0',
dict: {} as any, dict: {} as any,
@ -50,6 +56,17 @@ Page({
value: item.name, value: item.name,
} }
}), }),
popupShow: false,
popupType: 'popup7',
popupParams: {} as any,
},
onLoad(options) {
if (options.bottom) {
this.setData({
scrollBottom: options.bottom,
})
}
}, },
onShow() { onShow() {
const SystemInfo = app.globalSystemInfo const SystemInfo = app.globalSystemInfo
@ -92,6 +109,15 @@ Page({
this.handleChangeDiagnoseType({ detail: { value: [diagnoseTypeValue] } }) this.handleChangeDiagnoseType({ detail: { value: [diagnoseTypeValue] } })
this.handleDiagnoseTypeSave(false) this.handleDiagnoseTypeSave(false)
// this.handleTapRT(); // this.handleTapRT();
if (this.data.scrollBottom) {
wx.pageScrollTo({
scrollTop: 100000,
})
this.setData({
scrollBottom: '',
})
}
}, },
formatBorn(Birth) { formatBorn(Birth) {
let bron = '' let bron = ''
@ -227,6 +253,8 @@ Page({
previousConvulsion: zdUserInfo.PreviousConvulsion, previousConvulsion: zdUserInfo.PreviousConvulsion,
traditionalImmunosuppressant: zdUserInfo.TraditionalImmunosuppressant, traditionalImmunosuppressant: zdUserInfo.TraditionalImmunosuppressant,
medicalInsuranceType: zdUserInfo.MedicalInsuranceType, medicalInsuranceType: zdUserInfo.MedicalInsuranceType,
isKnowTituyo: zdUserInfo.IsKnowTituyo,
isUseTituyo: zdUserInfo.IsUseTituyo,
...zdUserInfo, ...zdUserInfo,
}, },
}) })
@ -245,6 +273,35 @@ Page({
app.getZdUserInfo(this, true, this.formatUserInfo.bind(this)) app.getZdUserInfo(this, true, this.formatUserInfo.bind(this))
}) })
}, },
handleNoUpload() {
return false
},
handleSetData(e) {
this.setData({
'zdUserInfo.prescriptionImg': e.detail.imgUrl,
})
this.updateUserInfo()
},
handleDelData() {
this.setData({
popupShow: true,
popupType: 'popup7',
})
},
handlePopupOk() {
this.setData({
popupShow: false,
popupType: '',
'zdUserInfo.prescriptionImg': '',
})
this.updateUserInfo()
},
handlePopupCancel() {
this.setData({
popupShow: false,
popupType: '',
})
},
handleChangeTel() { handleChangeTel() {
wx.navigateTo({ wx.navigateTo({
@ -280,4 +337,9 @@ Page({
url, url,
}) })
}, },
handlePreview() {
wx.previewImage({
urls: [this.data.zdUserInfo.PrescriptionImg],
})
},
}) })

80
src/patient/pages/personalInformation/index.wxml

@ -123,6 +123,78 @@
</view> </view>
</view> </view>
</view> </view>
<block wx:if="{{zdUserInfo.UserType < 4}}">
<view class="row">
<view class="row-header">
<view class="label">是否了解替妥尤单抗N01</view>
</view>
<view class="row-content">
<view class="radio-btns radio-btns3">
<view
class="btn {{zdUserInfo.IsKnowTituyo==index && 'active'}}"
wx:for="{{bolList}}"
wx:key="index"
bind:tap="handleRedioSelect"
data-key="IsKnowTituyo"
data-id="{{index}}"
>
{{item}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">是否有使用替妥尤单抗N01</view>
</view>
<view class="row-content">
<view class="radio-btns radio-btns3">
<view
class="btn {{zdUserInfo.IsUseTituyo==index && 'active'}}"
wx:for="{{bolList}}"
wx:key="index"
bind:tap="handleRedioSelect"
data-key="IsUseTituyo"
data-id="{{index}}"
>
{{item}}
</view>
</view>
</view>
</view>
<block wx:if="{{zdUserInfo.IsUseTituyo == 1 }}">
<view class="row">
<view class="row-header">
<view class="label">请上传您的处方证明</view>
</view>
<view class="row-sub">处方证明审核通过后,即可享受平台全部服务</view>
<uploadFile class="upload" accept="image" bind:file="handleSetData">
<view
class="mask"
wx:if="{{zdUserInfo.DrugsAuditStatus==1 || zdUserInfo.DrugsAuditStatus==3}}"
catchtap="handleNoUpload"
></view>
<view class="upload-container">
<view class="upload-img" wx:if="{{zdUserInfo.PrescriptionImg}}">
<view class="del" catchtap="handleDelData" wx:if="{{zdUserInfo.DrugsAuditStatus==2}}">
<image class="d-icon" src="{{imageUrl}}icon77.png?t={{Timestamp}}"></image>
</view>
<image class="img" src="{{zdUserInfo.PrescriptionImg}}" mode="aspectFill" catch:tap="handlePreview"></image>
<view class="check" wx:if="{{zdUserInfo.DrugsAuditStatus==1}}">
<image class="check-icon" src="{{imageUrl}}icon81.png?t={{Timestamp}}"></image>
审核中...
</view>
</view>
<block wx:else>
<van-icon name="plus" style="font-size: 80rpx; color: rgba(173, 172, 178, 0.5)" />
</block>
</view>
</uploadFile>
<view class="reject" wx:if="{{zdUserInfo.DrugsAuditStatus==2}}">*审核不通过</view>
<view class="row-sub" wx:else>您可以上传您的诊断处方、住院小结等</view>
</view>
</block>
</block>
</view> </view>
</view> </view>
<view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index?back=1">切换医生端</view> <view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index?back=1">切换医生端</view>
@ -154,3 +226,11 @@
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
</van-popup> </van-popup>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

8
src/patient/pages/qol/index.scss

@ -13,8 +13,8 @@ page {
} }
.module1 { .module1 {
margin: 32rpx 40rpx 0; margin: 32rpx 40rpx 0;
padding: 214rpx 40rpx 0; padding: 254rpx 40rpx 0;
height: 1034rpx; height: 1136rpx;
box-sizing: border-box; box-sizing: border-box;
.content { .content {
font-size: 32rpx; font-size: 32rpx;
@ -22,7 +22,7 @@ page {
line-height: 56rpx; line-height: 56rpx;
} }
.container { .container {
margin-top: 32rpx; margin-top: 72rpx;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
.title { .title {
padding-top: 32rpx; padding-top: 32rpx;
@ -106,7 +106,7 @@ page {
} }
} }
.module2 { .module2 {
margin: 32rpx 40rpx 0; margin: 82rpx 40rpx 0;
padding: 40rpx; padding: 40rpx;
background: #ffffff; background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;

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

@ -3,9 +3,9 @@
</navbar> </navbar>
<view <view
class="page" class="page"
style="background: url('{{imageUrl}}bg15.png?t={{Timestamp}}') no-repeat top center/100% 518rpx;padding-top:{{pageTop}}px;" style="background: url('{{imageUrl}}bg15.png?t={{Timestamp}}') no-repeat top center/100% 518rpx;padding-top:{{pageTop+20}}px;"
> >
<view class="module1" style="background: url('{{imageUrl}}bg16.png?t={{Timestamp}}') no-repeat top center/cover"> <view class="module1" style="background: url('{{imageUrl}}bg16.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="content"> <view class="content">
<view> <view>
研究表明,GO-QOL生活质量评估能敏锐反映患者的主观感受变化,是评估治疗效果的重要工具。 研究表明,GO-QOL生活质量评估能敏锐反映患者的主观感受变化,是评估治疗效果的重要工具。

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

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"navbar": "/components/navbar/index" "navbar": "/components/navbar/index",
"van-toast": "@vant/weapp/toast/index"
} }
} }

9
src/patient/pages/qolAdd/index.scss

@ -1,5 +1,5 @@
page { page {
background-color: #ffffff; background-color: #f6f8f9;
} }
.page { .page {
@ -53,6 +53,9 @@ page {
padding: 0 40rpx 200rpx; padding: 0 40rpx 200rpx;
.row { .row {
margin-bottom: 52rpx; margin-bottom: 52rpx;
padding: 32rpx;
border-radius: 24rpx;
background-color: #fff;
.title { .title {
font-size: 36rpx; font-size: 36rpx;
color: #211d2e; color: #211d2e;
@ -124,3 +127,7 @@ page {
} }
} }
} }
.toast {
font-size: 40rpx;
}

49
src/patient/pages/qolAdd/index.ts

@ -1,7 +1,10 @@
import Toast from '@vant/weapp/toast/toast'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
toastText: '',
id: '', id: '',
step: 0, step: 0,
qolList0: [ qolList0: [
@ -198,6 +201,19 @@ Page({
}) })
}, },
handleNext() { handleNext() {
const { qolList0 } = this.data
for (let i = 0; i < qolList0.length; i++) {
const item = qolList0[i]
const order = item.title.split('.')[0]
if (!item.answer) {
this.setData({
toastText: `请填写第${order}`,
})
Toast()
return
}
}
this.setData({ this.setData({
step: 1, step: 1,
}) })
@ -218,10 +234,10 @@ Page({
const item = arr[i] const item = arr[i]
const order = item.title.split('.')[0] const order = item.title.split('.')[0]
if (!item.answer) { if (!item.answer) {
wx.showToast({ this.setData({
title: `请填写第${order}`, toastText: `请填写第${order}`,
icon: 'none',
}) })
Toast()
return return
} }
form[`Question${order}`] = item.answer form[`Question${order}`] = item.answer
@ -244,11 +260,28 @@ Page({
}) })
}, },
handleBack() { handleBack() {
wx.navigateBack({ const { qolList0, qolList1 } = this.data
fail() { const isEmpry = [...qolList0, ...qolList1].every((item) => !item.answer)
wx.reLaunch({ if (isEmpry) {
url: '/patient/pages/index/index', wx.navigateBack()
}) return
}
wx.showModal({
content: '已答问题将被清空,是否放弃自评?',
confirmColor: '#8c75d0',
cancelColor: '#141515',
cancelText: '放弃',
confirmText: '继续',
success: (e) => {
if (e.cancel) {
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/patient/pages/index/index',
})
},
})
}
}, },
}) })
}, },

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

@ -1,10 +1,10 @@
<navbar custom-style="background:{{background}}" fixed> <navbar custom-style="background:transparent;" fixed>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" /> <van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar> </navbar>
<view class="page"> <view class="page">
<view <view
class="page-header" class="page-header"
style="background:#fff url('{{imageUrl}}bg18.png?t={{Timestamp}}') no-repeat top center/100% 412rpx;padding-top:{{pageTop+20}}px;" style="background:#F6F8F9 url('{{imageUrl}}bg18.png?t={{Timestamp}}') no-repeat top center/100% 412rpx;padding-top:{{pageTop+20}}px;"
> >
<view class="progress"> <view class="progress">
<view class="p-item active"> <view class="p-item active">
@ -64,3 +64,7 @@
<view class="prev" bind:tap="handlePrev">上一步</view> <view class="prev" bind:tap="handlePrev">上一步</view>
</view> </view>
</view> </view>
<van-toast id="van-toast">
<view class="toast">{{toastText}}</view>
</van-toast>

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

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

95
src/patient/pages/qolResult/index.scss

@ -15,9 +15,13 @@ p age {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.wrap { .wrap {
.w-tip {
font-size: 28rpx;
color: #211d2e;
}
.w-header { .w-header {
display: flex; display: flex;
align-items: flex-end; align-items: flex-start;
gap: 10rpx; gap: 10rpx;
line-height: 1; line-height: 1;
.num { .num {
@ -26,6 +30,7 @@ p age {
font-weight: bold; font-weight: bold;
} }
.label { .label {
margin-top: 14rpx;
padding: 4rpx 16rpx; padding: 4rpx 16rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
font-size: 28rpx; font-size: 28rpx;
@ -36,8 +41,8 @@ p age {
} }
} }
.tip { .tip {
font-size: 28rpx; font-size: 32rpx;
color: #adacb2; color: var(--color);
} }
} }
.status { .status {
@ -81,30 +86,26 @@ p age {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12rpx; gap: 12rpx;
font-size: 24rpx;
color: rgba(33, 29, 46, 0.28);
.skew { .skew {
width: 10rpx; width: 8rpx;
height: 22rpx; height: 32rpx;
background: #b982ff; background: #b982ff;
transform: skew(-15deg);
} }
} .c-content {
.c-content { font-size: 32rpx;
margin-top: 16rpx; color: #211d2e;
font-size: 32rpx; font-weight: bold;
color: #211d2e; display: flex;
font-weight: bold; align-items: center;
display: flex; gap: 10rpx;
align-items: center; .label {
gap: 10rpx; padding: 0 12rpx;
.label { font-size: 20rpx;
padding: 0 12rpx; color: #ffffff;
font-size: 20rpx; line-height: 32rpx;
color: #ffffff; border-radius: 50rpx 50rpx 50rpx 0rpx;
line-height: 32rpx; background: var(--label-background);
border-radius: 50rpx 50rpx 50rpx 0rpx; }
background: var(--label-background);
} }
} }
.progress { .progress {
@ -174,18 +175,42 @@ p age {
} }
} }
.page-effect-wrap { .page-effect-wrap {
margin: 64rpx 0 0; margin-top: 40rpx;
display: flex; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 40%);
align-items: center; border-radius: 32rpx;
justify-content: center; box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(25, 0, 57, 0.07);
.page-effect { .e-header {
padding: 20rpx 40rpx;
display: flex;
align-items: center;
gap: 12rpx;
font-size: 32rpx; font-size: 32rpx;
color: var(--color); color: #ffffff;
line-height: 44rpx; .icon {
padding: 8rpx 42rpx; width: 32rpx;
background: var(--background); height: 32rpx;
border-radius: 96rpx 96rpx 96rpx 96rpx; }
border: 2rpx solid #ffffff; }
.e-container {
padding: 44rpx 44rpx 0;
border-radius: 30rpx;
background-color: #fff;
text-align: center;
.r1 {
font-size: 32rpx;
color: #211d2e;
line-height: 52rpx;
.num{
color: #B982FF;
}
}
.btn {
margin-top: 44rpx;
padding: 32rpx;
font-size: 36rpx;
color: #b982ff;
border-top: 1px dashed rgba(105,104,110,0.21);
}
} }
} }
.report { .report {

42
src/patient/pages/qolResult/index.ts

@ -4,6 +4,12 @@ Page({
data: { data: {
id: '', id: '',
detail: {}, detail: {},
popupShow: false,
popupType: 'popup8',
popupParams: {
close: true,
} as any,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
@ -11,6 +17,27 @@ Page({
}) })
app.waitLogin({ type: [1] }).then(() => { app.waitLogin({ type: [1] }).then(() => {
this.getDetail() this.getDetail()
this.getToast()
})
},
getToast() {
wx.ajax({
method: 'GET',
url: '?r=zd/popup/get-popup',
data: {
type: 2,
},
}).then((res) => {
if (res.showAlert) {
this.setData({
popupShow: true,
popupType: 'popup8',
popupParams: {
subscribe_img: res.subscribe_img,
close: true,
},
})
}
}) })
}, },
getDetail() { getDetail() {
@ -40,6 +67,21 @@ Page({
}, },
}) })
}, },
handlePopupOk() {
this.handlePopupCancel()
},
handlePopupCancel() {
wx.ajax({
method: 'POST',
url: '?r=zd/popup/add-record',
data: {
type: 2,
},
})
this.setData({
popupShow: false,
})
},
}) })
export {} export {}

69
src/patient/pages/qolResult/index.wxml

@ -3,34 +3,36 @@
</navbar> </navbar>
<view <view
class="page {{detail.TotalScore>=0 && 'status1'}} {{detail.TotalScore>=40 && 'status2'}} {{detail.TotalScore>=80 && 'status3'}}" class="page {{detail.TotalScore>=0 && 'status1'}} {{detail.TotalScore>=40 && 'status2'}} {{detail.TotalScore>=80 && 'status3'}}"
style="background: url('{{imageUrl}}bg15.png?t={{Timestamp}}') no-repeat top center/100% 518rpx;padding-top:{{pageTop+20}}px;" style="background: url('{{imageUrl}}bg22.png?t={{Timestamp}}') no-repeat top center/100% 412rpx;padding-top:{{pageTop+20}}px;"
> >
<view class="container"> <view class="container">
<view class="info"> <view class="info">
<view class="wrap"> <view class="wrap">
<view class="w-tip">本次TED生活质量评分</view>
<view class="w-header"> <view class="w-header">
<view class="num">{{detail.TotalScore}}</view> <view class="num">{{detail.TotalScore}}</view>
<view class="label" wx:if="{{detail.TotalScore >= 80}}">轻度影响</view> <view class="label" wx:if="{{detail.TotalScore >= 80}}">轻度影响</view>
<view class="label" wx:elif="{{detail.TotalScore >= 40}}">中度影响</view> <view class="label" wx:elif="{{detail.TotalScore >= 40}}">中度影响</view>
<view class="label" wx:else>重度影响</view> <view class="label" wx:else>重度影响</view>
</view> </view>
<view class="tip">本次TED生活质量评分</view> <view class="tip">分数越高,对生活质量影响越小</view>
</view> </view>
<image class="status" wx:if="{{detail.TotalScore >= 80}}" src="{{imageUrl}}icon72.png?t={{Timestamp}}"></image> <image class="status" wx:if="{{detail.TotalScore >= 80}}" src="{{imageUrl}}icon72.png?t={{Timestamp}}"></image>
<image class="status" wx:elif="{{detail.TotalScore >= 40}}" src="{{imageUrl}}icon71.png?t={{Timestamp}}"></image> <image class="status" wx:elif="{{detail.TotalScore >= 40}}" src="{{imageUrl}}icon71.png?t={{Timestamp}}"></image>
<image class="status" wx:else src="{{imageUrl}}icon70.png?t={{Timestamp}}"></image> <image class="status" wx:else src="{{imageUrl}}icon70.png?t={{Timestamp}}"></image>
</view> </view>
<view class="c-line"></view> <view class="c-line"></view>
<view class="card {{detail.VisionScore>=0 && 'status1'}} {{detail.VisionScore>=40 && 'status2'}} {{detail.VisionScore>=80 && 'status3'}}"> <view
class="card {{detail.VisionScore>=0 && 'status1'}} {{detail.VisionScore>=40 && 'status2'}} {{detail.VisionScore>=80 && 'status3'}}"
>
<view class="c-header"> <view class="c-header">
<view class="skew"></view> <view class="skew"></view>
视觉功能 <view class="c-content">
</view> 视觉功能得分:{{detail.VisionScore}}
<view class="c-content"> <view class="label" wx:if="{{detail.VisionScore >= 80}}">轻度</view>
当前分数:{{detail.VisionScore}} <view class="label" wx:elif="{{detail.VisionScore >= 40}}">中度</view>
<view class="label" wx:if="{{detail.VisionScore >= 80}}">轻度影响</view> <view class="label" wx:else>重度</view>
<view class="label" wx:elif="{{detail.VisionScore >= 40}}">中度影响</view> </view>
<view class="label" wx:else>重度影响</view>
</view> </view>
<view class="progress"> <view class="progress">
<view class="p-item"> <view class="p-item">
@ -60,16 +62,17 @@
</view> </view>
</view> </view>
</view> </view>
<view class="card {{detail.AppearanceScore>=0 && 'status1'}} {{detail.AppearanceScore>=40 && 'status2'}} {{detail.AppearanceScore>=80 && 'status3'}}"> <view
class="card {{detail.AppearanceScore>=0 && 'status1'}} {{detail.AppearanceScore>=40 && 'status2'}} {{detail.AppearanceScore>=80 && 'status3'}}"
>
<view class="c-header"> <view class="c-header">
<view class="skew"></view> <view class="skew"></view>
外观 <view class="c-content">
</view> 外观得分:{{detail.AppearanceScore}}
<view class="c-content"> <view class="label" wx:if="{{detail.AppearanceScore >= 80}}">轻度</view>
当前分数:{{detail.AppearanceScore}} <view class="label" wx:elif="{{detail.AppearanceScore >= 40}}">中度</view>
<view class="label" wx:if="{{detail.AppearanceScore >= 80}}">轻度影响</view> <view class="label" wx:else>重度</view>
<view class="label" wx:elif="{{detail.AppearanceScore >= 40}}">中度影响</view> </view>
<view class="label" wx:else>重度影响</view>
</view> </view>
<view class="progress"> <view class="progress">
<view class="p-item"> <view class="p-item">
@ -99,16 +102,28 @@
</view> </view>
</view> </view>
</view> </view>
<view class="effect">分数越低, 对生活质量影响越严重</view> <!-- <view class="effect">分数越低, 对生活质量影响越严重</view> -->
</view> </view>
<view class="page-effect-wrap"> <view class="page-effect-wrap">
<view class="page-effect" wx:if="{{detail.TotalScore >= 80}}">建议保持定期监测,保持良好生活习惯</view> <view class="e-header">
<view class="page-effect" wx:elif="{{detail.TotalScore >= 40}}">建议就诊检查,评估是否需要调整治疗</view> <image class="icon" src="{{imageUrl}}icon79.png?t={{Timestamp}}"></image>
<view class="page-effect" wx:else>建议前往眼科中心 及时就诊</view> 建议就诊检查,评估是否需要调整治
</view> </view>
<view class="e-container">
<view class="report" bind:tap="handleReport"> <view class="r1">定期评测,可帮助您更好地了解改善情况</view>
查看我的评估报告 <view class="r1">已完成评测<text class="num">{{detail.Times}}</text>次</view>
<van-icon name="arrow" /> <view class="btn" bind:tap="handleReport">
查看我的评估报告
<van-icon name="arrow" />
</view>
</view>
</view> </view>
</view> </view>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

8
src/utils/page.ts

@ -25,9 +25,11 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje
if (Number(scrollTop) > 20) { if (Number(scrollTop) > 20) {
background = '#ffffff' background = '#ffffff'
} }
this.setData({ if (background !== this.data.background) {
background, this.setData({
}) background,
})
}
if (originalOnPageScroll) { if (originalOnPageScroll) {
originalOnPageScroll.call(this, options) originalOnPageScroll.call(this, options)
} }

2
typings/index.d.ts vendored

@ -39,7 +39,7 @@ interface IAppOption {
checkLoginType: (type: pageType[] | 'any', backPath?: string) => boolean checkLoginType: (type: pageType[] | 'any', backPath?: string) => boolean
getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void
getUserInfo: (type: 0 | 1 | 2) => Promise<never> getUserInfo: (type: 0 | 1 | 2) => Promise<never>
mpBehavior: (data: { doctor?: boolean; PageName: string }) => void mpBehavior: (data: { doctor?: boolean; PageName: string; detailId?: string; promotionMethodId?: string }) => void
oldMpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void oldMpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void
zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void
zdGetTheme: () => Promise<'PATIENT'> zdGetTheme: () => Promise<'PATIENT'>

Loading…
Cancel
Save