【更新】修复任务(找回密码返回validCodeReqNo不为空) https://gitee.com/xiaonuobase/snowy/issues/I644Q8

pull/70/head
小诺 2022-12-04 00:33:56 +08:00 committed by 俞宝山
parent 999e725a3f
commit 1f7c06b777
3 changed files with 11 additions and 9 deletions

View File

@ -102,7 +102,7 @@
let formRules = ref({})
const emailValidCodeReqNo = ref('')
//
//
const getEmailValidCode = () => {
formRules.value.email = [required(), rules.email]
delete formRules.value.emailValidCode
@ -144,7 +144,6 @@
const emailLoginFormModalRef = ref()
const emailFormModalData = ref({})
const validCodeBase64 = ref('')
const validCodeReqNo = ref('')
const formModalRules = {
validCode: [required(), rules.lettersNum]
}
@ -158,10 +157,10 @@
visible.value = false
}
const handleOk = () => {
//
//
emailLoginFormModalRef.value.validate().then(() => {
visible.value = false
//
//
emailFormModalData.value.email = emailFormData.value.email
//
state.value.smsSendBtn = true
@ -180,13 +179,15 @@
emailValidCodeReqNo.value = data
visible.value = false
setTimeout(hide, 500)
emailFormModalData.value.validCode = ''
})
.catch(() => {
setTimeout(hide, 100)
clearInterval(interval)
state.value.smsSendBtn = false
})
.finally(() => {
emailFormModalData.value.validCode = ''
})
})
}
</script>

View File

@ -145,7 +145,6 @@
const phoneLoginFormModalRef = ref()
const phoneFormModalData = ref({})
const validCodeBase64 = ref('')
const validCodeReqNo = ref('')
const formModalRules = {
validCode: [required(), rules.lettersNum]
}
@ -181,13 +180,15 @@
phoneValidCodeReqNo.value = data
visible.value = false
setTimeout(hide, 500)
phoneFormModalData.value.validCode = ''
})
.catch(() => {
setTimeout(hide, 100)
clearInterval(interval)
state.value.smsSendBtn = false
})
.finally(() => {
phoneFormModalData.value.validCode = ''
})
})
}
</script>

View File

@ -74,7 +74,7 @@ public class SysUserCenterController {
@ApiOperation("找回密码获取手机验证码")
@GetMapping("/sys/userCenter/findPasswordGetPhoneValidCode")
public CommonResult<String> findPasswordGetPhoneValidCode(@Valid SysUserGetPhoneValidCodeParam sysUserGetPhoneValidCodeParam) {
return CommonResult.ok(sysUserService.findPasswordGetPhoneValidCode(sysUserGetPhoneValidCodeParam));
return CommonResult.data(sysUserService.findPasswordGetPhoneValidCode(sysUserGetPhoneValidCodeParam));
}
/**
@ -87,7 +87,7 @@ public class SysUserCenterController {
@ApiOperation("找回密码获取邮箱验证码")
@GetMapping("/sys/userCenter/findPasswordGetEmailValidCode")
public CommonResult<String> findPasswordGetEmailValidCode(@Valid SysUserGetEmailValidCodeParam sysUserGetEmailValidCodeParam) {
return CommonResult.ok(sysUserService.findPasswordGetEmailValidCode(sysUserGetEmailValidCodeParam));
return CommonResult.data(sysUserService.findPasswordGetEmailValidCode(sysUserGetEmailValidCodeParam));
}
/**