From 2c4f7a951c1fb7acb8842ba5159c1d7c5af82547 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 16 Apr 2021 09:25:50 +0800 Subject: [PATCH] no message --- pages/login/index.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pages/login/index.js b/pages/login/index.js index 72a3fd6..e34f4b1 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -103,7 +103,7 @@ Page({ app.userInfo = result.data app.globalData.token = authorization storage.put('Authorization', app.globalData.token) - if(app.userInfo.factoryId && this.data.metaData && app.userInfo.factoryId != this.data.metaData.factoryId){ + if(app.userInfo.factoryId && this.data.metaData){ Dialog.alert({ title: '温馨提示', message: '您已经绑定过工厂了,现在就进入?' }).then(() => { wx.redirectTo({ url: '/pages/index/index' }) }) @@ -117,17 +117,15 @@ Page({ } else { this.setData({ loging: false, metaData: this.data.metaData }) } - } else { - if(app.userInfo.factoryId){ - if(!result.data.isSaasPerssion){ - Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员?' }).then(() => { - }) - return - } - wx.redirectTo({ url: '/pages/index/index' }) - } else { - wx.redirectTo({ url: '/pages/client/index/index' }) + } else if(app.userInfo.factoryId){ + if(!result.data.isSaasPerssion){ + Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员?' }).then(() => { + }) + return } + wx.redirectTo({ url: '/pages/index/index' }) + } else { + wx.redirectTo({ url: '/pages/client/index/index' }) } }).catch(err => { wx.hideLoading()