Browse Source

拿掉console

Dev
Janie 2 years ago
parent
commit
72c5c7eea1
  1. 26
      FrontEnd/pages/user/signUp.vue

26
FrontEnd/pages/user/signUp.vue

@ -4,14 +4,8 @@
class="xl:tw-grid xl:tw-grid-cols-[auto_414px] xl:tw-gap-[96px] xl:tw-max-w-[1246px] xl:tw-mx-auto xl:tw-px-[60px]">
<div class="tw-hidden xl:tw-block xl:tw-mt-[30px]">
<p class="welcome tw-text-primary-light">{{ $t("Welcome to ShowEasy") }}</p>
{{ userData.Account }} {{ userData.Password }}
{{ user }}
<p class="sub tw-text-neutral-400">
{{
$t(
"Your best guide from trip to show and from show to the world."
)
}}
{{ $t("Your best guide from trip to show and from show to the world.") }}
</p>
<img class="mt-11 ml-15" :src="require('@/assets/img/UserLoginMain.png')" />
</div>
@ -303,27 +297,19 @@ export default {
async Login(){
this.userData.Account = this.userInfo.Account;
this.userData.Password = this.user.Password;
console.log("登入")
console.log(JSON.stringify(this.userData));
let that = this;
const response = await this.$auth.loginWith('local', { data: that.userData });
console.log("我的response:" + JSON.stringify(response));
const response = await this.$auth.loginWith('local', { data: this.userData });
if(response.data.STATUSCODE == 200){
let data = response.data.DATA;
if(data.authtoken){
const authtoken = data.authtoken;
console.log("頭肯: " + authtoken);
that.$auth.$storage.removeUniversal('authtoken');
that.$auth.$storage.setUniversal('authtoken', authtoken);
let path = that.$auth.$storage.getUniversal('userBeforePath');
this.$auth.$storage.removeUniversal('authtoken');
this.$auth.$storage.setUniversal('authtoken', authtoken);
let path = this.$auth.$storage.getUniversal('userBeforePath');
if(path == "/user"){
path = "/";
}
that.$router.push({path: path});
console.log("耶一登入成功開心");
this.$router.push({path: path});
}
}

Loading…
Cancel
Save