From 1ac9dd634f4a6b6fec22b3576326ca6159c6e453 Mon Sep 17 00:00:00 2001
From: Janie <109517022+Janie06@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:38:12 +0800
Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E5=BF=98=E8=A8=98=E5=AF=86=E7=A2=BC?=
=?UTF-8?q?=20[WHY]=20=E9=96=8B=E7=99=BC=20ShowEasy=20=20=E5=89=8D?=
=?UTF-8?q?=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FrontEnd/pages/user/forgot.vue | 54 +++++++++++++++++++++-------------
FrontEnd/pages/user/signUp.vue | 17 ++++++-----
2 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/FrontEnd/pages/user/forgot.vue b/FrontEnd/pages/user/forgot.vue
index f383545..af0cdca 100644
--- a/FrontEnd/pages/user/forgot.vue
+++ b/FrontEnd/pages/user/forgot.vue
@@ -2,7 +2,7 @@
-
+
{{ $t("Forgot Password") }}
@@ -42,7 +42,7 @@
-
+
{{ $t("Reset Password") }}
!!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);
});
}
},
diff --git a/FrontEnd/pages/user/signUp.vue b/FrontEnd/pages/user/signUp.vue
index c4aa7e5..73546c3 100644
--- a/FrontEnd/pages/user/signUp.vue
+++ b/FrontEnd/pages/user/signUp.vue
@@ -182,9 +182,12 @@ export default {
.post(
`/trending/api/Signup/SignupWithEmail`, postUserData
)
- .then((res) => {
- console.log(JSON.stringify(res));
- this.timer = setInterval(() => {
+ .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.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
}
@@ -194,7 +197,9 @@ export default {
}, 1000);
this.isPageLoading = false;
this.dialog = !this.dialog;
- })
+ }
+ }
+ })
.catch((err) => {
console.log(err);
@@ -203,8 +208,6 @@ export default {
});
},
-
-
resendVerifyEmail() {
this.countdown = 60;
this.$axios
@@ -212,7 +215,7 @@ export default {
`/trending/api/Signup/ReSendVerifyMail?Email=${this.userData.Email}`
)
.then((res) => {
- console.log(JSON.stringify(res));
+ //console.log(JSON.stringify(res));
clearInterval(this.timer);
this.timer = setInterval(() => {
if (this.countdown > 0) {