Browse Source

fix: change to new api

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1829/head
Wing-Kam Wong 3 years ago
parent
commit
58b09821d0
  1. 19
      packages/nc-gui/pages/user/password/forgot.vue

19
packages/nc-gui/pages/user/password/forgot.vue

@ -97,23 +97,26 @@ export default {
beforeDestroy() { beforeDestroy() {
}, },
methods: { methods: {
onNormalVerify() { onNormalVerify() {
this.recpatcha = true this.recpatcha = true
}, },
async resetPasswordHandle(e) { async resetPasswordHandle(e) {
if (this.$refs.formType.validate()) { if (this.$refs.formType.validate()) {
e.preventDefault() e.preventDefault()
// await this.$recaptchaLoaded() // await this.$recaptchaLoaded()
// const recaptchaToken = await this.$recaptcha('login') // const recaptchaToken = await this.$recaptcha('login')
try {
const err = await this.$store.dispatch('users/ActPasswordForgot', { ...this.form })// recaptchaToken}); await this.$api.auth.passwordForgot(
if (err) { {
this.formUtil.formErr = true email: this.form.email
this.formUtil.formErrMsg = err.data.msg }
} else { )
this.showMsg = true this.showMsg = true
} catch (e) {
const err = await this._extractSdkResponseErrorMsg(e)
this.formUtil.formErr = true
this.formUtil.formErrMsg = err
return;
} }
} }
} }

Loading…
Cancel
Save