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=xd/account/cancellation", data: {}, loading: true, }).then(() => { app.globalData.backPage = ""; app.globalData.loginState = ""; app.globalData.userInfo = {}; app.startLogin(); wx.reLaunch({ url: "/pages/login/index", }); }); } }, }); }, });