From a8d56215b1718763973db1b4500375a350584952 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Wed, 9 Jun 2021 17:35:58 +0800 Subject: [PATCH] no message --- pages/login/index.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pages/login/index.js b/pages/login/index.js index 665142c..f3642c6 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -175,25 +175,20 @@ Page({ this.toIndex() return } - var applicationStatus = -1 + var applicationStatus = 0 for (let m = 0; m < app.userInfo.enterpriseInfos.length; m++) { const element = app.userInfo.enterpriseInfos[m] for (let n = 0; n < element.factoryInfos.length; n++) { const item = element.factoryInfos[n] - if(applicationStatus == -1){ - applicationStatus = item.type ? 1 : 0 + applicationStatus = item.type ? 1 : 0 + if(applicationStatus == 1){ + break } } } - if(applicationStatus == -1){ - this.setData({ loging: false}) - Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => { - }) - return - } if(applicationStatus == 0){ this.setData({ loging: false}) - Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => { + Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => { }) return } @@ -208,7 +203,6 @@ Page({ util.showToast('获取用户信息失败,请注册登录') this.setData({ loging: false, regist: true}) } else { - util.showToast(err) this.setData({ loging: false}) } config.header = null @@ -216,8 +210,6 @@ Page({ }).catch(err => { if(err !== null && err instanceof Object) { util.showToast('服务器错误') - } else { - util.showToast(err) } config.header = null this.setData({ loging: false})