|
@ -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]"> |
|
|
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]"> |
|
|
<div class="tw-hidden xl:tw-block xl:tw-mt-[30px]"> |
|
|
<p class="welcome tw-text-primary-light">{{ $t("Welcome to ShowEasy") }}</p> |
|
|
<p class="welcome tw-text-primary-light">{{ $t("Welcome to ShowEasy") }}</p> |
|
|
{{ userData.Account }} {{ userData.Password }} |
|
|
|
|
|
{{ user }} |
|
|
|
|
|
<p class="sub tw-text-neutral-400"> |
|
|
<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> |
|
|
</p> |
|
|
<img class="mt-11 ml-15" :src="require('@/assets/img/UserLoginMain.png')" /> |
|
|
<img class="mt-11 ml-15" :src="require('@/assets/img/UserLoginMain.png')" /> |
|
|
</div> |
|
|
</div> |
|
@ -303,27 +297,19 @@ export default { |
|
|
async Login(){ |
|
|
async Login(){ |
|
|
this.userData.Account = this.userInfo.Account; |
|
|
this.userData.Account = this.userInfo.Account; |
|
|
this.userData.Password = this.user.Password; |
|
|
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){ |
|
|
if(response.data.STATUSCODE == 200){ |
|
|
let data = response.data.DATA; |
|
|
let data = response.data.DATA; |
|
|
if(data.authtoken){ |
|
|
if(data.authtoken){ |
|
|
const authtoken = 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"){ |
|
|
if(path == "/user"){ |
|
|
path = "/"; |
|
|
path = "/"; |
|
|
} |
|
|
} |
|
|
that.$router.push({path: path}); |
|
|
|
|
|
console.log("耶一登入成功開心"); |
|
|
|
|
|
|
|
|
this.$router.push({path: path}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|