You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

90 lines
1.9 KiB

const app = getApp<IAppOption>()
Page({
data: {
popupShow: false,
popupType: '',
popupParams: {
position: 'bottom',
} as any,
topicShow: false,
replayShow: false,
actionShow: false,
},
onLoad() {
app.waitLogin({ type: 0 }).then(() => {})
},
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'argument') {
app.mpBehavior({ PageName: 'BTN_PATIENTLOG' })
wx.ajax({
method: 'POST',
url: '?r=wtx/user/agree-guest-privacy',
data: {
WorkerId: app.globalData.scene?.workerId || '',
},
}).then(() => {
this.setData({
popupShow: false,
popupType: '',
popupParams: {},
})
const waitBindDoctorId = app.globalData.waitBindDoctorId
if (waitBindDoctorId) {
this.handleBindDoctor(waitBindDoctorId)
}
})
}
if (popupType === 'conformBindDoctorConform') {
this.setData({
popupShow: false,
})
wx.ajax({
method: 'POST',
url: '?r=wtx/account/wait-bind-doctor',
data: {
doctorId: app.globalData.waitBindDoctorId,
},
}).then(() => {
wx.navigateTo({
url: `/patient/pages/login/index`,
})
})
}
},
handlePopupCancel() {
const { popupType } = this.data
if (popupType === 'argument') {
wx.exitMiniProgram()
}
if (popupType === 'conformBindDoctorConform') {
this.setData({
popupShow: false,
})
wx.ajax({
method: 'POST',
url: '?r=wtx/account/wait-bind-doctor',
data: {
doctorId: app.globalData.waitBindDoctorId,
},
}).then(() => {
app.globalData.waitBindDoctorId = ''
})
}
},
handleWechatWork() {
wx.navigateTo({
url: '/pages/wechatWork/index',
})
},
topicClose() {
this.setData({
topicShow: false,
})
},
})
export {}