Browse Source

no message

feature/v2.0
xpz2018 4 years ago
parent
commit
a8d56215b1
1 changed files with 5 additions and 13 deletions
  1. 18
      pages/login/index.js

18
pages/login/index.js

@ -175,25 +175,20 @@ Page({
this.toIndex() this.toIndex()
return return
} }
var applicationStatus = -1
var applicationStatus = 0
for (let m = 0; m < app.userInfo.enterpriseInfos.length; m++) { for (let m = 0; m < app.userInfo.enterpriseInfos.length; m++) {
const element = app.userInfo.enterpriseInfos[m] const element = app.userInfo.enterpriseInfos[m]
for (let n = 0; n < element.factoryInfos.length; n++) { for (let n = 0; n < element.factoryInfos.length; n++) {
const item = element.factoryInfos[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){ if(applicationStatus == 0){
this.setData({ loging: false}) this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => {
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => {
}) })
return return
} }
@ -208,7 +203,6 @@ Page({
util.showToast('获取用户信息失败,请注册登录') util.showToast('获取用户信息失败,请注册登录')
this.setData({ loging: false, regist: true}) this.setData({ loging: false, regist: true})
} else { } else {
util.showToast(err)
this.setData({ loging: false}) this.setData({ loging: false})
} }
config.header = null config.header = null
@ -216,8 +210,6 @@ Page({
}).catch(err => { }).catch(err => {
if(err !== null && err instanceof Object) { if(err !== null && err instanceof Object) {
util.showToast('服务器错误') util.showToast('服务器错误')
} else {
util.showToast(err)
} }
config.header = null config.header = null
this.setData({ loging: false}) this.setData({ loging: false})

Loading…
Cancel
Save