feat: i18n
This commit is contained in:
@@ -15,21 +15,21 @@
|
||||
<div class="Text" v-show="!loginType">
|
||||
<img src="@/assets/images/homePage/aidaIcon.png" alt="">
|
||||
<div class="title">
|
||||
<p>Welcome to <span>AiDA</span></p>
|
||||
<p>{{ t('Login.Welcome') }} <span>{{ t('Login.AiDA') }}</span></p>
|
||||
</div>
|
||||
<div class="info">
|
||||
AiDA, a first-to-market technology that empowers fashion designers, based on their creative inspirations, to work with AI to create original designs.
|
||||
{{ t('Login.Slogan') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="loginBox" :class="{'active':loginType}">
|
||||
<div class="selectType" v-show="!loginType">
|
||||
<div class="text">Continue with one of these:</div>
|
||||
<div class="text">{{ t('Login.LoginMethod') }}</div>
|
||||
<div class="typeList">
|
||||
<div class="gallery_btn" @click="setLoginType('personal')">
|
||||
Individual
|
||||
{{ t('Login.Individual') }}
|
||||
</div>
|
||||
<div class="gallery_btn" @click="setLoginType('school')">
|
||||
Academic
|
||||
{{ t('Login.Academic') }}
|
||||
</div>
|
||||
<!-- <div class="gallery_btn" @click="setLoginType('enterprise')">
|
||||
Enterprise
|
||||
@@ -40,9 +40,9 @@
|
||||
<div class="title">
|
||||
<i class="fi fi-br-angle-left" @click="loginBack"></i>
|
||||
<!-- <i class="fi fi-rr-arrow-left" @click="()=>loginType = ''"></i> -->
|
||||
<span>Log on to AiDA 3.1</span>
|
||||
<span>{{ t('Login.LogonToAiDA') }}</span>
|
||||
</div>
|
||||
<div class="info" v-show="!loginType">Please fill your information below</div>
|
||||
<div class="info" v-show="!loginType">{{ t('Login.Infomation') }}</div>
|
||||
<personal ref="personal" v-if="loginType == 'personal'" v-model:isMask="isMask"></personal>
|
||||
<school ref="school" v-if="loginType == 'school'"></school>
|
||||
<enterprise ref="enterprise" v-if="loginType == 'enterprise'"></enterprise>
|
||||
@@ -90,9 +90,17 @@ export default defineComponent({
|
||||
props: {},
|
||||
emits: [],
|
||||
setup(props, { emit }) {
|
||||
const {t,locale} = useI18n()
|
||||
const store = useStore();
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
// 通过 provide 传递 i18n 给子组件
|
||||
provide('i18n', {
|
||||
t,
|
||||
locale
|
||||
})
|
||||
|
||||
const loginData = reactive({
|
||||
loginType: "",
|
||||
isMask: false,
|
||||
@@ -137,7 +145,7 @@ export default defineComponent({
|
||||
store.commit("upUserDetail", userid);
|
||||
if (window.innerWidth < 768) {
|
||||
message.info(
|
||||
"If you need to design, please log in using an iPad or computer."
|
||||
t('Login.Device')
|
||||
);
|
||||
turnToHomePage("/Square");
|
||||
} else {
|
||||
@@ -174,6 +182,10 @@ export default defineComponent({
|
||||
if (data?.state == "weiXin") {
|
||||
wechatLogin(data);
|
||||
}
|
||||
const savedLang = localStorage.getItem('loginLanguage')
|
||||
if (savedLang) {
|
||||
locale.value = savedLang
|
||||
}
|
||||
})
|
||||
return {
|
||||
...toRefs(dataDom),
|
||||
@@ -181,11 +193,10 @@ export default defineComponent({
|
||||
setLoginType,
|
||||
loginBack,
|
||||
toBack,
|
||||
t,
|
||||
locale
|
||||
};
|
||||
},
|
||||
provide() {
|
||||
return {};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user