فهرست منبع

修改系统配置

秦鹏 3 سال پیش
والد
کامیت
75f9709e6f
7فایلهای تغییر یافته به همراه500 افزوده شده و 422 حذف شده
  1. 81 79
      package-lock.json
  2. 20 2
      src/components/Header.vue
  3. 22 12
      src/permission.js
  4. 10 1
      src/settings.js
  5. 14 0
      src/utils/auth.js
  6. 14 0
      src/utils/index.js
  7. 339 328
      src/views/login.vue

+ 81 - 79
package-lock.json

@@ -1717,16 +1717,6 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz",
-          "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
         "cacache": {
           "version": "13.0.1",
           "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz",
@@ -1753,53 +1743,6 @@
             "unique-filename": "^1.1.1"
           }
         },
-        "chalk": {
-          "version": "4.1.1",
-          "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995276689&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz",
-          "integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
-          "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
-          "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz",
-          "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
-          "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
         "source-map": {
           "version": "0.6.1",
           "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1598275560784&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz",
@@ -1816,16 +1759,6 @@
             "minipass": "^3.1.1"
           }
         },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1622294050362&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
-          "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
         "terser-webpack-plugin": {
           "version": "2.3.8",
           "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz",
@@ -1842,18 +1775,6 @@
             "terser": "^4.6.12",
             "webpack-sources": "^1.4.3"
           }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.2.0",
-          "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.2.0.tgz",
-          "integrity": "sha1-BGpTMI3Ufljv4g3ewe3sAnzjtG4=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
         }
       }
     },
@@ -11936,6 +11857,87 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.5.0",
+      "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.5.0.tgz?cache=0&sync_timestamp=1628666767864&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-loader%2Fdownload%2Fvue-loader-16.5.0.tgz",
+      "integrity": "sha1-CcTgcSRmiZ40uZpoZSTxkWX7KJI=",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz",
+          "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646655305&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz",
+          "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
+          "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
+          "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz",
+          "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
+          "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703414084&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
+          "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-pdf": {
       "version": "4.2.0",
       "resolved": "https://registry.npm.taobao.org/vue-pdf/download/vue-pdf-4.2.0.tgz",

+ 20 - 2
src/components/Header.vue

@@ -1,8 +1,14 @@
 <template>
   <!-- 顶部登录导航 -->
   <div class="LoginNav1">
-    <div class="logo">
-      <span class="logo-img"> logo </span>
+    <div class="logo" v-if="configInfor">
+      <img
+        v-if="configInfor.logo_image_url"
+        :src="configInfor.logo_image_url"
+        alt=""
+      />
+      <span class="logo-img" v-else>logo</span>
+
       <el-menu
         :default-active="activeIndex"
         class="el-menu-demo"
@@ -127,6 +133,8 @@ import { getToken, removeToken } from "@/utils/auth";
 import Cookies from "js-cookie";
 import { getContent, getStaticContent, getLearnWebContent } from "@/api/api";
 import { setI18nLang } from "@/utils/i18n";
+import { getConfigInfor } from "@/utils/index";
+
 export default {
   name: "LayoutHeader",
   props: [],
@@ -193,6 +201,7 @@ export default {
       language_list: [],
       lang: "",
       headTimer: null,
+      configInfor: null,
     };
   },
   watch: {},
@@ -396,6 +405,9 @@ export default {
         this.is_exist = res.is_exist;
       });
     },
+    async _getConfig() {
+      this.configInfor = await getConfigInfor();
+    },
   },
   created() {},
   mounted() {
@@ -415,6 +427,8 @@ export default {
         }
       });
     }
+    _this._getConfig();
+
     _this.getLangList();
     _this.headTimer = _this.getNotReadMessage();
     setInterval(() => {
@@ -445,6 +459,10 @@ export default {
   // box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15);
   font-family: "sourceR";
   .logo {
+    > img {
+      width: 188px;
+      height: 64px;
+    }
     &-img {
       font-style: normal;
       font-weight: 600;

+ 22 - 12
src/permission.js

@@ -3,7 +3,7 @@ import store from './store'
 import { Message } from 'element-ui'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
-import { getToken } from '@/utils/auth' // get token from cookie
+import { getToken, getConfig } from '@/utils/auth' // get token from cookie
 import getPageTitle from '@/utils/get-page-title'
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
@@ -15,24 +15,34 @@ router.beforeEach(async(to, from, next) => {
     NProgress.start()
         // set page title
     document.title = getPageTitle(to.meta.title)
-    next();
+        //next();
     NProgress.done()
     const hasToken = getToken()
 
     if (hasToken) {
-        if (to.path === '/login') {
-            // if is logged in, redirect to the home page
-            next({ path: '/' })
-            NProgress.done()
-        } else {
-            try {
-                next()
-            } catch (error) {
-                Message.error(error || 'Has Error')
-                next(`/login?redirect=${to.path}`)
+        //=======重点部分以下=======
+
+        let config = getConfig();
+        if (config) {
+            if (to.path === '/login') {
+                // if is logged in, redirect to the home page
+                next({ path: '/EnterSys' })
                 NProgress.done()
+            } else {
+                try {
+                    next()
+                } catch (error) {
+                    Message.error(error || 'Has Error')
+                    next(`/login?redirect=${to.path}`)
+                    NProgress.done()
+                }
             }
+        } else {
+            next(`/login?redirect=${to.path}`)
+            NProgress.done()
         }
+        //=======重点部分以上=======
+
     } else {
         /* has no token*/
         if (whiteList.indexOf(to.path) !== -1) {

+ 10 - 1
src/settings.js

@@ -1,5 +1,14 @@
+const Cookies = require("js-cookie");
+console.log(Cookies);
+let title = ''
+let config = Cookies.get('GCLS_Config')
+if (config) {
+    let configObj = JSON.parse(config);
+    title = configObj.title
+}
+console.log(title);
 module.exports = {
-    title: '全球汉语教学平台',
+    title: title,
 
     /**
      * @type {boolean} true | false

+ 14 - 0
src/utils/auth.js

@@ -12,4 +12,18 @@ export function setToken(token) {
 
 export function removeToken() {
     return Cookies.remove(TokenKey)
+}
+
+const ConfigKey = 'GCLS_Config'
+
+export function getConfig() {
+    return Cookies.get(ConfigKey)
+}
+
+export function setConfig(val) {
+    return Cookies.set(ConfigKey, val)
+}
+
+export function removeConfig() {
+    return Cookies.remove(ConfigKey)
 }

+ 14 - 0
src/utils/index.js

@@ -0,0 +1,14 @@
+import { getStaticContent } from '@/api/api';
+import { setConfig } from './auth'
+
+export function getConfigInfor() {
+    return new Promise((resolve, reject) => {
+        let MethodName = 'sys_config_manager-GetLogo';
+        getStaticContent(MethodName, {}).then(res => {
+            setConfig(res);
+            resolve(res)
+        }).catch(err => {
+            reject(err);
+        })
+    })
+}

+ 339 - 328
src/views/login.vue

@@ -1,79 +1,82 @@
 <template>
-    <div class="login-container">
-        <div class="login-left">
-            <div class="login-texts">
-                <p>
-                    <span>全球汉语教学平台-学习中心</span>
-                </p>
-            </div>
-            <el-form
-                :model="loginForm"
-                :rules="loginRules"
-                auto-complete="on"
-                class="login-form"
-                label-position="left"
-                ref="loginForm"
-                size="mini"
-            >
-                <div class="title-container">
-                    <h3 class="title">登录</h3>
-                </div>
+  <div class="login-container" v-if="configInfor">
+    <div class="login-left">
+      <div class="login-texts">
+        <p>
+          <span>{{ configInfor.title }}-教培中心</span>
+        </p>
+      </div>
+      <el-form
+        :model="loginForm"
+        :rules="loginRules"
+        auto-complete="on"
+        class="login-form"
+        label-position="left"
+        ref="loginForm"
+        size="mini"
+      >
+        <div class="title-container">
+          <h3 class="title">登录</h3>
+        </div>
 
-                <div class="login-input" v-show="loginCheck == 'login'">
-                    <p class="input-title">用户名</p>
-                    <el-form-item prop="username">
-                        <el-input
-                            autocomplete="off"
-                            name="username"
-                            ref="username"
-                            tabindex="1"
-                            type="text"
-                            v-model="loginForm.username"
-                        />
-                    </el-form-item>
-                    <p class="input-title">密码</p>
-                    <el-form-item prop="password">
-                        <el-input
-                            :key="passwordType"
-                            :type="passwordType"
-                            @keyup.enter.native="handleLogin"
-                            autocomplete="off"
-                            name="password"
-                            ref="password"
-                            tabindex="2"
-                            v-model="loginForm.password"
-                        />
-                        <!-- <span @click="showPwd" class="show-pwd">
+        <div class="login-input" v-show="loginCheck == 'login'">
+          <p class="input-title">用户名</p>
+          <el-form-item prop="username">
+            <el-input
+              autocomplete="off"
+              name="username"
+              ref="username"
+              tabindex="1"
+              type="text"
+              v-model="loginForm.username"
+            />
+          </el-form-item>
+          <p class="input-title">密码</p>
+          <el-form-item prop="password">
+            <el-input
+              :key="passwordType"
+              :type="passwordType"
+              @keyup.enter.native="handleLogin"
+              autocomplete="off"
+              name="password"
+              ref="password"
+              tabindex="2"
+              v-model="loginForm.password"
+            />
+            <!-- <span @click="showPwd" class="show-pwd">
                             <svg-icon
                                 :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
                             />
                         </span>-->
-                    </el-form-item>
-                    <p class="input-title">用户类型</p>
-                    <el-form-item class="el-form-item-type" prop="type">
-                        <el-radio label="TEACHER" v-model="loginForm.type">教师</el-radio>
-                        <el-radio label="STUDENT" v-model="loginForm.type">学员</el-radio>
-                        <el-radio label="ADMIN" v-model="loginForm.type">系统管理员</el-radio>
-                        <!-- <span @click="showPwd" class="show-pwd">
+          </el-form-item>
+          <p class="input-title">用户类型</p>
+          <el-form-item class="el-form-item-type" prop="type">
+            <el-radio label="TEACHER" v-model="loginForm.type">教师</el-radio>
+            <el-radio label="STUDENT" v-model="loginForm.type">学员</el-radio>
+            <el-radio label="ADMIN" v-model="loginForm.type"
+              >系统管理员</el-radio
+            >
+            <!-- <span @click="showPwd" class="show-pwd">
                             <svg-icon
                                 :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
                             />
                         </span>-->
-                    </el-form-item>
-                    <el-button
-                        :loading="loading"
-                        @click.native.prevent="handleLogin"
-                        size="small"
-                        style="width: 100%; margin-bottom: 30px"
-                        type="primary"
-                    >登录</el-button>
-                </div>
-            </el-form>
-        </div>
-        <div class="login-right">
-            <!-- <img alt src="@/assets/login/index.png"> -->
+          </el-form-item>
+          <el-button
+            :loading="loading"
+            @click.native.prevent="handleLogin"
+            size="small"
+            style="width: 100%; margin-bottom: 30px"
+            type="primary"
+            >登录</el-button
+          >
         </div>
+      </el-form>
+    </div>
+    <div class="login-right">
+      <!-- <img alt src="@/assets/login/index.png"> -->
     </div>
+  </div>
 </template>
 
 <script>
@@ -82,97 +85,105 @@ import { getContent } from "@/api/api";
 import { getObjArr, saveObjArr } from "@/utils/role";
 import Cookies from "js-cookie";
 import { setToken } from "@/utils/auth";
+import { getConfigInfor } from "@/utils/index";
 export default {
-    name: "Login",
-    data () {
-        const validateUsername = (rule, value, callback) => {
-            if (!validUsername(value)) {
-                callback(new Error("请输入用户名"));
-            } else {
-                callback();
-            }
-        };
-        const validatePassword = (rule, value, callback) => {
-            if (!value) {
-                callback(new Error("请输入密码"));
-            } else {
-                callback();
-            }
-        };
-        return {
-            options: [],
-            select: "1",
-            codeText: "获取验证码",
-            codeSend: false,
-            //登录
-            loginForm: {
-                username: getObjArr("userName") || "",
-                password: "",
-                type: "TEACHER",
-            },
-            //input 规则
-            loginRules: {
-                username: [
-                    { required: true, trigger: "blur", validator: validateUsername },
-                ],
-                password: [
-                    { required: true, trigger: "blur", validator: validatePassword },
-                ],
-            },
-            loading: false,
-            passwordType: "password",
-            redirect: undefined,
-            loginCheck: "login",
-        };
+  name: "Login",
+  data() {
+    const validateUsername = (rule, value, callback) => {
+      if (!validUsername(value)) {
+        callback(new Error("请输入用户名"));
+      } else {
+        callback();
+      }
+    };
+    const validatePassword = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error("请输入密码"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      options: [],
+      select: "1",
+      codeText: "获取验证码",
+      codeSend: false,
+      //登录
+      loginForm: {
+        username: getObjArr("userName") || "",
+        password: "",
+        type: "TEACHER",
+      },
+      //input 规则
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", validator: validateUsername },
+        ],
+        password: [
+          { required: true, trigger: "blur", validator: validatePassword },
+        ],
+      },
+      loading: false,
+      passwordType: "password",
+      redirect: undefined,
+      loginCheck: "login",
+      configInfor: null,
+    };
+  },
+  watch: {
+    $route: {
+      handler: function (route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true,
     },
-    watch: {
-        $route: {
-            handler: function (route) {
-                this.redirect = route.query && route.query.redirect;
-            },
-            immediate: true,
-        },
+  },
+  methods: {
+    showPwd() {
+      if (this.passwordType === "password") {
+        this.passwordType = "";
+      } else {
+        this.passwordType = "password";
+      }
+      this.$nextTick(() => {
+        this.$refs.password.focus();
+      });
     },
-    methods: {
-        showPwd () {
-            if (this.passwordType === "password") {
-                this.passwordType = "";
-            } else {
-                this.passwordType = "password";
-            }
-            this.$nextTick(() => {
-                this.$refs.password.focus();
-            });
-        },
-        //登录
-        handleLogin () {
-            this.$refs.loginForm.validate((valid) => {
-                if (valid) {
-                    this.loading = true;
-                    let MethodName = "login_control-Login";
-                    let UserCode = "";
-                    let UserType = "";
-                    let SessionID = "";
-                    let data = {
-                        user_type: this.loginForm.type,
-                        user_name: this.loginForm.username,
-                        password: this.loginForm.password,
-                    };
-                    getContent(MethodName, UserCode, UserType, SessionID, data).then(
-                        (res) => {
-                            setToken(res);
-                            this.$router.push({ path: "/" });
-                        }
-                    ).catch(()=>{
-                        this.loading = false;
-                    });
-                } else {
-                    this.loading = false;
-                    return false;
-                }
+    //登录
+    handleLogin() {
+      this.$refs.loginForm.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          let MethodName = "login_control-Login";
+          let UserCode = "";
+          let UserType = "";
+          let SessionID = "";
+          let data = {
+            user_type: this.loginForm.type,
+            user_name: this.loginForm.username,
+            password: this.loginForm.password,
+          };
+          getContent(MethodName, UserCode, UserType, SessionID, data)
+            .then((res) => {
+              setToken(res);
+              this.$router.push({ path: "/" });
+            })
+            .catch(() => {
+              this.loading = false;
             });
-        },
+        } else {
+          this.loading = false;
+          return false;
+        }
+      });
+    },
+    async _getConfig() {
+      this.configInfor = await getConfigInfor();
     },
+  },
+  mounted() {
+    this._getConfig();
+  },
 };
 </script>
 
@@ -186,96 +197,96 @@ $cursor: #000;
 $fc: rgb(24, 144, 255);
 
 @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
-    .login-container .el-input input {
-        color: $cursor !important;
-    }
-    .el-form-item.is-success .el-input__inner {
-        border-color: $fc !important;
-    }
+  .login-container .el-input input {
+    color: $cursor !important;
+  }
+  .el-form-item.is-success .el-input__inner {
+    border-color: $fc !important;
+  }
 }
 
 /* reset element-ui css */
 .login-input {
-    font-size: 0;
-    .el-input {
-        display: inline-block;
-        height: 32px;
-        width: 85%;
+  font-size: 0;
+  .el-input {
+    display: inline-block;
+    height: 32px;
+    width: 85%;
 
-        input {
-            background: transparent;
-            border: 0px;
-            -webkit-appearance: none;
-            border-radius: 0px;
-            padding: 5px 5px 5px 15px;
-            color: rgb(117, 117, 117);
-            height: 32px;
-            caret-color: #000;
+    input {
+      background: transparent;
+      border: 0px;
+      -webkit-appearance: none;
+      border-radius: 0px;
+      padding: 5px 5px 5px 15px;
+      color: rgb(117, 117, 117);
+      height: 32px;
+      caret-color: #000;
 
-            &:-webkit-autofill {
-                box-shadow: 0 0 0px 1000px $light_gray inset !important;
-                -webkit-text-fill-color: $cursor !important;
-            }
-        }
+      &:-webkit-autofill {
+        box-shadow: 0 0 0px 1000px $light_gray inset !important;
+        -webkit-text-fill-color: $cursor !important;
+      }
     }
+  }
 
-    .el-form-item {
-        border: 1px solid #ccc;
-        // background: rgba(0, 0, 0, 0.1);
-        border-radius: 5px;
-        color: #454545;
-    }
-    .el-form-item-type {
-        border-color: #fff;
-    }
+  .el-form-item {
+    border: 1px solid #ccc;
+    // background: rgba(0, 0, 0, 0.1);
+    border-radius: 5px;
+    color: #454545;
+  }
+  .el-form-item-type {
+    border-color: #fff;
+  }
 }
 
 .sign-input {
-    .school.el-select {
-        width: 100%;
-        margin-bottom: 14px;
-    }
-    .el-input {
-        height: 32px;
-        .el-input__inner {
-            height: 32px;
-            line-height: 32px;
-        }
+  .school.el-select {
+    width: 100%;
+    margin-bottom: 14px;
+  }
+  .el-input {
+    height: 32px;
+    .el-input__inner {
+      height: 32px;
+      line-height: 32px;
     }
-    .area-code {
-        margin-bottom: 14px;
-        .el-input-group__prepend {
-            background: #fff;
-            width: 80px;
-        }
+  }
+  .area-code {
+    margin-bottom: 14px;
+    .el-input-group__prepend {
+      background: #fff;
+      width: 80px;
     }
+  }
 }
 
 .code {
-    display: flex;
-    justify-content: space-around;
-    align-items: center;
-    .code-number {
-        flex-basis: 80%;
-        margin-right: 10px;
-        .el-input--mini .el-input__inner {
-            height: 32px;
-            line-height: 32px;
-        }
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  .code-number {
+    flex-basis: 80%;
+    margin-right: 10px;
+    .el-input--mini .el-input__inner {
+      height: 32px;
+      line-height: 32px;
     }
-    .code-btn {
-        margin-top: -2px;
-        .el-button--mini {
-            padding: 8px 15px;
-            width: 120px;
-        }
+  }
+  .code-btn {
+    margin-top: -2px;
+    .el-button--mini {
+      padding: 8px 15px;
+      width: 120px;
     }
-    .sends {
-        .el-button--mini {
-            background: #ccc;
-            border-color: #ccc;
-        }
+  }
+  .sends {
+    .el-button--mini {
+      background: #ccc;
+      border-color: #ccc;
     }
+  }
 }
 </style>
 
@@ -286,136 +297,136 @@ $light_gray: #eee;
 $fc: rgb(24, 144, 255);
 
 .login-container {
-    min-height: 100%;
-    height: 100%;
-    width: 100%;
-    background: url('../assets/login/bg-login.jpg') center no-repeat;
-    background-size: cover;
-    overflow: hidden;
+  min-height: 100%;
+  height: 100%;
+  width: 100%;
+  background: url("../assets/login/bg-login.jpg") center no-repeat;
+  background-size: cover;
+  overflow: hidden;
+  position: relative;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  .login-form {
     position: relative;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    .login-form {
-        position: relative;
-        width: 350px;
-        background: #fff;
-        border-radius: 5px;
-        padding: 42px;
-        box-sizing: border-box;
-        max-width: 100%;
-        overflow: hidden;
-    }
+    width: 350px;
+    background: #fff;
+    border-radius: 5px;
+    padding: 42px;
+    box-sizing: border-box;
+    max-width: 100%;
+    overflow: hidden;
+  }
 
-    .tips {
-        font-size: 14px;
-        color: #fff;
-        margin-bottom: 10px;
+  .tips {
+    font-size: 14px;
+    color: #fff;
+    margin-bottom: 10px;
 
-        span {
-            &:first-of-type {
-                margin-right: 16px;
-            }
-        }
+    span {
+      &:first-of-type {
+        margin-right: 16px;
+      }
     }
+  }
 
-    .svg-container {
-        padding: 0px 5px 0px 15px;
-        color: $dark_gray;
-        vertical-align: middle;
-        width: 30px;
-        display: inline-block;
-    }
-    .colors {
-        color: blue;
-    }
+  .svg-container {
+    padding: 0px 5px 0px 15px;
+    color: $dark_gray;
+    vertical-align: middle;
+    width: 30px;
+    display: inline-block;
+  }
+  .colors {
+    color: blue;
+  }
 
-    .title-container {
-        position: relative;
+  .title-container {
+    position: relative;
 
-        .title {
-            font-size: 24px;
-            color: rgb(73, 73, 73);
-            margin: 0px auto 30px auto;
-            text-align: left;
-            font-weight: normal;
-        }
+    .title {
+      font-size: 24px;
+      color: rgb(73, 73, 73);
+      margin: 0px auto 30px auto;
+      text-align: left;
+      font-weight: normal;
     }
+  }
 
-    .show-pwd {
-        position: absolute;
-        right: 10px;
-        top: 3px;
-        font-size: 16px;
-        color: $dark_gray;
-        cursor: pointer;
-        user-select: none;
-    }
+  .show-pwd {
+    position: absolute;
+    right: 10px;
+    top: 3px;
+    font-size: 16px;
+    color: $dark_gray;
+    cursor: pointer;
+    user-select: none;
+  }
 }
 
 .input-title {
-    font-size: 12px;
-    font-weight: 500;
-    color: rgba(19, 20, 21, 1);
-    line-height: 20px;
-    margin-bottom: 10px;
+  font-size: 12px;
+  font-weight: 500;
+  color: rgba(19, 20, 21, 1);
+  line-height: 20px;
+  margin-bottom: 10px;
 }
 /*login tab切换*/
 .login-table {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    height: 40px;
-    margin-bottom: 20px;
-    font-size: 16px;
-    p {
-        flex: 1;
-        text-align: center;
-        color: #000;
-    }
-    span {
-        display: inline-block;
-        padding: 0 20px;
-        height: 46px;
-        line-height: 46px;
-        cursor: pointer;
-    }
-    span.hover {
-        color: $fc;
-        border-bottom: 3px solid $fc;
-    }
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 40px;
+  margin-bottom: 20px;
+  font-size: 16px;
+  p {
+    flex: 1;
+    text-align: center;
+    color: #000;
+  }
+  span {
+    display: inline-block;
+    padding: 0 20px;
+    height: 46px;
+    line-height: 46px;
+    cursor: pointer;
+  }
+  span.hover {
+    color: $fc;
+    border-bottom: 3px solid $fc;
+  }
 }
 
 /*text*/
 .login-texts {
-    font-size: 16px;
-    font-weight: 500;
-    color: #1c1c1c;
-    line-height: 30px;
-    margin-bottom: 20px;
-    text-align: center;
-    > p:nth-child(1) {
-        line-height: 50px;
-        > span:nth-child(1) {
-            font-size: 32px;
-            margin-right: 10px;
-        }
+  font-size: 16px;
+  font-weight: 500;
+  color: #1c1c1c;
+  line-height: 30px;
+  margin-bottom: 20px;
+  text-align: center;
+  > p:nth-child(1) {
+    line-height: 50px;
+    > span:nth-child(1) {
+      font-size: 32px;
+      margin-right: 10px;
     }
+  }
 }
 .login-left {
-    // flex: 1;
-    margin: 0 auto;
+  // flex: 1;
+  margin: 0 auto;
 }
 .login-right {
-    // flex: 1;
-    text-align: right;
-    height: 100%;
-    display: flex;
-    align-items: flex-end;
-    justify-content: flex-end;
-    img {
-        width: 100%;
-        vertical-align: bottom;
-    }
+  // flex: 1;
+  text-align: right;
+  height: 100%;
+  display: flex;
+  align-items: flex-end;
+  justify-content: flex-end;
+  img {
+    width: 100%;
+    vertical-align: bottom;
+  }
 }
 </style>