From e854a3236e1dce4e2095f61401e524f6eb61c9fb Mon Sep 17 00:00:00 2001
From: yz <yz_0812@outlook.com>
Date: 星期二, 19 一月 2021 00:13:25 +0800
Subject: [PATCH] 完善登陆

---
 src/views/login/login-scoped.scss |   26 +++++++++++++++++---------
 src/views/login/index.vue         |   13 +++++++------
 .eslintignore                     |    3 +--
 .prettierrc.js                    |    9 +++++++++
 src/views/login/login.scss        |    3 +--
 5 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/.eslintignore b/.eslintignore
index 69bbc1c..1214b3f 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,5 +1,4 @@
 build/*.js
 src/assets
 public
-dist
-src/views/login
\ No newline at end of file
+dist
\ No newline at end of file
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000..d5292b6
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,9 @@
+module.exports = {
+	semi: false, // 行位是否使用分号,默认为true
+	trailingComma: 'es5', // 是否使用尾逗号,有三个可选值"<none|es5|all>"
+	singleQuote: true, // 字符串是否使用单引号,默认为false,使用双引号
+	printWidth: 100, // 一行的字符数,如果超过会进行换行,默认为80
+	tabWidth: 4, // 一个tab代表几个空格数
+	useTabs: true, // 启用tab缩进
+	bracketSpacing: true, // 对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
+}
\ No newline at end of file
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 134c5c1..9f2f123 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,11 +1,12 @@
 <template>
   <div class="login-container">
     <div class="login-info">
-          <div class="title">中保亚太人力资源管理系统</div>
-      <img class="zbyt-login" src="../../assets/login/zbyt-login.png" width='' />
+      <div class="title">中保亚太人力资源管理系统</div>
+      <div class="login-img">
+        <img class="zbyt-login" src="../../assets/login/zbyt-login.png">
+      </div>
     </div>
     <el-form ref="loginForm" :model="loginForm" :rules="rules" class="login-form" autocomplete="off" label-position="left">
-      
       <span v-if="login.type === 'up'">
         <el-form-item prop="username">
           <el-input
@@ -46,7 +47,7 @@
           />
         </el-form-item>
         <img :src="imageCode" alt="codeImage" class="code-image" @click="getCodeImage">
-        <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:14px;" @click.native.prevent="handleLogin">
+        <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:14px;background-color: rgba(163, 44, 48, 1);border-color: rgba(163, 44, 48, 1);border-radius: 20px;margin-top: 10%;" @click.native.prevent="handleLogin">
           {{ $t('login.logIn') }}
         </el-button>
       </span>
@@ -86,7 +87,7 @@
                 autocomplete="off"
               />
             </el-form-item>
-            <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:14px;" @click.native.prevent="bindLogin">
+            <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:14px;background-color: rgba(163, 44, 48, 1);border-color: rgba(163, 44, 48, 1);border-radius: 20px;margin-top: 10%;" @click.native.prevent="bindLogin">
               {{ $t('common.bindLogin') }}
             </el-button>
           </el-tab-pane>
@@ -114,7 +115,7 @@
                 autocomplete="off"
               />
             </el-form-item>
-            <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:14px;" @click.native.prevent="signLogin">
+            <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:14px;background-color: rgba(163, 44, 48, 1);border-color: rgba(163, 44, 48, 1);border-radius: 20px;margin-top: 10%;" @click.native.prevent="signLogin">
               {{ $t('common.signLogin') }}
             </el-button>
           </el-tab-pane>
diff --git a/src/views/login/login-scoped.scss b/src/views/login/login-scoped.scss
index 5cb1fee..62ab859 100644
--- a/src/views/login/login-scoped.scss
+++ b/src/views/login/login-scoped.scss
@@ -8,19 +8,28 @@
   width: 100%;
   height: 100vh;
   .login-info {
-    width: 500px;
+    width: 608px;
+    height: 350px;
     background-color: rgba(163, 44, 48, 1);
     position: absolute;
     left: 25%;
-    top: 44%;
+    top: 41.9%;
     margin-top: -100px;
     color: #fff;
     font-weight: 600;
-    .zbyt-login{
-      width: 100px;
-      height: 120px;
+    border-radius: 3px;
+    .login-img{
+      margin-top: 5%;
+      text-align: center;
+      .zbyt-login{
+        width: 200px;
+        height: 200px;
+      }
     }
+    
     .title {
+      margin-top: 5%;
+      text-align: center;
       font-size: 1.8rem;
       font-weight: 600;
     }
@@ -39,7 +48,7 @@
     left: 65%;
     margin: -180px 0 0 -160px;
     width: 320px;
-    height: 380px;
+    height: 350px;
     padding: 36px;
     background: #fff;
     border-radius: 3px;
@@ -82,13 +91,12 @@
     line-height: 1rem;
     height: 1rem;
     font-weight: 600;
-    color: #000;
+    color: rgba(163, 44, 48, 1);
   }
   .tips {
     font-size: 14px;
     color: #fff;
     margin-bottom: 10px;
-
     span {
       &:first-of-type {
         margin-right: 16px;
@@ -145,4 +153,4 @@
       display: none;
     }
   }
-}
+}
\ No newline at end of file
diff --git a/src/views/login/login.scss b/src/views/login/login.scss
index df265d3..109b443 100644
--- a/src/views/login/login.scss
+++ b/src/views/login/login.scss
@@ -25,7 +25,6 @@
       }
     }
   }
-
   .el-form-item {
     border: 1px solid #dedede;
     border-radius: 2px;
@@ -35,4 +34,4 @@
       border-color: #57a3f3;
     }
   }
-}
+}
\ No newline at end of file

--
Gitblit v1.8.0