diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index e53364a..508d1b4 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -659,7 +659,11 @@ export default { if (list && list.length) { list.map(e => { const { userName } = e - if (userName.length > 1) e.userName = userName[0] + '*' + userName.substring(2) + if (userName) { + if (userName.length > 1) e.userName = userName[0] + '*' + userName.substring(2) + } else { + e.userName = '' + } }) this.infos = list this.accountIds = list.map(e => e.id) @@ -746,9 +750,9 @@ export default { account, schoolId, accountId: this.curUser.id || '', - }).then(({ token }) => { + }).then(({ token, type }) => { this.token = token - this.setLogin() + type === 1 ? this.setLogin() : this.toMang() }).catch(res => { }) } else { this.unbind()