|
|
@ -2,19 +2,12 @@ |
|
|
<div class="login-container"> |
|
|
<div class="login-container"> |
|
|
<div class="login-main"> |
|
|
<div class="login-main"> |
|
|
<div class="login-form"> |
|
|
<div class="login-form"> |
|
|
<el-form |
|
|
<el-form ref="loginFormRef" :model="loginData" :rules="loginRules"> |
|
|
ref="loginFormRef" |
|
|
|
|
|
:model="loginData" |
|
|
|
|
|
:rules="loginRules" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="flex text-white items-center py-4"> |
|
|
<!-- <div class="flex text-white items-center py-4"> |
|
|
<span class="text-2xl flex-1 text-center">{{ $t("login.title") }}</span> |
|
|
<span class="text-2xl flex-1 text-center">{{ $t("login.title") }}</span> |
|
|
<lang-select style="color: #fff" /> |
|
|
<lang-select style="color: #fff" /> |
|
|
</div> --> |
|
|
</div> --> |
|
|
<div class="login-title"> |
|
|
<div class="login-title">用户登录</div> |
|
|
用户登录 |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-form-item prop="username"> |
|
|
<el-form-item prop="username"> |
|
|
<div class="p-2"> |
|
|
<div class="p-2"> |
|
|
<svg-icon icon-class="user" /> |
|
|
<svg-icon icon-class="user" /> |
|
|
@ -67,6 +60,7 @@ |
|
|
auto-complete="off" |
|
|
auto-complete="off" |
|
|
:placeholder="$t('login.verifyCode')" |
|
|
:placeholder="$t('login.verifyCode')" |
|
|
class="w-[60%]" |
|
|
class="w-[60%]" |
|
|
|
|
|
style="width: 60%" |
|
|
@keyup.enter="handleLogin" |
|
|
@keyup.enter="handleLogin" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
@ -92,7 +86,6 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -190,15 +183,12 @@ function handleLogin() { |
|
|
|
|
|
|
|
|
const redirect = (query.redirect as LocationQueryValue) ?? "/"; |
|
|
const redirect = (query.redirect as LocationQueryValue) ?? "/"; |
|
|
|
|
|
|
|
|
const otherQueryParams = Object.keys(query).reduce( |
|
|
const otherQueryParams = Object.keys(query).reduce((acc: any, cur: string) => { |
|
|
(acc: any, cur: string) => { |
|
|
|
|
|
if (cur !== "redirect") { |
|
|
if (cur !== "redirect") { |
|
|
acc[cur] = query[cur]; |
|
|
acc[cur] = query[cur]; |
|
|
} |
|
|
} |
|
|
return acc; |
|
|
return acc; |
|
|
}, |
|
|
}, {}); |
|
|
{} |
|
|
|
|
|
); |
|
|
|
|
|
//console.log("登陆输出:",redirect,otherQueryParams); |
|
|
//console.log("登陆输出:",redirect,otherQueryParams); |
|
|
router.push({ path: redirect, query: otherQueryParams }); |
|
|
router.push({ path: redirect, query: otherQueryParams }); |
|
|
getCaptcha(); |
|
|
getCaptcha(); |
|
|
@ -227,7 +217,7 @@ onMounted(() => { |
|
|
background-image: url(../../assets/login/bg.png); |
|
|
background-image: url(../../assets/login/bg.png); |
|
|
background-repeat: no-repeat; |
|
|
background-repeat: no-repeat; |
|
|
background-size: 100% 100%; |
|
|
background-size: 100% 100%; |
|
|
background-color: #ECEFF5; |
|
|
background-color: #eceff5; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
@ -243,7 +233,7 @@ onMounted(() => { |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
font-size: 37px; |
|
|
font-size: 37px; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
color: #1E5EFF; |
|
|
color: #1e5eff; |
|
|
line-height: 43px; |
|
|
line-height: 43px; |
|
|
margin-bottom: 30px; |
|
|
margin-bottom: 30px; |
|
|
} |
|
|
} |
|
|
@ -252,7 +242,7 @@ onMounted(() => { |
|
|
width: 500px; |
|
|
width: 500px; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
border-radius: 6px; |
|
|
border-radius: 6px; |
|
|
box-shadow: 0px 0px 42px -28px #37508E; |
|
|
box-shadow: 0px 0px 42px -28px #37508e; |
|
|
padding: 60px 30px; |
|
|
padding: 60px 30px; |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
left: 50%; |
|
|
left: 50%; |
|
|
@ -278,12 +268,11 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
.el-form-item { |
|
|
.el-form-item { |
|
|
border-radius: 5px; |
|
|
border-radius: 5px; |
|
|
border: solid 1px #D9D9D9; |
|
|
border: solid 1px #d9d9d9; |
|
|
color: #666; |
|
|
color: #666; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.el-input { |
|
|
.el-input { |
|
|
|
|
|
|
|
|
// 子组件 scoped 无效,使用 :deep |
|
|
// 子组件 scoped 无效,使用 :deep |
|
|
:deep(.el-input__wrapper) { |
|
|
:deep(.el-input__wrapper) { |
|
|
padding: 0; |
|
|
padding: 0; |
|
|
|