|
@@ -17,7 +17,7 @@
|
|
|
v-model="userForm.user"
|
|
|
autocomplete="off"
|
|
|
type="text"
|
|
|
- placeholder="请输入用户名或者验证手机号"
|
|
|
+ placeholder="请输入用户名"
|
|
|
prefix-icon="el-icon-user"
|
|
|
clearable
|
|
|
/>
|
|
@@ -130,27 +130,27 @@ export default class resetPsw extends Vue {
|
|
|
;(this.$refs.userForm as ElForm).validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
let value = this.userForm.user.trim()
|
|
|
- if (Number(value)) {
|
|
|
- if (new RegExp(regPhone()).test(value)) {
|
|
|
- this.passParam = { phoneNumber: value }
|
|
|
- const res = await authcodeAdd(this.passParam)
|
|
|
- if (res.code == 1) {
|
|
|
- this.$message.success(res.result)
|
|
|
- this.isPass = true
|
|
|
- this.modifyParam = { username: value }
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message.warning('请输入正确的手机号!')
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.passParam = { username: value }
|
|
|
- const res = await authcodeAdd(this.passParam)
|
|
|
- if (res.code == 1) {
|
|
|
- this.$message.success(res.result)
|
|
|
- this.isPass = true
|
|
|
- this.modifyParam = { username: value }
|
|
|
- }
|
|
|
+ // if (Number(value)) {
|
|
|
+ // if (new RegExp(regPhone()).test(value)) {
|
|
|
+ // this.passParam = { phoneNumber: value }
|
|
|
+ // const res = await authcodeAdd(this.passParam)
|
|
|
+ // if (res.code == 1) {
|
|
|
+ // this.$message.success(res.result)
|
|
|
+ // this.isPass = true
|
|
|
+ // this.modifyParam = { username: value }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning('请输入正确的手机号!')
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ this.passParam = { phoneNumber: value }
|
|
|
+ const res = await authcodeAdd(this.passParam)
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.$message.success(res.result)
|
|
|
+ this.isPass = true
|
|
|
+ this.modifyParam = { username: value }
|
|
|
}
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
} else {
|