用户账号校验

dev
Joel 3 years ago
parent e7a4df9090
commit d978432dc6
  1. 12
      src/pages/user/list/index.vue

@ -241,6 +241,8 @@ export default {
importToken: '', importToken: '',
accountRepeat: false, accountRepeat: false,
workNumberRepeat: false, workNumberRepeat: false,
originalAccount: '',
originalWorkNumber: ''
}; };
}, },
computed: { computed: {
@ -331,7 +333,8 @@ export default {
}, },
accountChange(){ accountChange(){
if(this.form.account !== this.originalAccount){ 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: 012
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 this.accountRepeat = false
}).catch(res => { }).catch(res => {
this.accountRepeat = true this.accountRepeat = true
@ -342,7 +345,7 @@ export default {
}, },
workNumberChange(){ workNumberChange(){
if(this.form.workNumber !== this.originalWorkNumber){ 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 this.workNumberRepeat = false
}).catch(res => { }).catch(res => {
this.workNumberRepeat = true this.workNumberRepeat = true
@ -354,6 +357,9 @@ export default {
closeUser(){ closeUser(){
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.form.userId = '' this.form.userId = ''
this.form.accountId = ''
this.originalAccount = ''
this.originalWorkNumber = ''
this.accountRepeat = false this.accountRepeat = false
this.workNumberRepeat = false this.workNumberRepeat = false
}, },
@ -376,7 +382,7 @@ export default {
workNumber: data.workNumber, workNumber: data.workNumber,
email: data.email, email: data.email,
schoolId: data.schoolId, schoolId: data.schoolId,
password: '', password: ''
} }
this.originalAccount = data.account this.originalAccount = data.account
this.originalWorkNumber = data.workNumber this.originalWorkNumber = data.workNumber

Loading…
Cancel
Save