const app = getApp(); Page({ data: { isFollow: 0, InviteDoctorName: "", codeUrl: "", }, onLoad(options) { app.waitLogin(true).then(() => { const { url, loginState } = app.globalData; this.setData({ isFollow: Number(options.isf), InviteDoctorName: options.iname === "null" ? "" : options.iname, codeUrl: `${url}?r=takeda/common/get-channel-wx-code&ChannelType=2&loginState=${loginState}`, }); if (!options.iname) { this.getApplyDoctor(); } }); }, getApplyDoctor() { app.getApplyDoctor().then((res) => { this.setData({ InviteDoctorName: res.InviteDoctorName, }); }); }, }); export {};