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.
98 lines
2.1 KiB
98 lines
2.1 KiB
|
1 week ago
|
const app = getApp<IAppOption>()
|
||
|
|
|
||
|
|
Page({
|
||
|
|
data: {
|
||
|
|
popupShow: false,
|
||
|
|
popupType: '',
|
||
|
|
popupParams: {
|
||
|
|
position: 'bottom',
|
||
|
|
} as any,
|
||
|
|
|
||
|
|
topicShow: false,
|
||
|
|
replayShow: false,
|
||
|
|
|
||
|
|
fileList: [] as any[],
|
||
|
|
},
|
||
|
|
onLoad() {
|
||
|
|
app.waitLogin({ type: 0 }).then(() => {})
|
||
|
|
},
|
||
|
|
handlePopupOk() {
|
||
|
|
const { popupType } = this.data
|
||
|
|
if (popupType === 'argument') {
|
||
|
|
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',
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handleSetData(e) {
|
||
|
|
const { fileList } = this.data
|
||
|
|
this.setData({
|
||
|
|
fileList: [...fileList, ...e.detail],
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handleDeleteFile(e) {
|
||
|
|
const { index } = e.detail
|
||
|
|
const { fileList } = this.data
|
||
|
|
this.setData({
|
||
|
|
fileList: fileList.filter((_, i) => i !== index),
|
||
|
|
})
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
export {}
|