|
|
@ -16,7 +16,6 @@ |
|
|
|
<p class="tw-body-3 tw-text-neutral-400 tw-mb-[16px] md:tw-mb-[12px]"> |
|
|
|
{{ $t("Welcome to ShowEasy!") }} |
|
|
|
</p> |
|
|
|
|
|
|
|
<p class="tw-body-3 tw-mb-[45px] md:tw-mb-[32px]"> |
|
|
|
{{ $t("Already have an account?") }} |
|
|
|
<nuxt-link :to="localePath('/user')" class="primary--text text-decoration-none">{{ $t("Login") }}</nuxt-link> |
|
|
@ -67,15 +66,19 @@ |
|
|
|
:append-icon="showConfirmPass ? 'mdi-eye' : 'mdi-eye-off'" @click:append="showConfirmPass = !showConfirmPass" |
|
|
|
validate-on-blur></v-text-field> |
|
|
|
</v-form> |
|
|
|
<v-checkbox v-model="user.Subscribe" class="mt-n2 ml-1"><template v-slot:label><span |
|
|
|
class="neutrals--text text--darken-4 text-size-14">{{ |
|
|
|
$t("Subscribe to ShowEasy\’s newsletter") |
|
|
|
}}</span></template></v-checkbox> |
|
|
|
<div class="md:tw-flex md:tw-justify-center md:tw-items-center"> <button @click="userRegister" |
|
|
|
:disabled="!validFormat" |
|
|
|
:class="['tw-block tw-w-full tw-py-[10px] tw-rounded-[16px] tw-border tw-border-solid tw-body-3 tw-font-normal tw-transition-all tw-duration-200 tw-ease-in-out',valid?'tw-text-white tw-bg-primary-default tw-border-primary-default':'tw-text-base-disable tw-bg-neutral-100 tw-border-neutral-100']"> |
|
|
|
<v-checkbox v-model="user.Subscribe" class="mt-n2 ml-1"> |
|
|
|
<template v-slot:label> |
|
|
|
<span class="neutrals--text text--darken-4 text-size-14"> |
|
|
|
{{ $t("Subscribe to ShowEasy\’s newsletter") }} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</v-checkbox> |
|
|
|
<div class="md:tw-flex md:tw-justify-center md:tw-items-center"> |
|
|
|
<button @click="userRegister" :disabled="!validFormat" :class="['tw-block tw-w-full tw-py-[10px] tw-rounded-[16px] tw-border tw-border-solid tw-body-3 tw-font-normal tw-transition-all tw-duration-200 tw-ease-in-out',valid?'tw-text-white tw-bg-primary-default tw-border-primary-default':'tw-text-base-disable tw-bg-neutral-100 tw-border-neutral-100']"> |
|
|
|
{{ $t("Sign Up") }} |
|
|
|
</button></div> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<!-- 原註冊流程Modal(信箱連結認證) --> |
|
|
|
<v-dialog v-model="dialog" :width="$vuetify.breakpoint.smAndUp ? 423 : 294" |
|
|
|
@click:outside="$router.push(localePath('/user'))"> |
|
|
|
<v-card class="pa-7" :height="$vuetify.breakpoint.smAndUp ? 249 : 290"> |
|
|
@ -101,6 +104,7 @@ |
|
|
|
</v-btn> |
|
|
|
</v-card> |
|
|
|
</v-dialog> |
|
|
|
<!-- 帳號已存在Modal --> |
|
|
|
<v-dialog v-model="errorDialog" :width="$vuetify.breakpoint.smAndUp ? 423 : 294"> |
|
|
|
<v-card class="pa-7 border-radius-16" :max-height="$vuetify.breakpoint.smAndUp ? 249 : 290"> |
|
|
|
<v-spacer class="d-flex align-center text-size-20 neutrals--text text--darken-5"> |
|
|
@ -139,11 +143,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import loading from "@/components/newComponent/loading/loading.vue"; |
|
|
|
import VerifyCode from "@/components/newcomponent/modal/VerifyCodeModal.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "SignUp", |
|
|
|
layout: "login", |
|
|
@ -197,7 +199,6 @@ export default { |
|
|
|
Account: '', |
|
|
|
Password: '', |
|
|
|
}, |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -294,11 +295,11 @@ export default { |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}, |
|
|
|
//登入 |
|
|
|
async Login(){ |
|
|
|
this.userData.Account = this.userInfo.Account; |
|
|
|
this.userData.Password = this.user.Password; |
|
|
|
const response = await this.$auth.loginWith('local', { data: this.userData }); |
|
|
|
|
|
|
|
if(response.data.STATUSCODE == 200){ |
|
|
|
let data = response.data.DATA; |
|
|
|
if(data.authtoken){ |
|
|
@ -312,36 +313,6 @@ export default { |
|
|
|
this.$router.push({path: path}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// this.$axios |
|
|
|
// .post( |
|
|
|
// `/trending/api/System/Login`, this.userData |
|
|
|
// ) |
|
|
|
// .then((response) => { |
|
|
|
// console.log(JSON.stringify(response)); |
|
|
|
// if(response.data.STATUSCODE == 200){ |
|
|
|
// let data = response.data.DATA; |
|
|
|
// if(data.authtoken){ |
|
|
|
// console.log("頭肯:" + data.authtoken); |
|
|
|
// const authtoken = data.authtoken; |
|
|
|
// this.$auth.$storage.removeUniversal('authtoken'); |
|
|
|
// this.$auth.$storage.setUniversal('authtoken', authtoken); |
|
|
|
// let path = this.$auth.$storage.getUniversal('userBeforePath'); |
|
|
|
// if(path == "/user"){ |
|
|
|
// path = "/"; |
|
|
|
// } |
|
|
|
// this.$router.push({path: path}); |
|
|
|
// this.$nuxt.refresh(); |
|
|
|
// //this.$router.push('/'); |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch((err) => { |
|
|
|
// console.log(err); |
|
|
|
// }); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
xxxxxxxxxx