From 1844284f0ec355372bf1972c2145da6c155a81c2 Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Sat, 4 Feb 2023 18:27:28 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20user=20profile=20[WHY]=20=E9=96=8B?= =?UTF-8?q?=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. setting完成 --- FrontEnd/pages/user/setting.vue | 37 ++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/FrontEnd/pages/user/setting.vue b/FrontEnd/pages/user/setting.vue index 403c51c..67107db 100644 --- a/FrontEnd/pages/user/setting.vue +++ b/FrontEnd/pages/user/setting.vue @@ -14,7 +14,7 @@ + :value="userData.Account" disabled />
@@ -54,7 +54,7 @@
-
+
{{$t('userProfile.resetPassword')}}
@@ -71,7 +71,7 @@ > New password
- --> @@ -119,13 +119,13 @@
-
- @@ -326,13 +326,15 @@ export default { this.userPass.user_old_pass !== this.userPass.user_new_pass ) { this.$axios - .post( - `/trending/api/Members/ResetNewPassword/?Password=${this.user_new_pass}` - ) - .then((res) => { - //console.log(JSON.stringify(res)); - //this.$auth.$storage.removeUniversal("jwt"); - this.$auth.$storage.removeUniversal("userPicture"); + .post( + `/trending/api/Members/ResetNewPassword/?Password=${this.userPass.user_new_pass}` + ) + .then((response) => { + //(JSON.stringify(response)); + if(response && response.data && response.data.DATA && response.data.DATA.rel){ + let data = response.data.DATA.rel + if(data){ + this.$auth.$storage.removeUniversal("userPicture"); this.$auth.$storage.removeUniversal("userLastName"); this.$notify({ type: "success", @@ -343,12 +345,19 @@ export default { this.$auth.logout(); this.$router.push(this.localePath("/user")); }, 4000) + } + } }) - .catch((err) => { - console.log(err); + .catch((error) => { + console.log(error); }); } }, + cancel(){ + this.userPass.user_old_pass = "", + this.userPass.user_new_pass = "", + this.confirmPass = "" + }, checkPassword(v) { const pass = v.target.value; this.isNewPassValid =