Browse Source

[WHAT] user profile [WHY] 開發 ShowEasy 前台

1. setting完成
Dev
Janie 2 years ago
parent
commit
1844284f0e
  1. 37
      FrontEnd/pages/user/setting.vue

37
FrontEnd/pages/user/setting.vue

@ -14,7 +14,7 @@
</div>
<input type="text"
class="tw-h-[40px] tw-w-full tw-border tw-bg-white tw-border-neutral-200 tw-border-solid tw-px-[20px] tw-py-[10px] tw-rounded-[5px] disabled:tw-text-base-disable"
:value="userData.account" disabled />
:value="userData.Account" disabled />
</div>
<Transition name="bounce">
<div v-show="SSOShow == 2" :class="['tw-mb-[50px] md:tw-mb-[30px]',SSOShow == 2 ? '':'tw-hidden']">
@ -54,7 +54,7 @@
</div>
</Transition>
<Transition name="bounce">
<div v-show="SSOShow == 1">
<div>
<div class="tw-body-2 tw-font-bold tw-text-base-primary tw-mb-[20px] md:t16 md:tw-mb-[15px]">
{{$t('userProfile.resetPassword')}}
</div>
@ -71,7 +71,7 @@
>
New password
</div>
<input
<input
type="text"
class="tw-h-[40px] tw-w-full tw-border tw-border-neutral-200 tw-border-solid tw-px-[20px] tw-py-[10px] tw-rounded-[5px] tw-mb-[6px]"
/> -->
@ -119,13 +119,13 @@
</div>
</Transition>
<Transition name="bounce">
<div v-show="SSOShow == 1"
<div
:lass="['tw-mb-[64px] md:tw-flex md:tw-flex-row md:tw-items-center md:tw-mb-[40px]']">
<button @click="resetPassword"
class="tw-text-white tw-bg-primary-1 tw-text-[18px] tw-rounded-[16px] tw-w-full tw-py-[13px] tw-mb-[15px] md:tw-text-[16px] md:tw-w-fit md:tw-px-[16px] md:tw-py-[10px] md:tw-mr-[20px] md:tw-mb-0">
{{$t('userProfile.resetPassword')}}
</button>
<button
<button @click="cancel"
class="tw-text-primary-1 tw-bg-white tw-text-[18px] tw-rounded-[16px] tw-w-full tw-py-[13px] md:tw-text-[16px] md:tw-w-fit md:tw-px-[16px] md:tw-py-[10px]">
{{$t('userProfile.cancel')}}
</button>
@ -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 =

Loading…
Cancel
Save