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.
67 lines
1.3 KiB
67 lines
1.3 KiB
2 months ago
|
const app = getApp<IAppOption>()
|
||
|
|
||
|
Component({
|
||
|
properties: {
|
||
|
did: {
|
||
|
type: String,
|
||
|
value: '',
|
||
|
},
|
||
|
},
|
||
|
|
||
|
data: {
|
||
|
show: false,
|
||
|
doctorInfo: {},
|
||
|
|
||
|
imageUrl: app.globalData.imageUrl,
|
||
|
Timestamp: app.globalData.Timestamp,
|
||
|
},
|
||
|
methods: {
|
||
|
handleShow() {
|
||
|
wx.ajax({
|
||
|
method: 'GET',
|
||
|
url: '?r=wtx/doctor/get-info',
|
||
|
data: {
|
||
|
doctorId: this.data.did,
|
||
|
},
|
||
|
}).then((res) => {
|
||
|
this.setData({
|
||
|
doctorInfo: res,
|
||
|
show: true,
|
||
|
})
|
||
|
})
|
||
|
},
|
||
|
handleCancel() {
|
||
|
this.setData({
|
||
|
show: false,
|
||
|
})
|
||
|
},
|
||
|
handleUnbind() {
|
||
|
const { did } = this.data
|
||
|
wx.showModal({
|
||
|
title: '确认解绑?',
|
||
|
confirmColor: 'rgba(246, 74, 58, 1)',
|
||
|
success: (res) => {
|
||
|
if (res.confirm) {
|
||
|
wx.ajax({
|
||
|
method: 'POST',
|
||
|
url: '?r=wtx/account/unbind-doctor',
|
||
|
data: {
|
||
|
doctorId: did,
|
||
|
},
|
||
|
}).then(() => {
|
||
|
wx.showToast({
|
||
|
title: '解绑成功',
|
||
|
icon: 'none',
|
||
|
})
|
||
|
this.setData({
|
||
|
show: false,
|
||
|
})
|
||
|
this.triggerEvent('update')
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
})
|
||
|
},
|
||
|
},
|
||
|
})
|