|
|
@ -2,7 +2,7 @@ |
|
|
|
<div |
|
|
|
class="tw-bg-white md:tw-rounded-[24px] md:tw-mt-[30px] md:tw-pt-[60px] md:tw-pb-[150px] md:tw-px-[30px]" |
|
|
|
> |
|
|
|
<div v-if="Object.keys($route.query).length < 2"> |
|
|
|
<div v-if="Object.keys(result).length < 1"> |
|
|
|
<p class="tw-text-[26px] tw-font-bold tw-mb-[20px] md:tw-text-[18px]"> |
|
|
|
{{ $t("Forgot Password") }} |
|
|
|
</p> |
|
|
@ -42,7 +42,7 @@ |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="Object.keys($route.query).length >= 2 && !resetSuccess"> |
|
|
|
<div v-if="Object.keys(result).length >= 1 && !resetSuccess"> |
|
|
|
<p class="title">{{ $t("Reset Password") }}</p> |
|
|
|
<v-form v-model="resetValid"> |
|
|
|
<v-text-field |
|
|
@ -141,6 +141,7 @@ export default { |
|
|
|
//auth_code: "", |
|
|
|
Password: "", |
|
|
|
}, |
|
|
|
result: "", |
|
|
|
rules: { |
|
|
|
require: (value) => !!value || this.$t("Required."), |
|
|
|
email: (v) => |
|
|
@ -175,9 +176,17 @@ export default { |
|
|
|
}, 1000); |
|
|
|
this.$axios |
|
|
|
.post(`/trending/api/Signup/SendForgotMail?Email=${this.Email}`) |
|
|
|
.then((result) => {}) |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
.then((response) => { |
|
|
|
console.log(JSON.stringify(response)); |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
if(data){ |
|
|
|
this.result = data; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
resetUserPass() { |
|
|
@ -188,22 +197,27 @@ export default { |
|
|
|
//this.userData.user_id = this.$route.query.user_uuid; |
|
|
|
//this.userData.auth_code = this.$route.query.auth_code; |
|
|
|
this.$axios |
|
|
|
.post(`/trending/api/Signup/ResetPassword/?Email=${this.Email}&Password=${this.Password}`) |
|
|
|
.then((res) => { |
|
|
|
console.log(JSON.stringify(res)); |
|
|
|
this.resetSuccess = !this.resetSuccess; |
|
|
|
this.countdown = 5; |
|
|
|
this.timer = setInterval(() => { |
|
|
|
if (this.countdown > 0) { |
|
|
|
this.countdown--; |
|
|
|
} else { |
|
|
|
clearInterval(this.timer); |
|
|
|
this.$router.push(this.localePath("/")); |
|
|
|
} |
|
|
|
}, 1000); |
|
|
|
.post(`/trending/api/Signup/ResetPassword?Email=${this.result}&Password=${this.userData.Password}`) |
|
|
|
.then((response) => { |
|
|
|
console.log(JSON.stringify(response)); |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
if(data){ |
|
|
|
this.resetSuccess = !this.resetSuccess; |
|
|
|
this.countdown = 3; |
|
|
|
this.timer = setInterval(() => { |
|
|
|
if (this.countdown > 0) { |
|
|
|
this.countdown--; |
|
|
|
} else { |
|
|
|
clearInterval(this.timer); |
|
|
|
this.$router.push(this.localePath("/")); |
|
|
|
} |
|
|
|
}, 1000); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
.catch((error) => { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|