Browse Source

删除冗余弹窗

master
kola-web 2 weeks ago
parent
commit
6fafba87bb
  1. 51
      src/patient/pages/index/index.ts

51
src/patient/pages/index/index.ts

@ -34,11 +34,7 @@ Page({
liveDownList: [], liveDownList: [],
// toastShow: true, // toastShow: true,
// toastType: "doubleStandards",
// toastType: "healthCare",
// toastType: "aldAlert",
// toastType: "dedicatedDoctor", // toastType: "dedicatedDoctor",
// toastType: 'public-toast',
// toastType: 'medical-guide', // toastType: 'medical-guide',
// toastType: 'question-toast', // toastType: 'question-toast',
// toastType: 'guideEnterInfo', // toastType: 'guideEnterInfo',
@ -115,8 +111,8 @@ Page({
}) })
}, },
async getPopup() { async getPopup() {
if (this.data.toastShow) // https://fa0ci3qr2z.feishu.cn/wiki/EBX6woN7xiaartkYkBpcfbYQnfn
return if (this.data.toastShow) return
const noteGuideShown = wx.getStorageSync('noteGuideShown') const noteGuideShown = wx.getStorageSync('noteGuideShown')
if (!noteGuideShown) { if (!noteGuideShown) {
@ -231,13 +227,11 @@ Page({
// 设置显示状态 // 设置显示状态
if (code === 'medicalInsurance' && showStatus == 1) { if (code === 'medicalInsurance' && showStatus == 1) {
statusMap.medicalInsuranceShow = true statusMap.medicalInsuranceShow = true
if (openStatus == 1) if (openStatus == 1) statusMap.medicalInsuranceJump = true
statusMap.medicalInsuranceJump = true
} }
if (code === 'hospitalMap' && showStatus == 1) { if (code === 'hospitalMap' && showStatus == 1) {
statusMap.hospitalMapShow = true statusMap.hospitalMapShow = true
if (openStatus == 1) if (openStatus == 1) statusMap.hospitalMapJump = true
statusMap.hospitalMapJump = true
} }
if (code === 'adl' && showStatus == 1) { if (code === 'adl' && showStatus == 1) {
statusMap.qolShow = true statusMap.qolShow = true
@ -357,8 +351,7 @@ Page({
}) })
return return
} }
if (!url) if (!url) return
return
if (code === 'doctor') { if (code === 'doctor') {
app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' }) app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' })
} }
@ -392,8 +385,8 @@ Page({
}, },
handleAddQol() { handleAddQol() {
const { qolDetail } = this.data const { qolDetail } = this.data
const url const url =
= qolDetail.Id && qolDetail.isTodayRecord qolDetail.Id && qolDetail.isTodayRecord
? `/patient/pages/qolAdd/index?id=${qolDetail.Id}&edit=1` ? `/patient/pages/qolAdd/index?id=${qolDetail.Id}&edit=1`
: `/patient/pages/qol/index` : `/patient/pages/qol/index`
wx.navigateTo({ wx.navigateTo({
@ -414,8 +407,7 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/hormones/index?id=${hormoneDetail.recordId}`, url: `/patient/pages/hormones/index?id=${hormoneDetail.recordId}`,
}) })
} } else {
else {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/hormonesStart/index', url: '/patient/pages/hormonesStart/index',
}) })
@ -431,14 +423,12 @@ Page({
url: '/patient/pages/adl/index?nrdl=1', url: '/patient/pages/adl/index?nrdl=1',
}) })
this.handleToastCancel() this.handleToastCancel()
} } else if (toastType === 'doubleStandards') {
else if (toastType === 'doubleStandards') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
}) })
this.handleToastCancel() this.handleToastCancel()
} } else if (toastType === 'dedicatedDoctor') {
else if (toastType === 'dedicatedDoctor') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-popup', url: '?r=zd/popup/close-popup',
@ -451,8 +441,7 @@ Page({
}) })
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
} } else if (toastType === 'medical-guide') {
else if (toastType === 'medical-guide') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/add-record', url: '?r=zd/popup/add-record',
@ -463,8 +452,7 @@ Page({
}) })
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
} } else if (toastType === 'guideEnterInfo') {
else if (toastType === 'guideEnterInfo') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-need-popup', url: '?r=zd/popup/close-need-popup',
@ -475,8 +463,7 @@ Page({
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
}) })
} } else if (toastType === 'guideEnterInfoJump') {
else if (toastType === 'guideEnterInfoJump') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/personalInformation/index', url: '/patient/pages/personalInformation/index',
}) })
@ -493,8 +480,7 @@ Page({
Type: 5, Type: 5,
}, },
}) })
} } else if (toastType === 'dedicatedDoctor' && sure) {
else if (toastType === 'dedicatedDoctor' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-popup', url: '?r=zd/popup/close-popup',
@ -502,15 +488,13 @@ Page({
Type: 6, Type: 6,
}, },
}) })
} } else if (toastType === 'medical-guide' && sure) {
else if (toastType === 'medical-guide' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/add-record', url: '?r=zd/popup/add-record',
data: { type: 3 }, data: { type: 3 },
}) })
} } else if (toastType === 'guideEnterInfo' && sure) {
else if (toastType === 'guideEnterInfo' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-need-popup', url: '?r=zd/popup/close-need-popup',
@ -553,8 +537,7 @@ Page({
infoList: list, infoList: list,
}) })
}) })
} } else {
else {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/pic-text/collection', url: '?r=zd/pic-text/collection',

Loading…
Cancel
Save