|
|
|
@ -216,13 +216,13 @@ export default { |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
// phone: [ |
|
|
|
|
// { |
|
|
|
|
// pattern: /^1[3456789]\d{9}$/, |
|
|
|
|
// message: '请输入正确的手机号', |
|
|
|
|
// trigger: 'blur' |
|
|
|
|
// } |
|
|
|
|
// ], |
|
|
|
|
phone: [ |
|
|
|
|
{ |
|
|
|
|
pattern: /^1[3456789]\d{9}$/, |
|
|
|
|
message: '请输入正确的手机号', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
email: [ |
|
|
|
|
{ |
|
|
|
|
pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/, |
|
|
|
@ -338,7 +338,7 @@ export default { |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}, |
|
|
|
|
accountChange(){ |
|
|
|
|
if(this.form.account !== this.originalAccount){ |
|
|
|
|
if(this.form.account && this.form.account !== this.originalAccount){ |
|
|
|
|
// 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 |
|
|
|
@ -350,7 +350,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
workNumberChange(){ |
|
|
|
|
if(this.form.workNumber !== this.originalWorkNumber){ |
|
|
|
|
if(this.form.workNumber && this.form.workNumber !== this.originalWorkNumber){ |
|
|
|
|
this.$post(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=2&platformId=${Setting.platformId}`).then(res => { |
|
|
|
|
this.workNumberRepeat = false |
|
|
|
|
}).catch(res => { |
|
|
|
@ -361,7 +361,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
phoneChange(){ |
|
|
|
|
if(this.form.phone !== this.originalPhone){ |
|
|
|
|
if(this.form.phone && this.form.phone !== this.originalPhone){ |
|
|
|
|
this.$post(`${this.api.checkEmailOrPhone}?phone=${this.form.phone}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => { |
|
|
|
|
this.phoneRepeat = false |
|
|
|
|
}).catch(res => { |
|
|
|
@ -372,7 +372,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
emailChange(){ |
|
|
|
|
if(this.form.email !== this.originalEmail){ |
|
|
|
|
if(this.form.email && this.form.email !== this.originalEmail){ |
|
|
|
|
this.$post(`${this.api.checkEmailOrPhone}?email=${this.form.email}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => { |
|
|
|
|
this.emailRepeat = false |
|
|
|
|
}).catch(res => { |
|
|
|
@ -406,7 +406,7 @@ export default { |
|
|
|
|
accountId, |
|
|
|
|
userName: data.userName, |
|
|
|
|
roleIds: data.roleId.map(e => e.roleId), |
|
|
|
|
phone: data.phone ? data.phone : '暂未绑定', |
|
|
|
|
phone: data.phone, |
|
|
|
|
workNumber: data.workNumber, |
|
|
|
|
email: data.email, |
|
|
|
|
schoolId: data.schoolId, |
|
|
|
|