wangtao пре 2 година
родитељ
комит
2f0eae533a
62 измењених фајлова са 8549 додато и 304 уклоњено
  1. 1 1
      .env.production
  2. 7 0
      .history/.env_20220830174750.production
  3. 7 0
      .history/.env_20220909153348.production
  4. 7 0
      .history/.env_20220909153351.production
  5. 212 0
      .history/public/index_20220906161400.html
  6. 212 0
      .history/public/index_20220909153415.html
  7. 212 0
      .history/public/index_20220909153417.html
  8. 46 0
      .history/src/api/login_20220901130522.js
  9. 56 0
      .history/src/api/login_20220908143032.js
  10. 56 0
      .history/src/api/login_20220908143033.js
  11. 46 0
      .history/src/api/login_20220908143116.js
  12. 46 0
      .history/src/api/login_20220908143117.js
  13. 46 0
      .history/src/api/login_20220908143119.js
  14. 46 0
      .history/src/api/login_20220908143120.js
  15. 46 0
      .history/src/api/login_20220908143121.js
  16. 100 0
      .history/src/router/index_20220906162049.js
  17. 100 0
      .history/src/router/index_20220908143144.js
  18. 101 0
      .history/src/router/index_20220908143411.js
  19. 101 0
      .history/src/router/index_20220908143413.js
  20. 100 0
      .history/src/router/index_20220908143425.js
  21. 100 0
      .history/src/router/index_20220908143434.js
  22. 101 0
      .history/src/router/index_20220908143438.js
  23. 101 0
      .history/src/router/index_20220908143515.js
  24. 101 0
      .history/src/router/index_20220908143525.js
  25. 100 0
      .history/src/router/index_20220908143627.js
  26. 100 0
      .history/src/router/index_20220908143628.js
  27. 100 0
      .history/src/router/index_20220908143654.js
  28. 100 0
      .history/src/router/index_20220908143657.js
  29. 100 0
      .history/src/router/index_20220908143707.js
  30. 100 0
      .history/src/router/index_20220908143731.js
  31. 100 0
      .history/src/router/index_20220908143732.js
  32. 122 0
      .history/src/store/modules/user_20220901130114.js
  33. 123 0
      .history/src/store/modules/user_20220908143544.js
  34. 123 0
      .history/src/store/modules/user_20220908143603.js
  35. 122 0
      .history/src/store/modules/user_20220908143702.js
  36. 122 0
      .history/src/store/modules/user_20220908143756.js
  37. 123 0
      .history/src/store/modules/user_20220908143805.js
  38. 122 0
      .history/src/store/modules/user_20220908143834.js
  39. 123 0
      .history/src/store/modules/user_20220908143905.js
  40. 123 0
      .history/src/store/modules/user_20220908143927.js
  41. 122 0
      .history/src/store/modules/user_20220908144043.js
  42. 122 0
      .history/src/store/modules/user_20220908144044.js
  43. 122 0
      .history/src/store/modules/user_20220908144052.js
  44. 37 0
      .history/src/utils/jsencrypt_20220908142822.js
  45. 37 0
      .history/src/utils/jsencrypt_20220908142942.js
  46. 338 0
      .history/src/views/login_20220906162103.vue
  47. 338 0
      .history/src/views/login_20220908143203.vue
  48. 338 0
      .history/src/views/login_20220908143310.vue
  49. 338 0
      .history/src/views/login_20220908143312.vue
  50. 338 0
      .history/src/views/login_20220908143314.vue
  51. 338 0
      .history/src/views/login_20220908143611.vue
  52. 338 0
      .history/src/views/login_20220908143612.vue
  53. 338 0
      .history/src/views/login_20220908143957.vue
  54. 338 0
      .history/src/views/login_20220908144030.vue
  55. 338 0
      .history/src/views/login_20220908144035.vue
  56. 338 0
      .history/src/views/login_20220908144036.vue
  57. 338 0
      .history/src/views/login_20220909153435.vue
  58. 1 1
      public/index.html
  59. 31 31
      src/api/login.js
  60. 71 72
      src/router/index.js
  61. 105 105
      src/store/modules/user.js
  62. 91 94
      src/views/login.vue

+ 1 - 1
.env.production

@@ -2,6 +2,6 @@ ENV = 'production'
 
 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
-VUE_APP_BASE_API  = 'http://172.16.120.49/hyxtapi/'
+VUE_APP_BASE_API  = '/hyxtapi'
 # 如果接口是 http 形式, wss 需要改为 ws
 VUE_APP_WS_API = 'ws://10.21.39.5:8082'

+ 7 - 0
.history/.env_20220830174750.production

@@ -0,0 +1,7 @@
+ENV = 'production'
+
+# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
+# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
+VUE_APP_BASE_API  = 'http://172.16.120.49/hyxtapi/'
+# 如果接口是 http 形式, wss 需要改为 ws
+VUE_APP_WS_API = 'ws://10.21.39.5:8082'

+ 7 - 0
.history/.env_20220909153348.production

@@ -0,0 +1,7 @@
+ENV = 'production'
+
+# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
+# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
+VUE_APP_BASE_API  = '/hyxtapi'
+# 如果接口是 http 形式, wss 需要改为 ws
+VUE_APP_WS_API = 'ws://10.21.39.5:8082'

+ 7 - 0
.history/.env_20220909153351.production

@@ -0,0 +1,7 @@
+ENV = 'production'
+
+# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
+# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
+VUE_APP_BASE_API  = '/hyxtapi'
+# 如果接口是 http 形式, wss 需要改为 ws
+VUE_APP_WS_API = 'ws://10.21.39.5:8082'

+ 212 - 0
.history/public/index_20220906161400.html

@@ -0,0 +1,212 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <link rel="icon" href="/favicon.png">
+    <title>
+        <%= webpackConfig.name %>
+    </title>
+    <style>
+        html,
+        body,
+        #app {
+            height: 100%;
+            margin: 0px;
+            padding: 0px;
+            /* background-color: #7171C6; */
+        }
+        
+        .chromeframe {
+            margin: 0.2em 0;
+            background: #ccc;
+            color: #000;
+            padding: 0.2em 0;
+        }
+        
+        #loader-wrapper {
+            position: fixed;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            z-index: 999999;
+        }
+        
+        #loader {
+            display: block;
+            position: relative;
+            left: 50%;
+            top: 50%;
+            width: 150px;
+            height: 150px;
+            margin: -75px 0 0 -75px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 2s linear infinite;
+            -ms-animation: spin 2s linear infinite;
+            -moz-animation: spin 2s linear infinite;
+            -o-animation: spin 2s linear infinite;
+            animation: spin 2s linear infinite;
+            z-index: 1001;
+        }
+        
+        #loader:before {
+            content: "";
+            position: absolute;
+            top: 5px;
+            left: 5px;
+            right: 5px;
+            bottom: 5px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 3s linear infinite;
+            -moz-animation: spin 3s linear infinite;
+            -o-animation: spin 3s linear infinite;
+            -ms-animation: spin 3s linear infinite;
+            animation: spin 3s linear infinite;
+        }
+        
+        #loader:after {
+            content: "";
+            position: absolute;
+            top: 15px;
+            left: 15px;
+            right: 15px;
+            bottom: 15px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -moz-animation: spin 1.5s linear infinite;
+            -o-animation: spin 1.5s linear infinite;
+            -ms-animation: spin 1.5s linear infinite;
+            -webkit-animation: spin 1.5s linear infinite;
+            animation: spin 1.5s linear infinite;
+        }
+        
+        @-webkit-keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        @keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        #loader-wrapper .loader-section {
+            position: fixed;
+            top: 0;
+            width: 51%;
+            height: 100%;
+            background: #7171C6;
+            z-index: 1000;
+            -webkit-transform: translateX(0);
+            -ms-transform: translateX(0);
+            transform: translateX(0);
+        }
+        
+        #loader-wrapper .loader-section.section-left {
+            left: 0;
+        }
+        
+        #loader-wrapper .loader-section.section-right {
+            right: 0;
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-left {
+            -webkit-transform: translateX(-100%);
+            -ms-transform: translateX(-100%);
+            transform: translateX(-100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-right {
+            -webkit-transform: translateX(100%);
+            -ms-transform: translateX(100%);
+            transform: translateX(100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader {
+            opacity: 0;
+            -webkit-transition: all 0.3s ease-out;
+            transition: all 0.3s ease-out;
+        }
+        
+        .loaded #loader-wrapper {
+            visibility: hidden;
+            -webkit-transform: translateY(-100%);
+            -ms-transform: translateY(-100%);
+            transform: translateY(-100%);
+            -webkit-transition: all 0.3s 1s ease-out;
+            transition: all 0.3s 1s ease-out;
+        }
+        
+        .no-js #loader-wrapper {
+            display: none;
+        }
+        
+        .no-js h1 {
+            color: #222222;
+        }
+        
+        #loader-wrapper .load_title {
+            font-family: 'Open Sans';
+            color: #FFF;
+            font-size: 19px;
+            width: 100%;
+            text-align: center;
+            z-index: 9999999999999;
+            position: absolute;
+            top: 60%;
+            opacity: 1;
+            line-height: 30px;
+        }
+        
+        #loader-wrapper .load_title span {
+            font-weight: normal;
+            font-style: italic;
+            font-size: 13px;
+            color: #FFF;
+            opacity: 0.5;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="app">
+        <div id="loader-wrapper">
+            <div id="loader"></div>
+            <div class="loader-section section-left"></div>
+            <div class="loader-section section-right"></div>
+            <div class="load_title">正在加载系统资源,请耐心等待</div>
+        </div>
+    </div>
+</body>
+
+
+</html>

+ 212 - 0
.history/public/index_20220909153415.html

@@ -0,0 +1,212 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <link rel="icon" href="/hyxtweb/favicon.png">
+    <title>
+        <%= webpackConfig.name %>
+    </title>
+    <style>
+        html,
+        body,
+        #app {
+            height: 100%;
+            margin: 0px;
+            padding: 0px;
+            /* background-color: #7171C6; */
+        }
+        
+        .chromeframe {
+            margin: 0.2em 0;
+            background: #ccc;
+            color: #000;
+            padding: 0.2em 0;
+        }
+        
+        #loader-wrapper {
+            position: fixed;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            z-index: 999999;
+        }
+        
+        #loader {
+            display: block;
+            position: relative;
+            left: 50%;
+            top: 50%;
+            width: 150px;
+            height: 150px;
+            margin: -75px 0 0 -75px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 2s linear infinite;
+            -ms-animation: spin 2s linear infinite;
+            -moz-animation: spin 2s linear infinite;
+            -o-animation: spin 2s linear infinite;
+            animation: spin 2s linear infinite;
+            z-index: 1001;
+        }
+        
+        #loader:before {
+            content: "";
+            position: absolute;
+            top: 5px;
+            left: 5px;
+            right: 5px;
+            bottom: 5px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 3s linear infinite;
+            -moz-animation: spin 3s linear infinite;
+            -o-animation: spin 3s linear infinite;
+            -ms-animation: spin 3s linear infinite;
+            animation: spin 3s linear infinite;
+        }
+        
+        #loader:after {
+            content: "";
+            position: absolute;
+            top: 15px;
+            left: 15px;
+            right: 15px;
+            bottom: 15px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -moz-animation: spin 1.5s linear infinite;
+            -o-animation: spin 1.5s linear infinite;
+            -ms-animation: spin 1.5s linear infinite;
+            -webkit-animation: spin 1.5s linear infinite;
+            animation: spin 1.5s linear infinite;
+        }
+        
+        @-webkit-keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        @keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        #loader-wrapper .loader-section {
+            position: fixed;
+            top: 0;
+            width: 51%;
+            height: 100%;
+            background: #7171C6;
+            z-index: 1000;
+            -webkit-transform: translateX(0);
+            -ms-transform: translateX(0);
+            transform: translateX(0);
+        }
+        
+        #loader-wrapper .loader-section.section-left {
+            left: 0;
+        }
+        
+        #loader-wrapper .loader-section.section-right {
+            right: 0;
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-left {
+            -webkit-transform: translateX(-100%);
+            -ms-transform: translateX(-100%);
+            transform: translateX(-100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-right {
+            -webkit-transform: translateX(100%);
+            -ms-transform: translateX(100%);
+            transform: translateX(100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader {
+            opacity: 0;
+            -webkit-transition: all 0.3s ease-out;
+            transition: all 0.3s ease-out;
+        }
+        
+        .loaded #loader-wrapper {
+            visibility: hidden;
+            -webkit-transform: translateY(-100%);
+            -ms-transform: translateY(-100%);
+            transform: translateY(-100%);
+            -webkit-transition: all 0.3s 1s ease-out;
+            transition: all 0.3s 1s ease-out;
+        }
+        
+        .no-js #loader-wrapper {
+            display: none;
+        }
+        
+        .no-js h1 {
+            color: #222222;
+        }
+        
+        #loader-wrapper .load_title {
+            font-family: 'Open Sans';
+            color: #FFF;
+            font-size: 19px;
+            width: 100%;
+            text-align: center;
+            z-index: 9999999999999;
+            position: absolute;
+            top: 60%;
+            opacity: 1;
+            line-height: 30px;
+        }
+        
+        #loader-wrapper .load_title span {
+            font-weight: normal;
+            font-style: italic;
+            font-size: 13px;
+            color: #FFF;
+            opacity: 0.5;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="app">
+        <div id="loader-wrapper">
+            <div id="loader"></div>
+            <div class="loader-section section-left"></div>
+            <div class="loader-section section-right"></div>
+            <div class="load_title">正在加载系统资源,请耐心等待</div>
+        </div>
+    </div>
+</body>
+
+
+</html>

+ 212 - 0
.history/public/index_20220909153417.html

@@ -0,0 +1,212 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <link rel="icon" href="/hyxtweb/favicon.png">
+    <title>
+        <%= webpackConfig.name %>
+    </title>
+    <style>
+        html,
+        body,
+        #app {
+            height: 100%;
+            margin: 0px;
+            padding: 0px;
+            /* background-color: #7171C6; */
+        }
+        
+        .chromeframe {
+            margin: 0.2em 0;
+            background: #ccc;
+            color: #000;
+            padding: 0.2em 0;
+        }
+        
+        #loader-wrapper {
+            position: fixed;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            z-index: 999999;
+        }
+        
+        #loader {
+            display: block;
+            position: relative;
+            left: 50%;
+            top: 50%;
+            width: 150px;
+            height: 150px;
+            margin: -75px 0 0 -75px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 2s linear infinite;
+            -ms-animation: spin 2s linear infinite;
+            -moz-animation: spin 2s linear infinite;
+            -o-animation: spin 2s linear infinite;
+            animation: spin 2s linear infinite;
+            z-index: 1001;
+        }
+        
+        #loader:before {
+            content: "";
+            position: absolute;
+            top: 5px;
+            left: 5px;
+            right: 5px;
+            bottom: 5px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 3s linear infinite;
+            -moz-animation: spin 3s linear infinite;
+            -o-animation: spin 3s linear infinite;
+            -ms-animation: spin 3s linear infinite;
+            animation: spin 3s linear infinite;
+        }
+        
+        #loader:after {
+            content: "";
+            position: absolute;
+            top: 15px;
+            left: 15px;
+            right: 15px;
+            bottom: 15px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -moz-animation: spin 1.5s linear infinite;
+            -o-animation: spin 1.5s linear infinite;
+            -ms-animation: spin 1.5s linear infinite;
+            -webkit-animation: spin 1.5s linear infinite;
+            animation: spin 1.5s linear infinite;
+        }
+        
+        @-webkit-keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        @keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        #loader-wrapper .loader-section {
+            position: fixed;
+            top: 0;
+            width: 51%;
+            height: 100%;
+            background: #7171C6;
+            z-index: 1000;
+            -webkit-transform: translateX(0);
+            -ms-transform: translateX(0);
+            transform: translateX(0);
+        }
+        
+        #loader-wrapper .loader-section.section-left {
+            left: 0;
+        }
+        
+        #loader-wrapper .loader-section.section-right {
+            right: 0;
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-left {
+            -webkit-transform: translateX(-100%);
+            -ms-transform: translateX(-100%);
+            transform: translateX(-100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-right {
+            -webkit-transform: translateX(100%);
+            -ms-transform: translateX(100%);
+            transform: translateX(100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader {
+            opacity: 0;
+            -webkit-transition: all 0.3s ease-out;
+            transition: all 0.3s ease-out;
+        }
+        
+        .loaded #loader-wrapper {
+            visibility: hidden;
+            -webkit-transform: translateY(-100%);
+            -ms-transform: translateY(-100%);
+            transform: translateY(-100%);
+            -webkit-transition: all 0.3s 1s ease-out;
+            transition: all 0.3s 1s ease-out;
+        }
+        
+        .no-js #loader-wrapper {
+            display: none;
+        }
+        
+        .no-js h1 {
+            color: #222222;
+        }
+        
+        #loader-wrapper .load_title {
+            font-family: 'Open Sans';
+            color: #FFF;
+            font-size: 19px;
+            width: 100%;
+            text-align: center;
+            z-index: 9999999999999;
+            position: absolute;
+            top: 60%;
+            opacity: 1;
+            line-height: 30px;
+        }
+        
+        #loader-wrapper .load_title span {
+            font-weight: normal;
+            font-style: italic;
+            font-size: 13px;
+            color: #FFF;
+            opacity: 0.5;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="app">
+        <div id="loader-wrapper">
+            <div id="loader"></div>
+            <div class="loader-section section-left"></div>
+            <div class="loader-section section-right"></div>
+            <div class="load_title">正在加载系统资源,请耐心等待</div>
+        </div>
+    </div>
+</body>
+
+
+</html>

+ 46 - 0
.history/src/api/login_20220901130522.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            code,
+            uuid
+        }
+    })
+}
+
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 56 - 0
.history/src/api/login_20220908143032.js

@@ -0,0 +1,56 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            code,
+            uuid
+        }
+    })
+}
+
+export function login3(username, password) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+        }
+    })
+}
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 56 - 0
.history/src/api/login_20220908143033.js

@@ -0,0 +1,56 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            code,
+            uuid
+        }
+    })
+}
+
+export function login3(username, password) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+        }
+    })
+}
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 46 - 0
.history/src/api/login_20220908143116.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            code,
+            uuid
+        }
+    })
+}
+
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 46 - 0
.history/src/api/login_20220908143117.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            code,
+            uuid
+        }
+    })
+}
+
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 46 - 0
.history/src/api/login_20220908143119.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            // code,
+            // uuid
+        }
+    })
+}
+
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 46 - 0
.history/src/api/login_20220908143120.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            // code,
+            // uuid
+        }
+    })
+}
+
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 46 - 0
.history/src/api/login_20220908143121.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+    return request({
+        url: 'auth/login3',
+        method: 'post',
+        data: {
+            username,
+            password,
+            // code,
+            // uuid
+        }
+    })
+}
+
+export function loginSSO(username, password) {
+    return request({
+        url: 'auth/login2',
+        method: 'post',
+        data: {
+            username,
+            password
+        }
+    })
+}
+
+export function getInfo() {
+    return request({
+        url: 'auth/info',
+        method: 'get'
+    })
+}
+
+export function getCodeImg() {
+    return request({
+        url: 'auth/code',
+        method: 'get'
+    })
+}
+
+export function logout() {
+    return request({
+        url: 'auth/logout',
+        method: 'delete'
+    })
+}

+ 100 - 0
.history/src/router/index_20220906162049.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143144.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 101 - 0
.history/src/router/index_20220908143411.js

@@ -0,0 +1,101 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                return
+                //next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 101 - 0
.history/src/router/index_20220908143413.js

@@ -0,0 +1,101 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                return
+                //next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143425.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143434.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            //next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 101 - 0
.history/src/router/index_20220908143438.js

@@ -0,0 +1,101 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            return
+            //next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 101 - 0
.history/src/router/index_20220908143515.js

@@ -0,0 +1,101 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            return
+            //next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 101 - 0
.history/src/router/index_20220908143525.js

@@ -0,0 +1,101 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            return
+            //next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143627.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143628.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143654.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143657.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143707.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143731.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 100 - 0
.history/src/router/index_20220908143732.js

@@ -0,0 +1,100 @@
+import router from './routers'
+import store from '@/store'
+import Config from '@/settings'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
+import { getToken } from '@/utils/auth' // getToken from cookie
+import { buildMenus } from '@/api/system/menu'
+import { filterAsyncRouter } from '@/store/modules/permission'
+import { decrypt } from '@/utils/jsencrypt'
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
+
+const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
+
+router.beforeEach((to, from, next) => {
+    if (to.meta.title) {
+        document.title = to.meta.title + ' - ' + Config.title
+    }
+    NProgress.start()
+    let url = window.location.hash
+    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
+        if (store.getters.roles.length === 0) {
+            let params = {
+                username: undefined,
+                password: undefined
+            }
+            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
+            console.log(data)
+            params.username = decrypt(decodeURIComponent(data[0]))
+            params.password = decrypt(decodeURIComponent(data[1]))
+            store.dispatch("Login", params).then((res) => {
+                store.dispatch('GetInfo').then(() => {
+                    loadMenus(next, to)
+                })
+            }).catch(() => {
+                next()
+            })
+        } else {
+            next()
+        }
+    } else {
+        if (getToken()) {
+            // 已登录且要跳转的页面是登录页
+            if (to.path === '/login') {
+                next({ path: '/' })
+                NProgress.done()
+            } else {
+                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+                    store.dispatch('GetInfo').then(() => { // 拉取user_info
+                            // 动态路由,拉取菜单
+                            loadMenus(next, to)
+                        }).catch(() => {
+                            store.dispatch('LogOut').then(() => {
+                                location.reload() // 为了重新实例化vue-router对象 避免bug
+                            })
+                        })
+                        // 登录时未拉取 菜单,在此处拉取
+                } else if (store.getters.loadMenus) {
+                    // 修改成false,防止死循环
+                    store.dispatch('updateLoadMenus')
+                    loadMenus(next, to)
+                } else {
+                    next()
+                }
+            }
+        } else {
+            /* has no token*/
+            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+                next()
+            } else if (to.path === '/sso') {
+                next()
+            } else if (to.path === '/meeting/queryMeeting') {
+                next()
+            } else {
+                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+                NProgress.done()
+            }
+        }
+    }
+
+})
+
+export const loadMenus = (next, to) => {
+    buildMenus().then(res => {
+        const sdata = JSON.parse(JSON.stringify(res))
+        const rdata = JSON.parse(JSON.stringify(res))
+        const sidebarRoutes = filterAsyncRouter(sdata)
+        const rewriteRoutes = filterAsyncRouter(rdata, true)
+        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+
+        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+            next({...to, replace: true })
+        })
+        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    })
+}
+
+router.afterEach(() => {
+    NProgress.done() // finish progress bar
+})

+ 122 - 0
.history/src/store/modules/user_20220901130114.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 123 - 0
.history/src/store/modules/user_20220908143544.js

@@ -0,0 +1,123 @@
+import { login, loginSSO, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    console.log(res)
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 123 - 0
.history/src/store/modules/user_20220908143603.js

@@ -0,0 +1,123 @@
+import { login, loginSSO, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    // console.log(res)
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 122 - 0
.history/src/store/modules/user_20220908143702.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 122 - 0
.history/src/store/modules/user_20220908143756.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 123 - 0
.history/src/store/modules/user_20220908143805.js

@@ -0,0 +1,123 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    console.log(res)
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 122 - 0
.history/src/store/modules/user_20220908143834.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 123 - 0
.history/src/store/modules/user_20220908143905.js

@@ -0,0 +1,123 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    console.log(error.response)
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 123 - 0
.history/src/store/modules/user_20220908143927.js

@@ -0,0 +1,123 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    console.log(error.response)
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 122 - 0
.history/src/store/modules/user_20220908144043.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 122 - 0
.history/src/store/modules/user_20220908144044.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        LogOut({ commit }) {
+            return new Promise((resolve, reject) => {
+                logout().then(res => {
+                    logOut(commit)
+                    resolve()
+                }).catch(error => {
+                    logOut(commit)
+                    reject(error)
+                })
+            })
+        },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 122 - 0
.history/src/store/modules/user_20220908144052.js

@@ -0,0 +1,122 @@
+import { login, loginSSO, getInfo, logout } from '@/api/login'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+
+const user = {
+    state: {
+        token: getToken(),
+        user: {},
+        roles: [],
+        // 第一次加载菜单时用到
+        loadMenus: false
+    },
+
+    mutations: {
+        SET_TOKEN: (state, token) => {
+            state.token = token
+        },
+        SET_USER: (state, user) => {
+            state.user = user
+        },
+        SET_ROLES: (state, roles) => {
+            state.roles = roles
+        },
+        SET_LOAD_MENUS: (state, loadMenus) => {
+            state.loadMenus = loadMenus
+        }
+    },
+
+    actions: {
+        // 登录
+        Login({ commit }, userInfo) {
+            const rememberMe = userInfo.rememberMe
+            return new Promise((resolve, reject) => {
+                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+                    setToken(res.token, rememberMe)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 单点登录
+        LoginSSO({ commit }, userInfo) {
+            console.log(userInfo)
+            return new Promise((resolve, reject) => {
+                loginSSO(userInfo.username, userInfo.password).then(res => {
+                    setToken(res.token, true)
+                    commit('SET_TOKEN', res.token)
+                    setUserInfo(res.user, commit)
+                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+                    commit('SET_LOAD_MENUS', true)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登录SaaS
+        LoginSaaS({ commit }, userInfo) {
+            return new Promise((resolve, reject) => {
+                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+                    console.log(res)
+                    setToken(res.data)
+                    commit('SET_TOKEN', res.data)
+                    resolve()
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 获取用户信息
+        GetInfo({ commit }) {
+            return new Promise((resolve, reject) => {
+                getInfo().then(res => {
+                    setUserInfo(res, commit)
+                    resolve(res)
+                }).catch(error => {
+                    reject(error)
+                })
+            })
+        },
+        // 登出
+        // LogOut({ commit }) {
+        //     return new Promise((resolve, reject) => {
+        //         logout().then(res => {
+        //             logOut(commit)
+        //             resolve()
+        //         }).catch(error => {
+        //             logOut(commit)
+        //             reject(error)
+        //         })
+        //     })
+        // },
+
+        updateLoadMenus({ commit }) {
+            return new Promise((resolve, reject) => {
+                commit('SET_LOAD_MENUS', false)
+            })
+        }
+    }
+}
+
+export const logOut = (commit) => {
+    commit('SET_TOKEN', '')
+    commit('SET_ROLES', [])
+    removeToken()
+}
+
+export const setUserInfo = (res, commit) => {
+    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+    if (res.roles.length === 0) {
+        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+    } else {
+        commit('SET_ROLES', res.roles)
+    }
+    commit('SET_USER', res.user)
+}
+
+export default user

+ 37 - 0
.history/src/utils/jsencrypt_20220908142822.js

@@ -0,0 +1,37 @@
+import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
+
+// 密钥对生成 http://web.chacuo.net/netrsakeypair
+
+const publicKey = `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxPWP0HTBE9vEeM34Qx03U8oVm
+C6xIqWPRuI5t8J0zEDQudAgXKPjy8E0Q3cX800UNBTx2gUfRRNrONqALKDnJ1SE6
+qCUDeXOez8sa95GQ9d4BX7pSjZLrPfnCBTBtb5LGkY5zmlmtpG2AV9eJr+kQqhs/
+r0c4njwaDjVG4kF3ZQIDAQAB`
+
+const privateKey = `MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALE9Y/QdMET28R4z
+fhDHTdTyhWYLrEipY9G4jm3wnTMQNC50CBco+PLwTRDdxfzTRQ0FPHaBR9FE2s42
+oAsoOcnVITqoJQN5c57Pyxr3kZD13gFfulKNkus9+cIFMG1vksaRjnOaWa2kbYBX
+14mv6RCqGz+vRziePBoONUbiQXdlAgMBAAECgYBjSDdAXEVYrFdeiouYjHwdyAhP
+pERKo5BFvzMRhJIaM353cwnBJ3NkapVQ2Fn6iMIKTB+VZk+7eu1yTAkUluDfLowd
+REZS4ipOBY5UuNnjbXmSOoUQw6vRnox0X4x6S1vd4FBHgpVe1VkiE7Nz5U7Clyd5
+yw2P1lHwMyB/guAH4QJBAN3dGkMASj0jm23maHOfehp/zlACB8HpMKuV4z/bEg45
+nC9Hw5NloUHrXdzEXP1+S46MCH2THflxDVYtnZTRLO0CQQDMgp3Jrn7kkKtNceZF
+R08hLbVmfNlatgONgFJ5JnR+GTQ6o2gwM6SLyoBkfAIiEDpr6c6nBXTU09GOYxBk
++h1ZAkB32pXxVBrG5JF20V3j+GcyIZEGz9H5A0xzpUlambIrVRv2vsH8wo5W2hue
+w8Woe629mBCOJgevVU9rGsFiP44RAkEApbTYAQjAjJakFpZJjKzg8vNEXoye2R9N
+9aOaL8v27A2kAjdRPm050IL+UW0hlVQs4i+KYE7NgX03+PVP3WHD0QJBANLo4PRw
+7Y+dLPAzuazsD3/5SYaSh+KSD/+tVbc6CFvLyfFUKp/a4PzzvGaLo/Ky/ffOY5k0
+hmavbHCKcg+r+hg=`
+
+// 加密
+export function encrypt(txt) {
+    const encryptor = new JSEncrypt()
+    encryptor.setPublicKey(publicKey) // 设置公钥
+    return encryptor.encrypt(txt) // 对数据进行加密
+}
+
+// 解密
+export function decrypt(txt) {
+    const encryptor = new JSEncrypt()
+    encryptor.setPrivateKey(privateKey) // 设置私钥
+    return encryptor.decrypt(txt) // 对数据进行解密
+}

+ 37 - 0
.history/src/utils/jsencrypt_20220908142942.js

@@ -0,0 +1,37 @@
+import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
+
+// 密钥对生成 http://web.chacuo.net/netrsakeypair
+
+const publicKey = `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxPWP0HTBE9vEeM34Qx03U8oVm
+C6xIqWPRuI5t8J0zEDQudAgXKPjy8E0Q3cX800UNBTx2gUfRRNrONqALKDnJ1SE6
+qCUDeXOez8sa95GQ9d4BX7pSjZLrPfnCBTBtb5LGkY5zmlmtpG2AV9eJr+kQqhs/
+r0c4njwaDjVG4kF3ZQIDAQAB`
+
+const privateKey = `MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALE9Y/QdMET28R4z
+fhDHTdTyhWYLrEipY9G4jm3wnTMQNC50CBco+PLwTRDdxfzTRQ0FPHaBR9FE2s42
+oAsoOcnVITqoJQN5c57Pyxr3kZD13gFfulKNkus9+cIFMG1vksaRjnOaWa2kbYBX
+14mv6RCqGz+vRziePBoONUbiQXdlAgMBAAECgYBjSDdAXEVYrFdeiouYjHwdyAhP
+pERKo5BFvzMRhJIaM353cwnBJ3NkapVQ2Fn6iMIKTB+VZk+7eu1yTAkUluDfLowd
+REZS4ipOBY5UuNnjbXmSOoUQw6vRnox0X4x6S1vd4FBHgpVe1VkiE7Nz5U7Clyd5
+yw2P1lHwMyB/guAH4QJBAN3dGkMASj0jm23maHOfehp/zlACB8HpMKuV4z/bEg45
+nC9Hw5NloUHrXdzEXP1+S46MCH2THflxDVYtnZTRLO0CQQDMgp3Jrn7kkKtNceZF
+R08hLbVmfNlatgONgFJ5JnR+GTQ6o2gwM6SLyoBkfAIiEDpr6c6nBXTU09GOYxBk
++h1ZAkB32pXxVBrG5JF20V3j+GcyIZEGz9H5A0xzpUlambIrVRv2vsH8wo5W2hue
+w8Woe629mBCOJgevVU9rGsFiP44RAkEApbTYAQjAjJakFpZJjKzg8vNEXoye2R9N
+9aOaL8v27A2kAjdRPm050IL+UW0hlVQs4i+KYE7NgX03+PVP3WHD0QJBANLo4PRw
+7Y+dLPAzuazsD3/5SYaSh+KSD/+tVbc6CFvLyfFUKp/a4PzzvGaLo/Ky/ffOY5k0
+hmavbHCKcg+r+hg=`
+
+// 加密
+export function encrypt(txt) {
+    const encryptor = new JSEncrypt()
+    encryptor.setPublicKey(publicKey) // 设置公钥
+    return encryptor.encrypt(txt) // 对数据进行加密
+}
+
+// 解密
+export function decrypt(txt) {
+    const encryptor = new JSEncrypt()
+    encryptor.setPrivateKey(privateKey) // 设置私钥
+    return encryptor.decrypt(txt) // 对数据进行解密
+}

+ 338 - 0
.history/src/views/login_20220906162103.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143203.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        //location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143310.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        //location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143312.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        //location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143314.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        //location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143611.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143612.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908143957.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            //this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            // this.loading = false;
+            // if (this.captchaOnOff) {
+            //   this.getCode();
+            // }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908144030.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            //this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            // this.loading = false;
+            // if (this.captchaOnOff) {
+            //   this.getCode();
+            // }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908144035.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220908144036.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/dashboard';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 338 - 0
.history/src/views/login_20220909153435.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="login" >
+    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div class="logo" v-if="erp">
+      <img src="@/assets/logo/logo-b.png" alt="">
+      <span class="logo_txt">会议管理系统</span>
+    </div>
+    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+      <h3 class="title">用户登录 <span>LOGIN</span></h3>
+      <el-form-item prop="username" >
+        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <el-input
+          v-model="loginForm.password"
+          :type="passwordtxt"
+          auto-complete="off"
+          placeholder="密码"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+        </el-input>
+
+      </el-form-item>
+      <el-form-item prop="code" v-if="captchaOnOff">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+          @keyup.enter.native="handleLogin"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <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;"  @change="memory">记住密码</el-checkbox>
+      <el-form-item style="width:100%;">
+        <el-button
+          :loading="loading"
+          size="medium"
+          type="primary"
+          style="width:100%;"
+          @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 class="el-login-footer" v-if="erp">
+      <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
+    </div>
+    <div id="loader-wrapper" v-if="ERPloading">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import bgImg from "@/assets/images/bg.png";
+import logoImg from "@/assets/logo/logo-b.png";
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { decrypt } from '@/utils/jsencrypt'
+
+export default {
+  name: "Login",
+  data() {
+    return {
+      erp:false,
+      ERPloading:true,
+      passwordtxt:"password",
+      bg:bgImg,
+      logo:logoImg,
+      codeUrl: "",
+      cookiePassword: "",
+      loginForm: {
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: false,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    };
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getUrl()
+  },
+  methods: {
+    getUrl(){
+      let url = this.$route.query
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
+        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+        this.handleLoginERP(data)
+      }else if(url.userNameSaaS && url.passWordSaaS){
+        let data = {
+          username:decrypt(decodeURIComponent(url.userNameSaaS)),
+          password:decrypt(decodeURIComponent(url.passWordSaaS))
+        }
+        Cookies.set("username20220320", data.username, { expires: 30 });
+        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        this.handleLoginSaaS(data)
+      }else{
+        this.getCode();
+        this.getCookie();
+      }
+    },
+    eyeTab(){
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+
+        this.passwordtxt = "password"
+      }
+
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = true
+          this.codeUrl =  res.img;
+          this.loginForm.uuid = res.uuid;
+          this.erp = true
+          setTimeout(()=>{
+            this.ERPloading = false
+          },)
+      });
+    },
+    getCookie() {
+      const username = Cookies.get("username20220320");
+      const password = Cookies.get("password20220320");
+      const rememberMe = Cookies.get('rememberMe20220320')
+      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;
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
+          });
+        }
+      });
+    },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
+        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+      } else {
+        Cookies.remove("username20220320");
+        Cookies.remove("password20220320");
+        Cookies.remove('rememberMe20220320');
+      }
+    },
+    handleLoginERP(data) {//erp登录
+
+      this.$store.dispatch("LoginERP", data).then((res) => {
+        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+      }).catch((err) => {
+        location.href = '/hyxtweb/#/';
+      });
+    },
+    handleLoginSaaS(data) {//SaaS登录
+      this.$store.dispatch("Login", data).then((res) => {
+        this.$router.push({ path: "/dashboard"});
+      }).catch((err) => {
+        location.href = '/hyxtweb/#/';
+      });
+    }
+  }
+};
+</script>
+
+<style  lang="scss" scoped>
+.bg{
+  width:100%;
+  height:100%;
+  overflow: hidden;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: -1;
+  .bgimg{
+    width:100%;
+    height:100%;
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: -1;
+  }
+}
+.logo{
+  width:100%;
+  position: fixed;
+  top:0;
+  img{
+    width:152px;
+    margin:10px 2rem 0 20px;
+    vertical-align: middle;
+  }
+  .logo_txt{
+    font-size: 1.5rem;
+    color:#fff;
+    vertical-align: middle;
+    letter-spacing: 4px;
+  }
+}
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  // background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
+.title {
+  margin: 0px auto 30px auto;
+  text-align: left;
+  color: #000000;
+  font-size: 20px;
+  span{
+    margin-left:10px;
+    opacity: 0.25;
+  }
+}
+
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 456px;
+  padding: 63px 35px;
+  .el-input {
+    height: 40px;
+    font-size: 16px !important;
+    input {
+      height: 40px;
+    }
+  }
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
+  }
+}
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
+.login-code {
+  width: 33%;
+  height: 36px;
+  float: right;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
+    width:100%;
+    height: 36px;
+    margin-top:-1px;
+  }
+}
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
+</style>
+<style>
+html,
+body,
+#app {
+    height: 100%;
+    margin: 0px;
+    padding: 0px;
+    background-color: transparent !important;
+
+}
+</style>

+ 1 - 1
public/index.html

@@ -6,7 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <link rel="icon" href="/favicon.png">
+    <link rel="icon" href="/hyxtweb/favicon.png">
     <title>
         <%= webpackConfig.name %>
     </title>

+ 31 - 31
src/api/login.js

@@ -1,46 +1,46 @@
 import request from '@/utils/request'
 
 export function login(username, password, code, uuid) {
-    return request({
-        url: 'auth/login3',
-        method: 'post',
-        data: {
-            username,
-            password,
-            code,
-            uuid
-        }
-    })
+  return request({
+    url: 'auth/login3',
+    method: 'post',
+    data: {
+      username,
+      password
+      // code,
+      // uuid
+    }
+  })
 }
 
 export function loginSSO(username, password) {
-    return request({
-        url: 'auth/login2',
-        method: 'post',
-        data: {
-            username,
-            password
-        }
-    })
+  return request({
+    url: 'auth/login2',
+    method: 'post',
+    data: {
+      username,
+      password
+    }
+  })
 }
 
 export function getInfo() {
-    return request({
-        url: 'auth/info',
-        method: 'get'
-    })
+  return request({
+    url: 'auth/info',
+    method: 'get'
+  })
 }
 
 export function getCodeImg() {
-    return request({
-        url: 'auth/code',
-        method: 'get'
-    })
+  return request({
+    url: 'auth/code',
+    method: 'get'
+  })
 }
 
 export function logout() {
-    return request({
-        url: 'auth/logout',
-        method: 'delete'
-    })
-}
+  return request({
+    url: 'auth/logout',
+    method: 'delete'
+  })
+}

+ 71 - 72
src/router/index.js

@@ -12,89 +12,88 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
 const whiteList = ['/login', '/sso', '/meeting/queryMeeting'] // no redirect whitelist
 
 router.beforeEach((to, from, next) => {
-    if (to.meta.title) {
-        document.title = to.meta.title + ' - ' + Config.title
+  if (to.meta.title) {
+    document.title = to.meta.title + ' - ' + Config.title
+  }
+  NProgress.start()
+  const url = window.location.hash
+  if (url.indexOf('userNameSaaS') > 0 && url.indexOf('passWordSaaS') > 0) {
+    if (store.getters.roles.length === 0) {
+      const params = {
+        username: undefined,
+        password: undefined
+      }
+      const data = url.split('login?userNameSaaS=')[1].split('&passWordSaaS=')
+      console.log(data)
+      params.username = decrypt(decodeURIComponent(data[0]))
+      params.password = decrypt(decodeURIComponent(data[1]))
+      store.dispatch('Login', params).then((res) => {
+        store.dispatch('GetInfo').then(() => {
+          loadMenus(next, to)
+        })
+      }).catch(() => {
+        next()
+      })
+    } else {
+      next()
     }
-    NProgress.start()
-    let url = window.location.hash
-    if (url.indexOf("userNameSaaS") > 0 && url.indexOf("passWordSaaS") > 0) {
-        if (store.getters.roles.length === 0) {
-            let params = {
-                username: undefined,
-                password: undefined
-            }
-            let data = url.split("login?userNameSaaS=")[1].split("&passWordSaaS=")
-            console.log(data)
-            params.username = decrypt(decodeURIComponent(data[0]))
-            params.password = decrypt(decodeURIComponent(data[1]))
-            store.dispatch("Login", params).then((res) => {
-                store.dispatch('GetInfo').then(() => {
-                    loadMenus(next, to)
-                })
-            }).catch(() => {
-                next()
+  } else {
+    if (getToken()) {
+      // 已登录且要跳转的页面是登录页
+      if (to.path === '/login') {
+        next({ path: '/' })
+        NProgress.done()
+      } else {
+        if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
+          store.dispatch('GetInfo').then(() => { // 拉取user_info
+            // 动态路由,拉取菜单
+            loadMenus(next, to)
+          }).catch(() => {
+            store.dispatch('LogOut').then(() => {
+              location.reload() // 为了重新实例化vue-router对象 避免bug
             })
+          })
+          // 登录时未拉取 菜单,在此处拉取
+        } else if (store.getters.loadMenus) {
+          // 修改成false,防止死循环
+          store.dispatch('updateLoadMenus')
+          loadMenus(next, to)
         } else {
-            next()
+          next()
         }
+      }
     } else {
-        if (getToken()) {
-            // 已登录且要跳转的页面是登录页
-            if (to.path === '/login') {
-                next({ path: '/' })
-                NProgress.done()
-            } else {
-                if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
-                    store.dispatch('GetInfo').then(() => { // 拉取user_info
-                            // 动态路由,拉取菜单
-                            loadMenus(next, to)
-                        }).catch(() => {
-                            store.dispatch('LogOut').then(() => {
-                                location.reload() // 为了重新实例化vue-router对象 避免bug
-                            })
-                        })
-                        // 登录时未拉取 菜单,在此处拉取
-                } else if (store.getters.loadMenus) {
-                    // 修改成false,防止死循环
-                    store.dispatch('updateLoadMenus')
-                    loadMenus(next, to)
-                } else {
-                    next()
-                }
-            }
-        } else {
-            /* has no token*/
-            if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
-                next()
-            } else if (to.path === '/sso') {
-                next()
-            } else if (to.path === '/meeting/queryMeeting') {
-                next()
-            } else {
-                next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
-                NProgress.done()
-            }
-        }
+      /* has no token*/
+      if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+        next()
+      } else if (to.path === '/sso') {
+        next()
+      } else if (to.path === '/meeting/queryMeeting') {
+        next()
+      } else {
+        next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+        NProgress.done()
+      }
     }
-
+  }
 })
 
 export const loadMenus = (next, to) => {
-    buildMenus().then(res => {
-        const sdata = JSON.parse(JSON.stringify(res))
-        const rdata = JSON.parse(JSON.stringify(res))
-        const sidebarRoutes = filterAsyncRouter(sdata)
-        const rewriteRoutes = filterAsyncRouter(rdata, true)
-        rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+  buildMenus().then(res => {
+    const sdata = JSON.parse(JSON.stringify(res))
+    const rdata = JSON.parse(JSON.stringify(res))
+    const sidebarRoutes = filterAsyncRouter(sdata)
+    const rewriteRoutes = filterAsyncRouter(rdata, true)
+    rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
 
-        store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
-            router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
-            next({...to, replace: true })
-        })
-        store.dispatch('SetSidebarRouters', sidebarRoutes)
+    store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
+      router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
+      next({ ...to, replace: true })
     })
+    store.dispatch('SetSidebarRouters', sidebarRoutes)
+  })
 }
 
 router.afterEach(() => {
-    NProgress.done() // finish progress bar
-})
+  NProgress.done() // finish progress bar
+})

+ 105 - 105
src/store/modules/user.js

@@ -2,121 +2,121 @@ import { login, loginSSO, getInfo, logout } from '@/api/login'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 
 const user = {
-    state: {
-        token: getToken(),
-        user: {},
-        roles: [],
-        // 第一次加载菜单时用到
-        loadMenus: false
-    },
+  state: {
+    token: getToken(),
+    user: {},
+    roles: [],
+    // 第一次加载菜单时用到
+    loadMenus: false
+  },
 
-    mutations: {
-        SET_TOKEN: (state, token) => {
-            state.token = token
-        },
-        SET_USER: (state, user) => {
-            state.user = user
-        },
-        SET_ROLES: (state, roles) => {
-            state.roles = roles
-        },
-        SET_LOAD_MENUS: (state, loadMenus) => {
-            state.loadMenus = loadMenus
-        }
+  mutations: {
+    SET_TOKEN: (state, token) => {
+      state.token = token
+    },
+    SET_USER: (state, user) => {
+      state.user = user
+    },
+    SET_ROLES: (state, roles) => {
+      state.roles = roles
     },
+    SET_LOAD_MENUS: (state, loadMenus) => {
+      state.loadMenus = loadMenus
+    }
+  },
 
-    actions: {
-        // 登录
-        Login({ commit }, userInfo) {
-            const rememberMe = userInfo.rememberMe
-            return new Promise((resolve, reject) => {
-                login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
-                    setToken(res.token, rememberMe)
-                    commit('SET_TOKEN', res.token)
-                    setUserInfo(res.user, commit)
-                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
-                    commit('SET_LOAD_MENUS', true)
-                    resolve()
-                }).catch(error => {
-                    reject(error)
-                })
-            })
-        },
-        // 单点登录
-        LoginSSO({ commit }, userInfo) {
-            console.log(userInfo)
-            return new Promise((resolve, reject) => {
-                loginSSO(userInfo.username, userInfo.password).then(res => {
-                    setToken(res.token, true)
-                    commit('SET_TOKEN', res.token)
-                    setUserInfo(res.user, commit)
-                        // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
-                    commit('SET_LOAD_MENUS', true)
-                    resolve()
-                }).catch(error => {
-                    reject(error)
-                })
-            })
-        },
-        // 登录SaaS
-        LoginSaaS({ commit }, userInfo) {
-            return new Promise((resolve, reject) => {
-                loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
-                    console.log(res)
-                    setToken(res.data)
-                    commit('SET_TOKEN', res.data)
-                    resolve()
-                }).catch(error => {
-                    reject(error)
-                })
-            })
-        },
-        // 获取用户信息
-        GetInfo({ commit }) {
-            return new Promise((resolve, reject) => {
-                getInfo().then(res => {
-                    setUserInfo(res, commit)
-                    resolve(res)
-                }).catch(error => {
-                    reject(error)
-                })
-            })
-        },
-        // 登出
-        LogOut({ commit }) {
-            return new Promise((resolve, reject) => {
-                logout().then(res => {
-                    logOut(commit)
-                    resolve()
-                }).catch(error => {
-                    logOut(commit)
-                    reject(error)
-                })
-            })
-        },
+  actions: {
+    // 登录
+    Login({ commit }, userInfo) {
+      const rememberMe = userInfo.rememberMe
+      return new Promise((resolve, reject) => {
+        login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+          setToken(res.token, rememberMe)
+          commit('SET_TOKEN', res.token)
+          setUserInfo(res.user, commit)
+          // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+          commit('SET_LOAD_MENUS', true)
+          resolve()
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 单点登录
+    LoginSSO({ commit }, userInfo) {
+      console.log(userInfo)
+      return new Promise((resolve, reject) => {
+        loginSSO(userInfo.username, userInfo.password).then(res => {
+          setToken(res.token, true)
+          commit('SET_TOKEN', res.token)
+          setUserInfo(res.user, commit)
+          // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
+          commit('SET_LOAD_MENUS', true)
+          resolve()
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 登录SaaS
+    LoginSaaS({ commit }, userInfo) {
+      return new Promise((resolve, reject) => {
+        loginSaaS({ username: userInfo.username, password: userInfo.password }).then(res => {
+          console.log(res)
+          setToken(res.data)
+          commit('SET_TOKEN', res.data)
+          resolve()
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 获取用户信息
+    GetInfo({ commit }) {
+      return new Promise((resolve, reject) => {
+        getInfo().then(res => {
+          setUserInfo(res, commit)
+          resolve(res)
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 登出
+    // LogOut({ commit }) {
+    //     return new Promise((resolve, reject) => {
+    //         logout().then(res => {
+    //             logOut(commit)
+    //             resolve()
+    //         }).catch(error => {
+    //             logOut(commit)
+    //             reject(error)
+    //         })
+    //     })
+    // },
 
-        updateLoadMenus({ commit }) {
-            return new Promise((resolve, reject) => {
-                commit('SET_LOAD_MENUS', false)
-            })
-        }
+    updateLoadMenus({ commit }) {
+      return new Promise((resolve, reject) => {
+        commit('SET_LOAD_MENUS', false)
+      })
     }
+  }
 }
 
 export const logOut = (commit) => {
-    commit('SET_TOKEN', '')
-    commit('SET_ROLES', [])
-    removeToken()
+  commit('SET_TOKEN', '')
+  commit('SET_ROLES', [])
+  removeToken()
 }
 
 export const setUserInfo = (res, commit) => {
-    // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
-    if (res.roles.length === 0) {
-        commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
-    } else {
-        commit('SET_ROLES', res.roles)
-    }
-    commit('SET_USER', res.user)
+  // 如果没有任何权限,则赋予一个默认的权限,避免请求死循环
+  if (res.roles.length === 0) {
+    commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT'])
+  } else {
+    commit('SET_ROLES', res.roles)
+  }
+  commit('SET_USER', res.user)
 }
 
-export default user
+export default user

+ 91 - 94
src/views/login.vue

@@ -1,13 +1,13 @@
 <template>
-  <div class="login" >
-    <div class="bg" v-if="erp"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
-    <div class="logo" v-if="erp">
+  <div class="login">
+    <div v-if="erp" class="bg"><img src="@/assets/images/bg.png" alt="" style="width:100%;height:100%;"></div>
+    <div v-if="erp" class="logo">
       <img src="@/assets/logo/logo-b.png" alt="">
       <span class="logo_txt">会议管理系统</span>
     </div>
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" v-if="erp">
+    <el-form v-if="erp" ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
       <h3 class="title">用户登录 <span>LOGIN</span></h3>
-      <el-form-item prop="username" >
+      <el-form-item prop="username">
         <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
         </el-input>
@@ -21,12 +21,12 @@
           @keyup.enter.native="handleLogin"
         >
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
-          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
-          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
+          <svg-icon v-show="passwordtxt =='password'" slot="prefix" icon-class="eye" class="el-input__icon input-icon" style="position:absolute;right:-340px" @click="eyeTab" />
+          <svg-icon v-show="passwordtxt =='text'" slot="prefix" icon-class="eye-open" class="el-input__icon input-icon" style="position:absolute;right:-340px" @click="eyeTab" />
         </el-input>
 
       </el-form-item>
-      <el-form-item prop="code" v-if="captchaOnOff">
+      <el-form-item v-if="captchaOnOff" prop="code">
         <el-input
           v-model="loginForm.code"
           auto-complete="off"
@@ -37,10 +37,10 @@
           <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
         </el-input>
         <div class="login-code">
-          <img :src="codeUrl" @click="getCode" class="login-code-img"/>
+          <img :src="codeUrl" class="login-code-img" @click="getCode">
         </div>
       </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;"  @change="memory">记住密码</el-checkbox>
+      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;" @change="memory">记住密码</el-checkbox>
       <el-form-item style="width:100%;">
         <el-button
           :loading="loading"
@@ -58,53 +58,53 @@
       </el-form-item>
     </el-form>
     <!--  底部  -->
-    <div class="el-login-footer" v-if="erp">
+    <div v-if="erp" class="el-login-footer">
       <!-- <span>Copyright © 2018-2021 yongtian.vip All Rights Reserved.</span> -->
     </div>
-    <div id="loader-wrapper" v-if="ERPloading">
-        <div id="loader"></div>
-        <div class="loader-section section-left"></div>
-        <div class="loader-section section-right"></div>
-        <div class="load_title">正在加载系统资源,请耐心等待</div>
+    <div v-if="ERPloading" id="loader-wrapper">
+      <div id="loader" />
+      <div class="loader-section section-left" />
+      <div class="loader-section section-right" />
+      <div class="load_title">正在加载系统资源,请耐心等待</div>
     </div>
   </div>
 </template>
 
 <script>
-import bgImg from "@/assets/images/bg.png";
-import logoImg from "@/assets/logo/logo-b.png";
-import { getCodeImg } from "@/api/login";
-import Cookies from "js-cookie";
+import bgImg from '@/assets/images/bg.png'
+import logoImg from '@/assets/logo/logo-b.png'
+import { getCodeImg } from '@/api/login'
+import Cookies from 'js-cookie'
 import { decrypt } from '@/utils/jsencrypt'
 
 export default {
-  name: "Login",
+  name: 'Login',
   data() {
     return {
-      erp:false,
-      ERPloading:true,
-      passwordtxt:"password",
-      bg:bgImg,
-      logo:logoImg,
-      codeUrl: "",
-      cookiePassword: "",
+      erp: false,
+      ERPloading: true,
+      passwordtxt: 'password',
+      bg: bgImg,
+      logo: logoImg,
+      codeUrl: '',
+      cookiePassword: '',
       loginForm: {
-        username: "",
-        password: "",
+        username: '',
+        password: '',
         // username: "admin",
         // password: "admin123",
         rememberMe: false,
-        code: "",
-        uuid: ""
+        code: '',
+        uuid: ''
       },
       loginRules: {
         username: [
-          { required: true, trigger: "blur", message: "请输入您的账号" }
+          { required: true, trigger: 'blur', message: '请输入您的账号' }
         ],
         password: [
-          { required: true, trigger: "blur", message: "请输入您的密码" }
+          { required: true, trigger: 'blur', message: '请输入您的密码' }
         ],
-        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+        code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
       },
       loading: false,
       // 验证码开关
@@ -112,12 +112,12 @@ export default {
       // 注册开关
       register: false,
       redirect: undefined
-    };
+    }
   },
   watch: {
     $route: {
       handler: function(route) {
-        this.redirect = route.query && route.query.redirect;
+        this.redirect = route.query && route.query.redirect
       },
       immediate: true
     }
@@ -126,98 +126,95 @@ export default {
     this.getUrl()
   },
   methods: {
-    getUrl(){
-      let url = this.$route.query
-      if(url.username && url.password){
-        let data = {username:url.username,password:url.password}
-        data.password = encrypt(encodeuricomponent(this.loginForm.password));
+    getUrl() {
+      const url = this.$route.query
+      if (url.username && url.password) {
+        const data = { username: url.username, password: url.password }
+        data.password = encrypt(encodeuricomponent(this.loginForm.password))
         this.handleLoginERP(data)
-      }else if(url.userNameSaaS && url.passWordSaaS){
-        let data = {
-          username:decrypt(decodeURIComponent(url.userNameSaaS)),
-          password:decrypt(decodeURIComponent(url.passWordSaaS))
+      } else if (url.userNameSaaS && url.passWordSaaS) {
+        const data = {
+          username: decrypt(decodeURIComponent(url.userNameSaaS)),
+          password: decrypt(decodeURIComponent(url.passWordSaaS))
         }
-        Cookies.set("username20220320", data.username, { expires: 30 });
-        Cookies.set("password20220320", url.passWordSaaS, { expires: 30 });
+        Cookies.set('username20220320', data.username, { expires: 30 })
+        Cookies.set('password20220320', url.passWordSaaS, { expires: 30 })
         this.handleLoginSaaS(data)
-      }else{
-        this.getCode();
-        this.getCookie();
+      } else {
+        this.getCode()
+        this.getCookie()
       }
     },
-    eyeTab(){
-      if(this.passwordtxt == "password"){
-        this.passwordtxt = "text"
-      }else{
-
-        this.passwordtxt = "password"
+    eyeTab() {
+      if (this.passwordtxt == 'password') {
+        this.passwordtxt = 'text'
+      } else {
+        this.passwordtxt = 'password'
       }
-
     },
     getCode() {
       getCodeImg().then(res => {
         this.captchaOnOff = true
-          this.codeUrl =  res.img;
-          this.loginForm.uuid = res.uuid;
-          this.erp = true
-          setTimeout(()=>{
-            this.ERPloading = false
-          },)
-      });
+        this.codeUrl = res.img
+        this.loginForm.uuid = res.uuid
+        this.erp = true
+        setTimeout(() => {
+          this.ERPloading = false
+        },)
+      })
     },
     getCookie() {
-      const username = Cookies.get("username20220320");
-      const password = Cookies.get("password20220320");
+      const username = Cookies.get('username20220320')
+      const password = Cookies.get('password20220320')
       const rememberMe = Cookies.get('rememberMe20220320')
       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;
-          this.$store.dispatch("Login", this.loginForm).then((res) => {
-            this.$router.push({ path: "/dashboard"}).catch(()=>{});
+          this.loading = true
+          this.$store.dispatch('Login', this.loginForm).then((res) => {
+            this.$router.push({ path: '/dashboard' }).catch(() => {})
           }).catch(() => {
-            this.loading = false;
+            this.loading = false
             if (this.captchaOnOff) {
-              this.getCode();
+              this.getCode()
             }
-          });
+          })
         }
-      });
+      })
     },
-    memory(){
+    memory() {
       if (this.loginForm.rememberMe) {
-        Cookies.set("username20220320", this.loginForm.username, { expires: 30 });
-        Cookies.set("password20220320", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
-        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 });
+        Cookies.set('username20220320', this.loginForm.username, { expires: 30 })
+        Cookies.set('password20220320', encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 })
+        Cookies.set('rememberMe20220320', this.loginForm.rememberMe, { expires: 30 })
       } else {
-        Cookies.remove("username20220320");
-        Cookies.remove("password20220320");
-        Cookies.remove('rememberMe20220320');
+        Cookies.remove('username20220320')
+        Cookies.remove('password20220320')
+        Cookies.remove('rememberMe20220320')
       }
     },
-    handleLoginERP(data) {//erp登录
-
-      this.$store.dispatch("LoginERP", data).then((res) => {
-        this.$router.push({ path: "/dashboard"}).catch(()=>{});
+    handleLoginERP(data) { // erp登录
+      this.$store.dispatch('LoginERP', data).then((res) => {
+        this.$router.push({ path: '/dashboard' }).catch(() => {})
       }).catch((err) => {
-        location.href = '/dashboard';
-      });
+        location.href = '/hyxtweb/#/'
+      })
     },
-    handleLoginSaaS(data) {//SaaS登录
-      this.$store.dispatch("Login", data).then((res) => {
-        this.$router.push({ path: "/dashboard"});
+    handleLoginSaaS(data) { // SaaS登录
+      this.$store.dispatch('Login', data).then((res) => {
+        this.$router.push({ path: '/dashboard' })
       }).catch((err) => {
-        location.href = '';
-      });
+        location.href = '/hyxtweb/#/'
+      })
     }
   }
-};
+}
 </script>
 
 <style  lang="scss" scoped>