locale ru
This commit is contained in:
@ -4,7 +4,10 @@
|
||||
<img class="loginImg" src="@/assets/images/login.png" alt="" srcset="" />
|
||||
<div class="login-form">
|
||||
<el-tabs v-model="loginForm.mode" v-if="isLogin == 1">
|
||||
<el-tab-pane label="账号密码登录" name="102"></el-tab-pane>
|
||||
<el-tab-pane
|
||||
:label="t('login.accountLogin')"
|
||||
name="102"
|
||||
></el-tab-pane>
|
||||
<!-- <el-tab-pane label="手机快捷登录" name="101"></el-tab-pane> -->
|
||||
</el-tabs>
|
||||
<div v-if="isLogin == 1">
|
||||
@ -14,7 +17,7 @@
|
||||
v-model="loginForm.username"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="手机号"
|
||||
:placeholder="t('input.inputPhone')"
|
||||
>
|
||||
<template #prefix>
|
||||
<svg-icon
|
||||
@ -29,7 +32,7 @@
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
:placeholder="t('input.inputPassword')"
|
||||
@keyup.enter="handleLogin"
|
||||
>
|
||||
<template #prefix>
|
||||
@ -45,7 +48,7 @@
|
||||
<el-input
|
||||
v-model="loginForm.captcha"
|
||||
auto-complete="off"
|
||||
placeholder="验证码"
|
||||
:placeholder="t('input.inputVerificationCode')"
|
||||
style="width: 65%; align-items: center"
|
||||
@keyup.enter="handleLogin"
|
||||
>
|
||||
@ -60,7 +63,9 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe">记住账号</el-checkbox>
|
||||
<el-checkbox v-model="loginForm.rememberMe">
|
||||
{{ t("login.rememberAccount") }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button
|
||||
@ -71,20 +76,28 @@
|
||||
style="width: 100%"
|
||||
@click.prevent="handleLogin"
|
||||
>
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-if="!loading">
|
||||
{{ t("login.login") }}
|
||||
</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="overflow: hidden">
|
||||
<div style="float: left" v-if="isLogin == 1">
|
||||
<span class="text_col pointer" :to="'/login'" @click="isLogin = 3"
|
||||
>忘记密码</span
|
||||
<span
|
||||
class="text_col pointer"
|
||||
:to="'/login'"
|
||||
@click="isLogin = 3"
|
||||
>{{ t("login.forgetPassword") }}</span
|
||||
>
|
||||
</div>
|
||||
<div style="float: right" v-if="register">
|
||||
<span @click="isLogin = 2" style="color: #0054ff" class="pointer"
|
||||
>注册</span
|
||||
<span
|
||||
@click="isLogin = 2"
|
||||
style="color: #0054ff"
|
||||
class="pointer"
|
||||
>{{ t("login.register") }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@ -110,8 +123,10 @@
|
||||
v-model="registerForm.isCheck"
|
||||
style="margin-top: 43px"
|
||||
>
|
||||
<span class="text_col">登录即同意</span
|
||||
><span style="color: #0054ff">《协议》</span>
|
||||
<span class="text_col">{{ t("login.loginAgreement") }}</span
|
||||
><span style="color: #0054ff"
|
||||
>《{{ t("login.agreement") }}》</span
|
||||
>
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -136,12 +151,15 @@ import Retrieve from "../retrieve";
|
||||
import WebGetCode from "@/components/webGetCode";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { computed, reactive } from "vue";
|
||||
import { reactify } from "@vueuse/core";
|
||||
// const store = useStore();
|
||||
const router = useRouter();
|
||||
|
||||
const userStore = useUserStore();
|
||||
// const { proxy } = getCurrentInstance();
|
||||
|
||||
const { t } = useI18n();
|
||||
const isLogin = ref(1);
|
||||
|
||||
const loginForm = ref({
|
||||
@ -162,11 +180,22 @@ const buttonName = ref("获取验证码");
|
||||
const isDisabled = ref(false);
|
||||
const time = ref(10);
|
||||
|
||||
const loginRules = {
|
||||
username: [{ required: true, trigger: "blur", message: "请输入您的手机号" }],
|
||||
password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
|
||||
// captcha: [{ required: true, trigger: "change", message: "请输入验证码" }],
|
||||
};
|
||||
const loginRules = reactive({
|
||||
username: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: computed(() => t("input.inputPhone")),
|
||||
},
|
||||
],
|
||||
password: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: computed(() => t("input.inputPassword")),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const isCheck = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
@ -234,6 +263,7 @@ function getCookie() {
|
||||
mode: loginForm.value.mode,
|
||||
};
|
||||
}
|
||||
|
||||
getCookie();
|
||||
</script>
|
||||
|
||||
@ -244,6 +274,7 @@ getCookie();
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #b1ccff;
|
||||
|
||||
.content {
|
||||
// padding: 0 250px;
|
||||
// padding: 0 30px;
|
||||
@ -260,6 +291,7 @@ getCookie();
|
||||
height: 458px;
|
||||
}
|
||||
}
|
||||
|
||||
.foot {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
@ -270,6 +302,7 @@ getCookie();
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
@ -283,6 +316,7 @@ getCookie();
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 33px;
|
||||
|
||||
.tit {
|
||||
padding: 30px 0;
|
||||
text-align: center;
|
||||
@ -291,26 +325,33 @@ getCookie();
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.el-tab-pane {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
height: 38px;
|
||||
|
||||
input {
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__active-bar) {
|
||||
background-color: #0054ff;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__item) {
|
||||
color: #666666;
|
||||
font-size: 16px;
|
||||
|
||||
&.is-active {
|
||||
font-weight: 500;
|
||||
color: #0054ff;
|
||||
@ -318,6 +359,7 @@ getCookie();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
@ -330,15 +372,18 @@ getCookie();
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.login-code {
|
||||
width: 30%;
|
||||
height: 38px;
|
||||
float: right;
|
||||
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
@ -351,11 +396,14 @@ getCookie();
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.login-code-img {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.text_col {
|
||||
color: #999999;
|
||||
|
||||
img {
|
||||
width: 30px;
|
||||
margin: 10px 0 0 10px;
|
||||
|
||||
Reference in New Issue
Block a user