yz
2021-01-19 e854a3236e1dce4e2095f61401e524f6eb61c9fb
完善登陆
1个文件已添加
4个文件已修改
54 ■■■■■ 已修改文件
.eslintignore 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.prettierrc.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/login-scoped.scss 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/login.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.eslintignore
@@ -1,5 +1,4 @@
build/*.js
src/assets
public
dist
src/views/login
dist
.prettierrc.js
New file
@@ -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 }
}
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>
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;
    }
  }
}
}
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;
    }
  }
}
}