update 用户管理-手机号不验重

This commit is contained in:
赵霄
2023-11-15 17:09:18 +08:00
parent eefba03bd7
commit d6ca1c2602
+16 -15
View File
@@ -437,21 +437,22 @@ export default {
callback() callback()
} else { } else {
if (new RegExp(/^1[345789][0-9]\d{8}$/).test(value)) { if (new RegExp(/^1[345789][0-9]\d{8}$/).test(value)) {
const confusionCode = getConfusionCode('sys_user', 'phone') callback()
const params = { // const confusionCode = getConfusionCode('sys_user', 'phone')
// tableName: 'sys_user', // const params = {
// fieldName: 'phone', // // tableName: 'sys_user',
confusionCode, // // fieldName: 'phone',
fieldVal: value, // confusionCode,
dataId: this.userId // fieldVal: value,
} // dataId: this.userId
duplicateCheck(params).then((res) => { // }
if (res.success) { // duplicateCheck(params).then((res) => {
callback() // if (res.success) {
} else { // callback()
callback(new Error(this.$t('user.phoneNumberExists'))) // } else {
} // callback(new Error(this.$t('user.phoneNumberExists')))
}) // }
// })
} else { } else {
callback(new Error(this.$t('user.enterPhoneCorrect'))) callback(new Error(this.$t('user.enterPhoneCorrect')))
} }