const app = getApp(); Page({ data: { durgInfo: {}, }, onLoad() { const _this = this; const eventChannel = this.getOpenerEventChannel(); eventChannel.on('durgInfo', function (data) { console.log(data); _this.setData({ durgInfo: data, }); }); }, handleBack() { wx.navigateBack(); }, handleCancellation() { wx.showModal({ title: '确认注销', content: '', confirmColor: '#cf5375', success(res) { if (res.confirm) { wx.ajax({ method: 'GET', url: '?r=zd/account/cancellation', data: {}, loading: true, }).then(() => { app.globalData.backPage = ''; app.globalData.zdUserInfo = {}; app.updateLoginInfo(() => { wx.reLaunch({ url: '/patient/pages/login/index', }); }); }); } }, }); }, }); export {};