From c627a09b23103cfd33e11c742984885bc5bcca3b Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:10:09 +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=E5=89=8D=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 忘記密碼流程調整 --- FrontEnd/pages/user/forgot.vue | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/FrontEnd/pages/user/forgot.vue b/FrontEnd/pages/user/forgot.vue index 46f4369..72c4795 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") }}

@@ -142,6 +137,7 @@ export default { Password: "", }, result: "", + getPath: null, rules: { require: (value) => !!value || this.$t("Required."), email: (v) => @@ -161,7 +157,21 @@ export default { }, }; }, + created(){ + this.$auth.$storage.removeUniversal('userPassword'); + this.$auth.$storage.removeUniversal('userAccount'); + this.getPAth(); + + }, methods: { + getPAth(){ + let vm = this; + if (this.$route.query.Email) { + vm.getPath = vm.$route.query.Email; + }else{ + vm.getPath = null; + } + }, sendForgotMail() { this.$axios .post(`/trending/api/Signup/SendForgotMail?Email=${this.Email}`) @@ -175,6 +185,7 @@ export default { let data = response.data.DATA.rel if(data){ this.result = data; + this.disableBtn = !this.disableBtn; this.timeout = setInterval(() => { if (this.countdown > 0) { @@ -201,9 +212,9 @@ 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.result}&Password=${this.userData.Password}`) + .post(`/trending/api/Signup/ResetPassword?Email=${this.getPath}&Password=${this.userData.Password}`) .then((response) => { - console.log(JSON.stringify(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){