From 34ba538cdb18ac3eece79f7a3b207fa9e7b1a898 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 4 Dec 2024 17:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/account/login/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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()