|
|
@@ -635,7 +635,12 @@ Page({
|
|
|
}
|
|
|
return this.excute(_this.data.oauthService, _this.data.oauthService.logout, params).then(res => {
|
|
|
if (res.data.code === Constants.SUCESS_CODE) {
|
|
|
- app.globalData = {}
|
|
|
+ // 不能清除整个globalData,切换公司会因为找不到globalData数据而报错
|
|
|
+ // app.globalData = {}
|
|
|
+ // 清除掉用户信息
|
|
|
+ delete app.globalData['user']
|
|
|
+ // 清除公司信息
|
|
|
+ delete app.globalData['company']
|
|
|
// 调转主页
|
|
|
wx.reLaunch({
|
|
|
url: '../../pages/welcome/welcome',
|