Browse Source

1.10.0版本联调

v1.10.0
kola-web 4 days ago
parent
commit
22a5c7a5df
  1. 4
      README.md
  2. 11
      project.private.config.json
  3. 16
      src/app.ts
  4. 10
      src/components/popup/index.scss
  5. 5
      src/components/popup/index.wxml
  6. 4
      src/components/toast/index.wxml
  7. BIN
      src/images/icon81.png
  8. 14
      src/patient/pages/enterInfo/index.scss
  9. 30
      src/patient/pages/enterInfo/index.ts
  10. 23
      src/patient/pages/enterInfo/index.wxml
  11. 41
      src/patient/pages/index/index.ts
  12. 3
      src/patient/pages/liveDetail/index.json
  13. 29
      src/patient/pages/liveDetail/index.scss
  14. 70
      src/patient/pages/liveDetail/index.ts
  15. 57
      src/patient/pages/liveDetail/index.wxml
  16. 4
      src/patient/pages/personalInformation/index.json
  17. 97
      src/patient/pages/personalInformation/index.scss
  18. 56
      src/patient/pages/personalInformation/index.ts
  19. 73
      src/patient/pages/personalInformation/index.wxml
  20. 3
      src/patient/pages/qolAdd/index.json
  21. 6
      src/patient/pages/qolAdd/index.scss
  22. 33
      src/patient/pages/qolAdd/index.ts
  23. 4
      src/patient/pages/qolAdd/index.wxml
  24. 8
      src/patient/pages/qolResult/index.scss
  25. 40
      src/patient/pages/qolResult/index.ts
  26. 18
      src/patient/pages/qolResult/index.wxml
  27. 2
      src/utils/page.ts

4
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问题
@ -29,5 +29,3 @@ wx.showModal({
审核账号 审核账号
18910233000 1111 18910233000 1111

11
project.private.config.json

@ -23,11 +23,18 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "患者-个人信息",
"pathName": "patient/pages/personalInformation/index",
"query": "bottom=1",
"scene": null,
"launchMode": "default"
},
{
"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": "医生-患者详情",

16
src/app.ts

@ -365,7 +365,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 +433,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 +489,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 +503,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)
}) })
}, },

10
src/components/popup/index.scss

@ -182,10 +182,20 @@
.popup8 { .popup8 {
width: 590rpx; width: 590rpx;
height: 880rpx; height: 880rpx;
position: relative;
.p-img { .p-img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.code{
position: absolute;
top: 372rpx;
left: 50%;
transform: translateX(-50%);
border-radius: 24rpx;
width: 300rpx;
height: 300rpx;
}
} }
.close { .close {

5
src/components/popup/index.wxml

@ -58,7 +58,7 @@
<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'}}"> <view class="popup7" wx:if="{{type==='popup7'}}">
<image class="badge" src="/images/icon78.png"></image> <image class="badge" src="{{imageUrl}}icon78.png?t={{Timestamp}}"></image>
<view class="contaienr"> <view class="contaienr">
<view class="content">要删除这张照片吗 ?</view> <view class="content">要删除这张照片吗 ?</view>
<view class="footer"> <view class="footer">
@ -68,7 +68,8 @@
</view> </view>
</view> </view>
<view class="popup8" wx:if="{{type==='popup8'}}"> <view class="popup8" wx:if="{{type==='popup8'}}">
<image class="p-img" src="{{imageUrl}}bg23.png?t={{Timestamp}}" show-menu-by-longpress></image> <image class="p-img" src="{{imageUrl}}bg23.png?t={{Timestamp}}"></image>
<image class="code" src="{{params.subscribe_img}}" show-menu-by-longpress></image>
</view> </view>
<image <image

4
src/components/toast/index.wxml

@ -778,8 +778,8 @@
</view> </view>
<view class="popup-drug-guide" wx:if="{{type == 'drug-guide'}}"> <view class="popup-drug-guide" wx:if="{{type == 'drug-guide'}}">
<view class="popup-container"> <view class="popup-container">
<image class="badge" src="/images/icon80.png"></image> <image class="badge" src="{{imageUrl}}icon80.png?t={{Timestamp}}"></image>
<view class="container" style="background: url('/images/bg31.png') no-repeat top center/100%"> <view class="container" style="background: url('{{imageUrl}}bg31.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="title"> <view class="title">
为更好地为您提供健康管理服务 为更好地为您提供健康管理服务
<view></view> <view></view>

BIN
src/images/icon81.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

14
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;
@ -117,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);
@ -146,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;
@ -168,7 +168,7 @@
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);
@ -181,11 +181,11 @@
} }
.upload { .upload {
margin-top: 24rpx; margin-top: 24rpx;
width: 100%; width: 208rpx;
.upload-container { .upload-container {
position: relative; position: relative;
width: calc(100vw - 80rpx); width: 208rpx;
height: 334rpx; height: 208rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #f6f8f9; background: #f6f8f9;
overflow: hidden; overflow: hidden;

30
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,8 +28,10 @@ Page({
proces: '0', proces: '0',
dict: {}, dict: {},
bolList: {
fileSrc: '', 1: '是',
2: '否',
},
popupShow: false, popupShow: false,
popupType: 'popup7', popupType: 'popup7',
@ -91,13 +96,28 @@ 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 } = 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 = "出生日期不能为空";
@ -136,6 +156,7 @@ Page({
inviteDoctorId: doctorId, inviteDoctorId: doctorId,
inviteChannel: inviteChan, inviteChannel: inviteChan,
IsAliQiWei, IsAliQiWei,
promotionMethodId: proMethodId,
}, },
}) })
.then((_res) => { .then((_res) => {
@ -171,7 +192,7 @@ Page({
}, },
handleSetData(e) { handleSetData(e) {
this.setData({ this.setData({
fileSrc: e.detail.imgUrl, prescriptionImg: e.detail.imgUrl,
}) })
}, },
handleDelData() { handleDelData() {
@ -184,6 +205,7 @@ Page({
this.setData({ this.setData({
popupShow: false, popupShow: false,
popupType: '', popupType: '',
prescriptionImg: '',
}) })
}, },
handlePopupCancel() { handlePopupCancel() {

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

@ -87,11 +87,11 @@
</view> </view>
<view class="row row-age"> <view class="row row-age">
<view <view
class="age-item {{HasTedSurgery==index && 'active'}}" class="age-item {{isKnowTituyo==index && 'active'}}"
data-id="{{index}}" data-id="{{index}}"
wx:for="{{dict.HasTedSurgery}}" wx:for="{{bolList}}"
wx:key="index" wx:key="index"
bind:tap="handleSelectHasTedSurgery" bind:tap="handleSelectKnowTituyo"
> >
{{item}} {{item}}
</view> </view>
@ -102,33 +102,34 @@
</view> </view>
<view class="row row-age"> <view class="row row-age">
<view <view
class="age-item {{HasTedSurgery==index && 'active'}}" class="age-item {{isUseTituyo==index && 'active'}}"
data-id="{{index}}" data-id="{{index}}"
wx:for="{{dict.HasTedSurgery}}" wx:for="{{bolList}}"
wx:key="index" wx:key="index"
bind:tap="handleSelectHasTedSurgery" bind:tap="handleSelectUseTituyo"
> >
{{item}} {{item}}
</view> </view>
</view> </view>
<block wx:if="{{isUseTituyo==1}}">
<view class="row-title"> <view class="row-title">
请上传您的处方证明 请上传您的处方证明
<view class="rt-content">处方证明审核通过后,即可享受平台全部服务</view> <view class="rt-content">处方证明审核通过后,即可享受平台全部服务</view>
</view> </view>
<uploadFile class="upload" accept="image" bind:file="handleSetData"> <uploadFile class="upload" accept="image" bind:file="handleSetData">
<view class="upload-container"> <view class="upload-container">
<view class="upload-img" wx:if="{{fileSrc}}"> <view class="upload-img" wx:if="{{prescriptionImg}}">
<view class="del" catchtap="handleDelData"> <view class="del" catchtap="handleDelData">
<image class="d-icon" src="/images/icon77.png"></image> <image class="d-icon" src="{{imageUrl}}icon77.png?t={{Timestamp}}"></image>
</view> </view>
<image class="img" src="{{fileSrc}}" mode="aspectFill"></image> <image class="img" src="{{prescriptionImg}}" mode="aspectFill"></image>
</view> </view>
<block wx:else> <block wx:else>
<image class="icon" wx:if="{{!diagnoseImg}}" src="/images/icon76.png"></image> <van-icon name="plus" style="font-size: 80rpx; color: rgba(173, 172, 178, 0.5)" />
<view class="name" wx:if="{{!diagnoseImg}}">您可以上传您的诊断处方、住院小结等</view>
</block> </block>
</view> </view>
</uploadFile> </uploadFile>
</block>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">

41
src/patient/pages/index/index.ts

@ -108,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({
@ -167,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') {
@ -450,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) {
@ -476,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/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"
} }
} }

29
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;
@ -170,10 +189,18 @@
} }
} }
.public { .public {
position: relative;
margin-top: 32rpx; margin-top: 32rpx;
display: block; display: block;
height: 270rpx; height: 270rpx;
border-radius: 24rpx; border-radius: 24rpx;
.p-code{
position: absolute;
top: 38rpx;
right: 74rpx;
width: 196rpx;
height: 196rpx;
}
} }
.content { .content {
margin-top: 24rpx; margin-top: 24rpx;

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

@ -6,6 +6,7 @@ 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: '',
@ -14,6 +15,10 @@ Page({
currentVideoSrc: '', currentVideoSrc: '',
lightList: [],
timeData: {},
popupShow: false, popupShow: false,
popupType: 'popup6', // 登录失败弹窗 popupType: 'popup6', // 登录失败弹窗
popupParams: { popupParams: {
@ -43,6 +48,7 @@ Page({
app.mpBehavior({ PageName: 'PG_PatientLiveDetails' }) app.mpBehavior({ PageName: 'PG_PatientLiveDetails' })
this.getDetail() this.getDetail()
this.setView() this.setView()
this.getLightList()
app.getZdUserInfo(this, true, () => { app.getZdUserInfo(this, true, () => {
this.getPosterParams() this.getPosterParams()
}) })
@ -51,6 +57,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',
@ -115,6 +136,16 @@ Page({
}) })
}) })
}, },
handleLightVideo(e) {
const { url } = e.currentTarget.dataset
this.setData({
currentVideoSrc: url,
})
this.videoContext.requestFullScreen({})
this.videoContext.seek(0)
this.videoContext.play()
},
handleReplay() { handleReplay() {
app.mpBehavior({ PageName: 'BTN_PatientLiveReview' }) app.mpBehavior({ PageName: 'BTN_PatientLiveReview' })
this.setData({ this.setData({
@ -127,6 +158,20 @@ Page({
handleFullscreenExit() { handleFullscreenExit() {
this.videoContext.pause() this.videoContext.pause()
}, },
handleBanner() {
const { detail, zdUserInfo, dateValue } = this.data
if (detail.IsSignUp && zdUserInfo.AuditStatus) {
// eslint-disable-next-line eqeqeq
if (zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4) {
// eslint-disable-next-line eqeqeq
if (detail.SignUpStatus == 2) {
if (detail.BeginTimeValue * 1 < dateValue * 1) {
this.handleLive()
}
}
}
}
},
handleLive() { handleLive() {
const { Type } = this.data.detail const { Type } = this.data.detail
app.mpBehavior({ PageName: 'BTN_PatientLiveEnter' }) app.mpBehavior({ PageName: 'BTN_PatientLiveEnter' })
@ -159,10 +204,14 @@ Page({
}) })
}, },
handleSignUp() { handleSignUp() {
const { SubscribeTemplateList } = this.data.detail
app.mpBehavior({ PageName: 'BTN_PatientLiveSign' }) app.mpBehavior({ PageName: 'BTN_PatientLiveSign' })
const { Type } = this.data.detail const { Type } = this.data.detail
const { UserType } = this.data.zdUserInfo const { UserType } = this.data.zdUserInfo
wx.requestSubscribeMessage({
tmplIds: SubscribeTemplateList,
complete: () => {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/activity/sign-up', url: '?r=zd/activity/sign-up',
@ -185,6 +234,8 @@ Page({
}) })
}) })
}, },
})
},
handleShare() { handleShare() {
this.setData({ this.setData({
shareShow: true, shareShow: true,
@ -329,19 +380,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)}`,
}) })
}, },
hadnleMessage() { handleTimeChange(e) {
wx.requestSubscribeMessage({ this.setData({
tmplIds: ['IMF4HFzZaKG13H3yjFyna23g0ZuIHcVND6dUGqhr8IA'], timeData: e.detail,
success(res) { })
console.log(res)
},
fail(err) {
console.log(err)
}, },
handleTimeFinish() {
this.setData({
dateValue: dayjs().valueOf(),
'detail.LeftTime': 0,
}) })
}, },
onShareAppMessage() { onShareAppMessage() {

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

@ -6,9 +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;"
> >
<button bind:tap="hadnleMessage">订阅消息</button> <image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}" bind:tap="handleBanner"></image>
<image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}"></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>
@ -38,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}}"
@ -56,26 +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>
<view class="lightspot">
<view class="l-title">直播亮点</view> <view class="l-title">直播亮点</view>
<view class="l-list"> <view class="l-list">
<view class="l-item" wx:for="{{2}}"> <view
<image class="photo" src="/images/bg24.png"></image> 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="wrap">
<view class="w-title">视频标题显示视频标题显示</view> <view class="w-title">{{item.title}}</view>
<view class="time">02:12</view> <view class="time">{{item.duration}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="public" style="background: url('/images/bg24.png') no-repeat center/100%"></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>

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"
} }
} }

97
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%);
@ -41,7 +41,7 @@ page {
.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 +51,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 +61,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 +132,91 @@ page {
} }
} }
} }
.upload {
margin-top: 24rpx;
display: block;
position: relative;
.mask {
position: absolute;
z-index: 10;
width: 100%;
height: 100%;
}
.upload-container {
position: relative;
width: 208rpx;
height: 208rpx;
border-radius: 16rpx;
background: #f6f8f9;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.upload-img {
position: relative;
width: 100%;
height: 100%;
.del {
position: absolute;
top: 0;
right: 0;
width: 40rpx;
height: 40rpx;
border-radius: 0 16rpx 0 16rpx;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
.d-icon {
width: 26rpx;
height: 26rpx;
}
}
.img {
display: block;
width: 100%;
height: 100%;
}
.check {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 32rpx;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
width: 234rpx;
height: 76rpx;
background: rgba(0, 0, 0, 0.8);
border-radius: 8rpx 8rpx 8rpx 8rpx;
.check-icon {
width: 36rpx;
height: 36rpx;
}
}
}
.icon {
display: block;
width: 112rpx;
height: 80rpx;
}
.name {
margin-top: 28rpx;
font-size: 28rpx;
color: #adacb2;
text-align: center;
}
}
}
.reject {
margin-top: 24rpx;
font-size: 32rpx;
color: #ef3939;
}
} }
// .footer-new { // .footer-new {

56
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
@ -82,6 +99,14 @@ Page({
this.setData({ this.setData({
dict: res, dict: res,
}) })
if (this.data.scrollBottom) {
wx.pageScrollTo({
scrollTop: 100000,
})
this.setData({
scrollBottom: '',
})
}
}) })
}, },
@ -227,6 +252,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 +272,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({

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

@ -123,6 +123,71 @@
</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 }}">
<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"></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>
</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 +219,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>

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"
} }
} }

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

@ -1,5 +1,5 @@
page { page {
background-color: #F6F8F9; background-color: #f6f8f9;
} }
.page { .page {
@ -127,3 +127,7 @@ page {
} }
} }
} }
.toast {
font-size: 40rpx;
}

33
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,6 +260,14 @@ Page({
}) })
}, },
handleBack() { handleBack() {
wx.showModal({
content: '已答问题将被清空,是否放弃自评?',
confirmColor: '#8c75d0',
cancelColor: '#141515',
cancelText: '放弃',
confirmText: '继续',
success: (e) => {
if (e.cancel) {
wx.navigateBack({ wx.navigateBack({
fail() { fail() {
wx.reLaunch({ wx.reLaunch({
@ -251,6 +275,9 @@ Page({
}) })
}, },
}) })
}
},
})
}, },
}) })

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

@ -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>

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

@ -21,7 +21,7 @@ p age {
} }
.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 {
@ -30,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;
@ -175,7 +176,7 @@ p age {
} }
.page-effect-wrap { .page-effect-wrap {
margin-top: 40rpx; margin-top: 40rpx;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 40%);
border-radius: 32rpx; border-radius: 32rpx;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(25, 0, 57, 0.07); box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(25, 0, 57, 0.07);
.e-header { .e-header {
@ -198,6 +199,9 @@ p age {
.r1 { .r1 {
font-size: 32rpx; font-size: 32rpx;
color: #211d2e; color: #211d2e;
.num{
color: #B982FF;
}
} }
.btn { .btn {
margin-top: 44rpx; margin-top: 44rpx;

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

@ -5,7 +5,7 @@ Page({
id: '', id: '',
detail: {}, detail: {},
popupShow: true, popupShow: false,
popupType: 'popup8', popupType: 'popup8',
popupParams: { popupParams: {
close: true, close: true,
@ -17,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() {
@ -46,8 +67,21 @@ Page({
}, },
}) })
}, },
handlePopupOk() {}, handlePopupOk() {
handlePopupCancel() {}, this.handlePopupCancel()
},
handlePopupCancel() {
wx.ajax({
method: 'POST',
url: '?r=zd/popup/add-record',
data: {
type: 2,
},
})
this.setData({
popupShow: false,
})
},
}) })
export {} export {}

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

@ -29,9 +29,9 @@
<view class="skew"></view> <view class="skew"></view>
<view class="c-content"> <view class="c-content">
视觉功能得分:{{detail.VisionScore}} 视觉功能得分:{{detail.VisionScore}}
<view class="label" wx:if="{{detail.VisionScore >= 80}}">轻度影响</view> <view class="label" wx:if="{{detail.VisionScore >= 80}}">轻度</view>
<view class="label" wx:elif="{{detail.VisionScore >= 40}}">中度影响</view> <view class="label" wx:elif="{{detail.VisionScore >= 40}}">中度</view>
<view class="label" wx:else>重度影响</view> <view class="label" wx:else>重度</view>
</view> </view>
</view> </view>
<view class="progress"> <view class="progress">
@ -69,9 +69,9 @@
<view class="skew"></view> <view class="skew"></view>
<view class="c-content"> <view class="c-content">
外观得分:{{detail.AppearanceScore}} 外观得分:{{detail.AppearanceScore}}
<view class="label" wx:if="{{detail.AppearanceScore >= 80}}">轻度影响</view> <view class="label" wx:if="{{detail.AppearanceScore >= 80}}">轻度</view>
<view class="label" wx:elif="{{detail.AppearanceScore >= 40}}">中度影响</view> <view class="label" wx:elif="{{detail.AppearanceScore >= 40}}">中度</view>
<view class="label" wx:else>重度影响</view> <view class="label" wx:else>重度</view>
</view> </view>
</view> </view>
<view class="progress"> <view class="progress">
@ -102,16 +102,16 @@
</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="e-header"> <view class="e-header">
<image class="icon" src="/images/icon79.png"></image> <image class="icon" src="{{imageUrl}}icon79.png?t={{Timestamp}}"></image>
建议就诊检查,评估是否需要调整治 建议就诊检查,评估是否需要调整治
</view> </view>
<view class="e-container"> <view class="e-container">
<view class="r1">定期评测,可帮助您更好地了解改善情况</view> <view class="r1">定期评测,可帮助您更好地了解改善情况</view>
<view class="r1">已完成评测x次</view> <view class="r1">已完成评测<text class="num">{{detail.Times}}</text>次</view>
<view class="btn" bind:tap="handleReport"> <view class="btn" bind:tap="handleReport">
查看我的评估报告 查看我的评估报告
<van-icon name="arrow" /> <van-icon name="arrow" />

2
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'
} }
if (background !== this.data.background) {
this.setData({ this.setData({
background, background,
}) })
}
if (originalOnPageScroll) { if (originalOnPageScroll) {
originalOnPageScroll.call(this, options) originalOnPageScroll.call(this, options)
} }

Loading…
Cancel
Save