From f40e9b69d5236912522ac36f4a2b57dac5028c9e Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 26 三月 2024 17:36:02 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/zgyw-ui
---
src/views/login.vue | 30 ++++++++++++++++++++++++++----
1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/views/login.vue b/src/views/login.vue
index cf7c897..e855493 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -1,7 +1,10 @@
<template>
<div class="login">
+ <div class="title-container">
+ <h3 class="title">鑷础鍏畨澶╃綉杩愮淮骞冲彴</h3>
+ </div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
- <h3 class="title">鑻ヤ緷鍚庡彴绠$悊绯荤粺</h3>
+ <h3 class="title">鑷础鍏畨澶╃綉杩愮淮骞冲彴</h3>
<el-form-item prop="username">
<el-input
@@ -38,7 +41,7 @@
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
</el-form-item>
- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">璁颁綇瀵嗙爜</el-checkbox>
+ <el-checkbox v-model="loginForm.rememberMe" style=" margin:0px 0px 25px 0px;">璁颁綇瀵嗙爜</el-checkbox>
<el-form-item style="width:100%;">
<el-button
:loading="loading"
@@ -56,7 +59,7 @@
</el-form-item>
</el-form>
- <el-dialog title="涓轰簡鎮ㄧ殑璐﹀彿瀹夊叏,棣栨鐧婚檰璇蜂慨鏀瑰瘑鐮�" :visible.sync="loginInfo.firstLogin==0?true:false">
+ <el-dialog title="涓轰簡鎮ㄧ殑璐﹀彿瀹夊叏,棣栨鐧婚檰璇蜂慨鏀瑰瘑鐮�" :visible.sync="loginInfo.firstLogin==0">
<el-form>
<el-form-item label="鏂板瘑鐮�">
<el-input v-model="newPassword" autocomplete="off"></el-input>
@@ -146,6 +149,7 @@
watch: {
$route: {
handler: function(route) {
+ console.log(route);
this.redirect = route.query && route.query.redirect;
},
immediate: true
@@ -195,6 +199,8 @@
this.loginInfo = loginInfo.user
//濡傛灉杩斿洖涓�1姝e父璺宠浆
if(this.loginInfo.firstLogin == 1){
+ this.$router.push({ path: "/" }).catch(()=>{});
+ return;
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
} else {
localStorage.setItem('firstLogin',0)
@@ -224,7 +230,9 @@
};
</script>
-<style rel="stylesheet/scss" lang="scss">
+<style rel="stylesheet/scss" lang="scss" scoped>
+
+$light_gray:#eee;
.login {
display: flex;
justify-content: center;
@@ -234,6 +242,7 @@
background-size: cover;
}
.title {
+
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
@@ -285,4 +294,17 @@
.login-code-img {
height: 38px;
}
+.title-container {
+ position: absolute;
+ transform: translateY(-400%);
+ left: 35%;
+ .title {
+ font-size: 40px;
+ color: $light_gray;
+ margin: 0px auto 20px auto;
+ text-align: center;
+ font-weight: bold;
+ letter-spacing: 20px;
+ }
+}
</style>
--
Gitblit v1.8.0