const app = getApp() Page({ data: { path: '', }, onLoad(options) { this.setData({ path: options.path ? decodeURIComponent(options.path) : '/pages/index/index', }) }, handleLoginOut() { wx.ajax({ method: 'POST', url: '?r=igg4/doctor/account/reg-logout', data: {}, }).then((_res) => { app.globalData.loginType = 1 app.globalData.anyWhere = true app.globalData.first = true wx.reLaunch({ url: this.data.path, }) }) }, handleBackHome() { wx.reLaunch({ url: '/doctor/pages/d_home/index', }) }, })