From d978432dc61eb6e86a5183307bdee58005ddf866 Mon Sep 17 00:00:00 2001 From: Joel <479214531@qq.com> Date: Wed, 10 Nov 2021 10:52:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B4=A6=E5=8F=B7=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/user/list/index.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pages/user/list/index.vue b/src/pages/user/list/index.vue index 141f955..4390ddc 100644 --- a/src/pages/user/list/index.vue +++ b/src/pages/user/list/index.vue @@ -241,6 +241,8 @@ export default { importToken: '', accountRepeat: false, workNumberRepeat: false, + originalAccount: '', + originalWorkNumber: '' }; }, computed: { @@ -331,7 +333,8 @@ export default { }, accountChange(){ if(this.form.account !== this.originalAccount){ - this.$post(`${this.api.checkAccount}?account=${this.form.account}&type=1&platformId=${Setting.platformId}${this.form.userId ? '&accountId=' + this.form.account : ''}`).then(res => { + // type: 0:教师端,1:学生端,2:无端 + this.$post(`${this.api.checkAccount}?account=${this.form.account}&type=2&platformId=${Setting.platformId}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => { this.accountRepeat = false }).catch(res => { this.accountRepeat = true @@ -342,7 +345,7 @@ export default { }, workNumberChange(){ if(this.form.workNumber !== this.originalWorkNumber){ - this.$post(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=1&platformId=${Setting.platformId}`).then(res => { + this.$post(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=2&platformId=${Setting.platformId}`).then(res => { this.workNumberRepeat = false }).catch(res => { this.workNumberRepeat = true @@ -354,6 +357,9 @@ export default { closeUser(){ this.$refs.form.resetFields() this.form.userId = '' + this.form.accountId = '' + this.originalAccount = '' + this.originalWorkNumber = '' this.accountRepeat = false this.workNumberRepeat = false }, @@ -376,7 +382,7 @@ export default { workNumber: data.workNumber, email: data.email, schoolId: data.schoolId, - password: '', + password: '' } this.originalAccount = data.account this.originalWorkNumber = data.workNumber