caichengyu 9 months ago
parent
commit
13e0d4628b

BIN
src/assets/images/loginPage/loginbg.png


+ 29 - 1
src/assets/styles/variables.scss

@@ -18,6 +18,22 @@ $base-menu-light-color:rgba(0,0,0,.70);
 $base-menu-light-background:#ffffff;
 $base-logo-light-title-color: #001529;
 
+$base-menu-lightblue-color:#ffffff;
+$base-menu-lightblue-background:#2447e9;
+$base-logo-lightblue-title-color: #ffffff;
+
+$base-menu-tiffany-color:#ffffff;
+$base-menu-tiffany-background:#00f2ff;
+$base-logo-tiffany-title-color: #ffffff;
+
+$base-menu-lightpurple-color:rgba(0,0,0,.70);
+$base-menu-lightpurple-background:rgb(218, 183, 255);
+$base-logo-lightpurple-title-color: rgb(218, 183, 255);
+
+$base-menu-customize1-color:#ffffff;
+$base-menu-customize1-background:#11A983;
+$base-logo-customize1-title-color: #ffffff;
+
 $base-sub-menu-background:#1f2d3d;
 $base-sub-menu-hover:#001528;
 
@@ -43,12 +59,24 @@ $base-sidebar-width: 220px;
 :export {
   menuColor: $base-menu-color;
   menuLightColor: $base-menu-light-color;
+  menuLightblueColor: $base-menu-lightblue-color;
+  menuTiffanyColor: $base-menu-tiffany-color;
+  menuLightpurpleColor: $base-menu-lightpurple-color;
+  menuCustomize1Color: $base-menu-customize1-color;
   menuColorActive: $base-menu-color-active;
   menuBackground: $base-menu-background;
   menuLightBackground: $base-menu-light-background;
+  menuLightblueBackground: $base-menu-lightblue-background;
+  menuTiffanyBackground: $base-menu-tiffany-background;
+  menuLightpurpleBackground: $base-menu-lightpurple-background;
+  menuCustomize1Background: $base-menu-customize1-background;
   subMenuBackground: $base-sub-menu-background;
   subMenuHover: $base-sub-menu-hover;
   sideBarWidth: $base-sidebar-width;
   logoTitleColor: $base-logo-title-color;
-  logoLightTitleColor: $base-logo-light-title-color
+  logoLightTitleColor: $base-logo-light-title-color;
+  logoLightblueTitleColor: $base-logo-lightblue-title-color;
+  logoTiffanyTitleColor: $base-logo-tiffany-title-color;
+  logoLightpurpleTitleColor: $base-logo-lightpurple-title-color;
+  logoCustomize1TitleColor: $base-logo-customize1-title-color;
 }

+ 5 - 5
src/layout/components/Navbar.vue

@@ -25,13 +25,13 @@
         <el-tooltip content="文档地址" effect="dark" placement="bottom">
           <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
         </el-tooltip> -->
-        <el-tooltip content="版本说明" effect="dark" placement="bottom">
+        <!-- <el-tooltip content="版本说明" effect="dark" placement="bottom">
           <version
             id="version"
             class="right-menu-item hover-effect"
             @openMsg="openMsg"
           />
-        </el-tooltip>
+        </el-tooltip> -->
 
         <el-dialog
           append-to-body
@@ -58,11 +58,11 @@
             <el-button @click="dialogVisible = false">关 闭</el-button>
           </span>
         </el-dialog>
-        <screenfull id="screenfull" class="right-menu-item hover-effect" />
+        <!-- <screenfull id="screenfull" class="right-menu-item hover-effect" /> -->
 
-        <el-tooltip content="布局大小" effect="dark" placement="bottom">
+        <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
           <size-select id="size-select" class="right-menu-item hover-effect" />
-        </el-tooltip>
+        </el-tooltip> -->
       </template>
       <el-dropdown
         class="avatar-container right-menu-item hover-effect"

+ 59 - 1
src/layout/components/Settings/index.vue

@@ -18,6 +18,54 @@
               </i>
             </div>
           </div>
+          <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-lightpurple')">
+            <img src="@/assets/images/light.svg" alt="lightpurple">
+            <div v-if="sideTheme === 'theme-lightpurple'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
+              <i aria-label="图标: check" class="anticon anticon-check">
+                <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
+                     focusable="false" class="">
+                  <path
+                    d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/>
+                </svg>
+              </i>
+            </div>
+          </div>
+          <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-lightblue')">
+            <img src="@/assets/images/light.svg" alt="lightblue">
+            <div v-if="sideTheme === 'theme-lightblue'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
+              <i aria-label="图标: check" class="anticon anticon-check">
+                <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
+                     focusable="false" class="">
+                  <path
+                    d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/>
+                </svg>
+              </i>
+            </div>
+          </div>
+          <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-tiffany')">
+            <img src="@/assets/images/light.svg" alt="tiffany">
+            <div v-if="sideTheme === 'theme-tiffany'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
+              <i aria-label="图标: check" class="anticon anticon-check">
+                <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
+                     focusable="false" class="">
+                  <path
+                    d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/>
+                </svg>
+              </i>
+            </div>
+          </div>
+          <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-customize1')">
+            <img src="@/assets/images/light.svg" alt="customize1">
+            <div v-if="sideTheme === 'theme-customize1'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
+              <i aria-label="图标: check" class="anticon anticon-check">
+                <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
+                     focusable="false" class="">
+                  <path
+                    d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/>
+                </svg>
+              </i>
+            </div>
+          </div>
           <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-light')">
             <img src="@/assets/images/light.svg" alt="light">
             <div v-if="sideTheme === 'theme-light'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
@@ -148,6 +196,7 @@ export default {
   },
   methods: {
     themeChange(val) {
+      console.log('theme',val)
       this.$store.dispatch('settings/changeSetting', {
         key: 'theme',
         value: val
@@ -175,6 +224,15 @@ export default {
             "theme":"${this.theme}"
           }`
       );
+      console.log(`{
+            "topNav":${this.topNav},
+            "tagsView":${this.tagsView},
+            "fixedHeader":${this.fixedHeader},
+            "sidebarLogo":${this.sidebarLogo},
+            "dynamicTitle":${this.dynamicTitle},
+            "sideTheme":"${this.sideTheme}",
+            "theme":"${this.theme}"
+          }`);
       setTimeout(this.$modal.closeLoading(), 1000)
     },
     resetSetting() {
@@ -197,7 +255,7 @@ export default {
     }
 
     .setting-drawer-block-checbox {
-      display: flex;
+      display: block;
       justify-content: flex-start;
       align-items: center;
       margin-top: 10px;

+ 80 - 21
src/layout/components/Sidebar/Logo.vue

@@ -1,47 +1,106 @@
 <template>
-  <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
+  <div
+    class="sidebar-logo-container"
+    :class="{ collapse: collapse }"
+    :style="{
+      backgroundColor:
+        sideTheme === 'theme-dark'
+          ? variables.menuBackground
+            : sideTheme === 'theme-lightblue'
+            ? variables.menuLightblueBackground
+            : sideTheme === 'theme-tiffany'
+            ? variables.menuTiffanyBackground
+            : sideTheme === 'theme-lightpurple'
+            ? variables.menuLightpurpleBackground
+            : sideTheme === 'theme-customize1'
+            ? variables.menuCustomize1Background
+          : variables.menuLightBackground,
+    }"
+  >
     <transition name="sidebarLogoFade">
-      <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
-        <img v-if="logo" :src="sideTheme === 'theme-dark'? logo : logoYT" class="sidebar-logo" />
-        <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ $store.state.user.companyName }} </h1>
+      <router-link
+        v-if="collapse"
+        key="collapse"
+        class="sidebar-logo-link"
+        to="/"
+      >
+        <img
+          v-if="logo"
+          :src="sideTheme === 'theme-dark' ? logo : logoYT"
+          class="sidebar-logo"
+        />
+        <h1
+          v-else
+          class="sidebar-title"
+          :style="{
+            color:
+              sideTheme === 'theme-dark'
+                ? variables.logoTitleColor
+            : sideTheme === 'theme-lightblue'
+            ? variables.logoLightblueTitleColor
+            : sideTheme === 'theme-tiffany'
+            ? variables.logoTiffanyTitleColor
+            : sideTheme === 'theme-lightpurple'
+            ? variables.logoLightpurpleTitleColor
+            : sideTheme === 'theme-customize1'
+            ? variables.logoCustomize1TitleColor
+                : variables.logoLightTitleColor,
+          }"
+        >
+          {{ $store.state.user.companyName }}
+        </h1>
       </router-link>
       <router-link v-else key="expand" class="sidebar-logo-link" to="/">
-        <img v-if="logo" :src="sideTheme === 'theme-dark'? logo : logoYT" class="sidebar-logo" />
-        <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ $store.state.user.companyName }} </h1>
+        <img
+          v-if="logo"
+          :src="sideTheme === 'theme-dark' ? logo : logoYT"
+          class="sidebar-logo"
+        />
+        <h1
+          class="sidebar-title"
+          :style="{
+            color:
+              sideTheme === 'theme-dark'
+                ? variables.logoTitleColor
+                : variables.logoLightTitleColor,
+          }"
+        >
+          {{ $store.state.user.companyName }}
+        </h1>
       </router-link>
     </transition>
   </div>
 </template>
 
 <script>
-import logoImg from '@/assets/images/logo@2xS.png'
-import logoYTImg from '@/assets/images/logo@2xSYT.png'
-import variables from '@/assets/styles/variables.scss'
+import logoImg from "@/assets/images/logo@2xS.png";
+import logoYTImg from "@/assets/images/logo@2xSYT.png";
+import variables from "@/assets/styles/variables.scss";
 
 export default {
-  name: 'SidebarLogo',
+  name: "SidebarLogo",
   props: {
     collapse: {
       type: Boolean,
-      required: true
-    }
+      required: true,
+    },
   },
   computed: {
     variables() {
       return variables;
     },
-	sideTheme() {
-      return this.$store.state.settings.sideTheme
-    }
+    sideTheme() {
+      return this.$store.state.settings.sideTheme;
+    },
   },
   data() {
     return {
-      title: '',
+      title: "",
       logo: logoImg,
-      logoYT:logoYTImg,
-    }
-  }
-}
+      logoYT: logoYTImg,
+    };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -81,7 +140,7 @@ export default {
       font-weight: bold;
       line-height: 50px;
       font-size: 16px;
-      font-family: "Heiti SC","黑体-简";
+      font-family: "Heiti SC", "黑体-简";
       vertical-align: middle;
     }
   }

+ 100 - 44
src/layout/components/Sidebar/index.vue

@@ -1,26 +1,66 @@
 <template>
-    <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
-        <logo v-if="showLogo" :collapse="isCollapse" />
-        <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
-            <el-menu
-                :default-active="activeMenu"
-                :collapse="isCollapse"
-                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
-                :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
-                :unique-opened="true"
-                :active-text-color="settings.theme"
-                :collapse-transition="false"
-                mode="vertical"
-            >
-                <sidebar-item
-                    v-for="(route, index) in sidebarRouters"
-                    :key="route.path  + index"
-                    :item="route"
-                    :base-path="route.path"
-                />
-            </el-menu>
-        </el-scrollbar>
-    </div>
+  <div
+    :class="{ 'has-logo': showLogo }"
+    :style="{
+      backgroundColor:
+        settings.sideTheme === 'theme-dark'
+          ? variables.menuBackground
+          : settings.sideTheme === 'theme-lightblue'
+          ? variables.menuLightblueBackground
+          : settings.sideTheme === 'theme-tiffany'
+          ? variables.menuTiffanyBackground
+          : settings.sideTheme === 'theme-lightblue'
+          ? variables.menuLightblueBackground
+          : settings.sideTheme === 'theme-customize1'
+          ? variables.menuCustomize1Background
+          : variables.menuLightBackground,
+    }"
+  >
+    <logo v-if="showLogo" :collapse="isCollapse" />
+    <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="
+          settings.sideTheme === 'theme-dark'
+            ? variables.menuBackground
+            : settings.sideTheme === 'theme-lightblue'
+            ? variables.menuLightblueBackground
+            : settings.sideTheme === 'theme-tiffany'
+            ? variables.menuTiffanyBackground
+            : settings.sideTheme === 'theme-lightpurple'
+            ? variables.menuLightpurpleBackground
+            : settings.sideTheme === 'theme-customize1'
+            ? variables.menuCustomize1Background
+            : variables.menuLightBackground
+        "
+        :text-color="
+          settings.sideTheme === 'theme-dark'
+            ? variables.menuColor
+            : settings.sideTheme === 'theme-lightblue'
+            ? variables.menuLightblueColor
+            : settings.sideTheme === 'theme-tiffany'
+            ? variables.menuTiffanyColor
+            : settings.sideTheme === 'theme-lightpurple'
+            ? variables.menuLightpurpleColor
+            : settings.sideTheme === 'theme-customize1'
+            ? variables.menuCustomize1Color
+            : variables.menuLightColor
+        "
+        :unique-opened="true"
+        :active-text-color="settings.theme"
+        :collapse-transition="false"
+        mode="vertical"
+      >
+        <sidebar-item
+          v-for="(route, index) in sidebarRouters"
+          :key="route.path + index"
+          :item="route"
+          :base-path="route.path"
+        />
+      </el-menu>
+    </el-scrollbar>
+  </div>
 </template>
 
 <script>
@@ -30,28 +70,44 @@ import SidebarItem from "./SidebarItem";
 import variables from "@/assets/styles/variables.scss";
 
 export default {
-    components: { SidebarItem, Logo },
-    computed: {
-        ...mapState(["settings"]),
-        ...mapGetters(["sidebarRouters", "sidebar"]),
-        activeMenu() {
-            const route = this.$route;
-            const { meta, path } = route;
-            // if set path, the sidebar will highlight the path you set
-            if (meta.activeMenu) {
-                return meta.activeMenu;
-            }
-            return path;
-        },
-        showLogo() {
-            return this.$store.state.settings.sidebarLogo;
-        },
-        variables() {
-            return variables;
-        },
-        isCollapse() {
-            return !this.sidebar.opened;
-        }
+  components: { SidebarItem, Logo },
+  data() {
+    return {
+      variablesList: [{
+        theme:"theme-dark",menuBackground:"",menuColor:""
+      }], //未读列表
+    };
+  },
+  mounted(){
+    //   this.$store.dispatch('settings/changeSetting', {
+    //     key: 'theme',
+    //     value: '#13C2C2'
+    //   })
+  },
+  computed: {
+    ...mapState(["settings"]),
+    ...mapGetters(["sidebarRouters", "sidebar"]),
+    activeMenu() {
+      const route = this.$route;
+      const { meta, path } = route;
+      // if set path, the sidebar will highlight the path you set
+      if (meta.activeMenu) {
+        return meta.activeMenu;
+      }
+      return path;
+    },
+    showLogo() {
+      return this.$store.state.settings.sidebarLogo;
+    },
+    variables() {
+      return variables;
+    },
+    isCollapse() {
+      return !this.sidebar.opened;
+    },
+    getvariables(type){
+
     }
+  },
 };
 </script>

+ 2 - 2
src/settings.js

@@ -2,7 +2,7 @@ module.exports = {
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
    */
-  sideTheme: 'theme-dark',
+  sideTheme: 'theme-light',
 
   /**
    * 是否系统布局配置
@@ -12,7 +12,7 @@ module.exports = {
   /**
    * 是否显示顶部导航
    */
-  topNav: false,
+  topNav: 1,
 
   /**
    * 是否显示 tagsView

+ 10 - 7
src/views/login.vue

@@ -273,10 +273,11 @@ export default {
   display: flex;
   height: 100%;
   overflow: hidden;
+  background: url("../assets/images/loginPage/loginbg.png") no-repeat center;
   .login_Left {
     width: 100%;
-    min-width: 1920px;
-    background: url("../assets/images/left@2x.png") no-repeat center;
+    // min-width: 1920px;
+    // background: url("../assets/images/left@2x.png") no-repeat center;
     background-size: contain;
     overflow: hidden;
     .topName {
@@ -288,11 +289,13 @@ export default {
         vertical-align: bottom;
       }
       text-shadow: 0px 0px 3px rgba(41, 115, 255, 0.7);
-      position: absolute;
+     position: absolute;
       color: rgb(41, 115, 255);
       top: 50px;
-      left: 150px;
+      // left: 150px;
       font-size: 32px;
+      text-align: center;
+      width: 100%;
     }
     .anima1 {
       position: fixed;
@@ -358,11 +361,11 @@ export default {
   }
   .login_divs {
     position: fixed;
-    right: 0;
-    top: 0;
+    right: 35%;
+    top: 20%;
     min-width: 500px;
     width: 574px;
-    height: 100%;
+    height: 620px;
     background-color: #4174ff;
     z-index: 1000;
     display: flex;

+ 441 - 0
src/views/loginold.vue

@@ -0,0 +1,441 @@
+<template>
+  <div class="login">
+    <div class="login_Left">
+      <h2 class="topName">
+        <img src="@/assets/images/logo@2xSYT.png" alt="" />
+        {{ $store.state.user.companyName }}
+      </h2>
+      <div class="anima1"></div>
+      <div class="anima2"></div>
+      <div class="anima3"></div>
+      <div class="anima4"></div>
+      <div class="anima5"></div>
+    </div>
+    <div class="login_divs">
+      <el-form
+        class="login_Right"
+        ref="loginForm"
+        :model="loginForm"
+        :rules="loginRules"
+      >
+        <div class="weComeSty">
+          <img
+            style="width: 30px; height: 24px; vertical-align: sub"
+            src="@/assets/images/smile@2x.png"
+            alt=""
+          /><span class="textStys">欢迎登录</span>
+        </div>
+        <div class="mar_stys textStys">用户名</div>
+        <el-form-item prop="username">
+          <el-input
+            v-model="loginForm.username"
+            type="text"
+            auto-complete="off"
+            placeholder="请输入用户名"
+          >
+          </el-input>
+        </el-form-item>
+        <div class="mar_stys textStys">密码</div>
+        <el-form-item prop="password">
+          <el-input
+            class="el_inputSty"
+            v-model="loginForm.password"
+            type="password"
+            auto-complete="off"
+            placeholder="密码"
+            @keyup.enter.native="handleLogin"
+          >
+          </el-input>
+        </el-form-item>
+        <div class="mar_stys textStys">验证码</div>
+        <el-form-item prop="code" v-if="captchaOnOff" class="fle_x">
+          <el-input
+            class="el_inputSty"
+            v-model="loginForm.code"
+            auto-complete="off"
+            placeholder="验证码"
+            @keyup.enter.native="handleLogin"
+          >
+          </el-input>
+          <div class="login-code">
+            <img :src="codeUrl" @click="getCode" class="login-code-img" />
+          </div>
+        </el-form-item>
+        <div class="mar_stys textStys" v-if="commondual">手机号码</div>
+        <el-form-item prop="phonenumber" v-if="commondual">
+          <el-input
+            v-model="loginForm.phonenumber"
+            type="text"
+            placeholder="请输入手机号码"
+          >
+          </el-input>
+        </el-form-item>
+        <div class="mar_stys textStys" v-if="commondual">手机验证码</div>
+        <el-form-item prop="smsCode" v-if="commondual">
+          <el-input placeholder="获取验证码" v-model="loginForm.smsCode">
+            <span class="btn" slot="suffix" @click="getRegisterSms">
+              {{
+                registerCountDown == 0
+                  ? "获取验证码"
+                  : `${registerCountDown}秒重新获取`
+              }}
+            </span>
+          </el-input>
+        </el-form-item>
+        <div class="rightStsyt">
+          <el-checkbox v-model="loginForm.rememberMe" class="checkStyles"
+            >记住密码</el-checkbox
+          >
+        </div>
+        <el-form-item style="width: 100%">
+          <el-button
+            :loading="loading"
+            size="medium"
+            type="primary"
+            class="btnFootsty"
+            @click.native.prevent="handleLogin"
+          >
+            <span v-if="!loading">登 录</span>
+            <span v-else>登 录 中...</span>
+          </el-button>
+          <div style="float: right" v-if="register">
+            <router-link class="link-type" :to="'/register'"
+              >立即注册</router-link
+            >
+          </div>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCodeImg, commondual_auth, commonsms_login } from "@/api/login";
+import Cookies from "js-cookie";
+import { encrypt, decrypt } from "@/utils/jsencrypt";
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      registerCountDown: 0,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        rememberMe: false,
+        code: "",
+        uuid: "",
+        phonenumber: "",
+        smsCode: "",
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" },
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" },
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }],
+        phonenumber: [
+          { required: true, trigger: "blur", message: "请输入手机号码" },
+        ],
+        smsCode: [
+          { required: true, trigger: "blur", message: "请输入手机验证码" },
+        ],
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: true,
+      // 注册开关
+      register: false,
+      redirect: undefined,
+      commondual: false,
+      getRegisterCodeLock: false,
+    };
+  },
+  watch: {
+    $route: {
+      handler: function (route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true,
+    },
+  },
+  created() {
+    commondual_auth().then((res) => {
+      if (res.data === "1") {
+        this.commondual = true;
+      } else {
+        this.commondual = false;
+      }
+    });
+    this.getCode();
+    this.getCookie();
+  },
+  methods: {
+    /**
+     * 获取注册验证码
+     */
+    getRegisterSms() {
+      var self = this;
+      this.$refs.loginForm.validateField("phonenumber", (valid) => {
+        if (!valid) {
+          if (this.registerCountDown == 0) {
+            if (this.getRegisterCodeLock) {
+              return;
+            }
+            this.getRegisterCodeLock = true;
+            commonsms_login({ tel: this.loginForm.phonenumber })
+              .then((res) => {
+                this.getRegisterCodeLock = false;
+                this.$message({
+                  message: `验证码已发送`,
+                  type: "success",
+                });
+                this.registerCountDown = 60;
+                this.registerCountDownTimer = setInterval(() => {
+                  self.registerCountDown--;
+                  if (self.registerCountDown == 0) {
+                    clearInterval(self.registerCountDownTimer);
+                  }
+                }, 1000);
+              })
+              .catch((err) => {
+                this.$message({
+                  message: err.msg,
+                  type: "error",
+                });
+                this.getRegisterCodeLock = false;
+              });
+          }
+        }
+      });
+    },
+    getCode() {
+      getCodeImg().then((res) => {
+        // this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
+        // if (this.captchaOnOff) {
+        this.codeUrl = "data:image/gif;base64," + res.data.img;
+        this.loginForm.uuid = res.data.uuid;
+        // }
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username");
+      const password = Cookies.get("password");
+      const rememberMe = Cookies.get("rememberMe");
+      this.loginForm = {
+        username: username === undefined ? this.loginForm.username : username,
+        password:
+          password === undefined ? this.loginForm.password : decrypt(password),
+        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
+      };
+    },
+    handleLogin() {
+      this.$refs.loginForm.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          if (this.loginForm.rememberMe) {
+            Cookies.set("username", this.loginForm.username, { expires: 30 });
+            Cookies.set("password", encrypt(this.loginForm.password), {
+              expires: 30,
+            });
+            Cookies.set("rememberMe", this.loginForm.rememberMe, {
+              expires: 30,
+            });
+          } else {
+            Cookies.remove("username");
+            Cookies.remove("password");
+            Cookies.remove("rememberMe");
+          }
+          this.$store
+            .dispatch("Login", this.loginForm)
+            .then(() => {
+              this.$router.push({ path: this.redirect || "/" }).catch(() => {});
+            })
+            .catch(() => {
+              this.loading = false;
+              if (this.captchaOnOff) {
+                this.getCode();
+              }
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.login {
+  display: flex;
+  height: 100%;
+  overflow: hidden;
+  .login_Left {
+    width: 100%;
+    min-width: 1920px;
+    background: url("../assets/images/left@2x.png") no-repeat center;
+    background-size: contain;
+    overflow: hidden;
+    .topName {
+      user-select: none;
+      cursor: unset;
+      img {
+        width: 54.4px;
+        height: 38.4px;
+        vertical-align: bottom;
+      }
+      text-shadow: 0px 0px 3px rgba(41, 115, 255, 0.7);
+      position: absolute;
+      color: rgb(41, 115, 255);
+      top: 50px;
+      left: 150px;
+      font-size: 32px;
+    }
+    .anima1 {
+      position: fixed;
+      top: 343px;
+      left: 182px;
+      width: 48px;
+      height: 136px;
+      background: url("../assets/images/mZ/1@2x.png");
+      background-size: 48px 136px;
+      animation: animal1 4s linear infinite;
+      opacity: 0;
+    }
+    .anima2 {
+      position: fixed;
+      top: 580px;
+      left: -20px;
+      width: 62px;
+      height: 170px;
+      background: url("../assets/images/mZ/2@2x.png");
+      background-size: 62px 170px;
+      animation: animal1 4s linear infinite;
+      opacity: 0;
+    }
+    .anima3 {
+      position: fixed;
+      bottom: -258px;
+      left: 183px;
+      width: 151px;
+      height: 415px;
+      background: url("../assets/images/mZ/3@2x.png");
+      background-size: 151px 415px;
+      animation: animal1 4s linear infinite;
+      opacity: 0;
+    }
+    .anima4 {
+      position: fixed;
+      bottom: -350px;
+      left: 987px;
+      width: 199px;
+      height: 551px;
+      background: url("../assets/images/mZ/4@2x.png");
+      background-size: 199px 551px;
+      animation: animal1 4s linear infinite;
+      opacity: 0;
+    }
+    .anima5 {
+      position: fixed;
+      top: 200px;
+      left: 1289px;
+      width: 85px;
+      height: 236px;
+      background: url("../assets/images/mZ/5@2x.png");
+      background-size: 85px 236px;
+      animation: animal1 4s linear infinite;
+      opacity: 0;
+    }
+    @keyframes animal1 {
+      50% {
+        transform: translateY(-50px);
+        opacity: 1;
+      }
+    }
+  }
+  .login_divs {
+    position: fixed;
+    right: 0;
+    top: 0;
+    min-width: 500px;
+    width: 574px;
+    height: 100%;
+    background-color: #4174ff;
+    z-index: 1000;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    box-shadow: -4px 0px 9px 1px rgba(17, 33, 77, 0.1);
+    .login_Right {
+      width: 420px;
+    }
+  }
+}
+.textStys {
+  margin-left: 13px;
+  color: #fff;
+  font-weight: 400;
+  font-family: Microsoft YaHei;
+  font-size: 24px;
+}
+.weComeSty {
+  margin-bottom: 70px;
+}
+.mar_stys {
+  margin-bottom: 16px;
+}
+/deep/.el-input--medium .el-input__inner {
+  height: 48px;
+  font-size: 20px;
+  border-radius: 24px;
+}
+/deep/.el-form-item--medium .el-form-item__content {
+  display: flex;
+  align-items: center;
+}
+.login-code {
+  height: 40px;
+  margin-left: 18px;
+  .login-code-img {
+    height: 40px;
+  }
+}
+.rightStsyt {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+/deep/.checkStyles {
+  margin: 0px 0px 25px 0px;
+  color: #fff;
+}
+/deep/.el-checkbox__input.is-checked + .el-checkbox__label {
+  color: #fff;
+}
+.btnFootsty {
+  width: 100%;
+  height: 48px;
+  border-radius: 24px;
+  background-color: #fff;
+  color: #4174ff;
+  font-size: 20px;
+  font-weight: bold;
+  font-family: Microsoft YaHei;
+}
+/deep/ .fle_x > .el-form-item__content {
+  display: flex;
+  align-items: center;
+}
+
+.btn {
+  font-size: 14px;
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #3f8dfd;
+  white-space: nowrap;
+  cursor: pointer;
+}
+</style>