武田小程序
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.
 
 
 

64 lines
1.3 KiB

const app = getApp<IAppOption>();
Page({
data: {
isFollow: 0,
InviteDoctorName: "",
codeUrl: "",
},
onLoad(options) {
app.waitLogin(true).then(() => {
app.mpBehavior({ PageName: "PG_DOCTORSUBMITSUCCESS" });
this.setData({
isFollow: Number(options.isf),
InviteDoctorName: options.iname === "null" ? "" : options.iname,
});
this.getCodeUrl();
if (!options.iname) {
this.getApplyDoctor();
}
});
},
getApplyDoctor() {
app.getApplyDoctor().then((res) => {
this.setData({
InviteDoctorName: res.InviteDoctorName,
});
});
},
getCodeUrl() {
wx.ajax({
method: "GET",
url: "?r=takeda/common/get-channel-wx-code",
data: {
ChannelType: 2,
},
}).then((res) => {
this.setData({
codeUrl: res,
});
});
},
handleLoginOut() {
wx.showModal({
confirmColor: "#00B4C5",
cancelColor: "#141515",
title: "确认退出登录?",
success(res) {
if (res.confirm) {
app.globalData.isLogin = 0;
wx.ajax({
method: "POST",
url: "?r=takeda/account/reg-logout",
}).then(() => {
wx.reLaunch({
url: "/module1/pages/login/index",
});
});
}
},
});
},
});
export {};