wangtao 2 years ago
parent
commit
5662f9941c
4 changed files with 232 additions and 235 deletions
  1. 1 1
      .env.production
  2. 120 120
      package.json
  3. 20 20
      public/index.html
  4. 91 94
      src/views/login.vue

+ 1 - 1
.env.production

@@ -4,7 +4,7 @@ ENV = 'production'
 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
 # VUE_APP_BASE_API  = 'http://47.99.156.213:1537'
 #VUE_APP_BASE_API  = 'http://114.55.24.6:8081'
-VUE_APP_BASE_API  = 'http://172.16.120.49/zhcyapi/'
+VUE_APP_BASE_API  = '/zhcyapi'
 # 如果接口是 http 形式, wss 需要改为 ws
 #VUE_APP_WS_API = 'ws://47.99.156.213:1537'
 #VUE_APP_WS_API = 'ws://114.55.24.6:8081'

+ 120 - 120
package.json

@@ -1,122 +1,122 @@
 {
-  "name": "eladmin-web",
-  "version": "2.6.0",
-  "description": "EL-ADMIN 前端源码",
-  "author": "Zheng Jie",
-  "license": "Apache-2.0",
-  "scripts": {
-    "dev": "vue-cli-service serve",
-    "build:prod": "vue-cli-service build",
-    "build:stage": "vue-cli-service build --mode staging",
-    "preview": "node build/index.js --preview",
-    "lint": "eslint --ext .js,.vue src",
-    "test:unit": "jest --clearCache && vue-cli-service test:unit",
-    "svgo": "svgo -f src/assets/icons/svg --config=src/assets/icons/svgo.yml",
-    "new": "plop"
-  },
-  "husky": {
-    "hooks": {
-      "pre-commit": "lint-staged"
-    }
-  },
-  "lint-staged": {
-    "src/**/*.{js,vue}": [
-      "eslint --fix",
-      "git add"
+    "name": "eladmin-web",
+    "version": "2.6.0",
+    "description": "EL-ADMIN 前端源码",
+    "author": "Zheng Jie",
+    "license": "Apache-2.0",
+    "scripts": {
+        "dev": "vue-cli-service serve",
+        "build:prod": "vue-cli-service build",
+        "build:stage": "vue-cli-service build --mode staging",
+        "preview": "node build/index.js --preview",
+        "lint": "eslint --ext .js,.vue src",
+        "test:unit": "jest --clearCache && vue-cli-service test:unit",
+        "svgo": "svgo -f src/assets/icons/svg --config=src/assets/icons/svgo.yml",
+        "new": "plop"
+    },
+    "husky": {
+        "hooks": {
+            "pre-commit": "lint-staged"
+        }
+    },
+    "lint-staged": {
+        "src/**/*.{js,vue}": [
+            "eslint --fix",
+            "git add"
+        ]
+    },
+    "repository": {
+        "type": "git",
+        "url": "https://github.com/elunez/eladmin-web.git"
+    },
+    "bugs": {
+        "url": "https://github.com/elunez/eladmin/issues"
+    },
+    "dependencies": {
+        "@easydarwin/easyplayer": "^5.0.3",
+        "@riophae/vue-treeselect": "0.4.0",
+        "@wangeditor/editor": "^5.1.1",
+        "@wangeditor/editor-for-vue": "^1.0.1",
+        "axios": "^0.21.4",
+        "clipboard": "2.0.4",
+        "codemirror": "^5.49.2",
+        "connect": "3.6.6",
+        "copy-webpack-plugin": "5.1.2",
+        "core-js": "^2.6.12",
+        "echarts": "^4.2.1",
+        "echarts-gl": "^1.1.1",
+        "echarts-wordcloud": "^1.1.3",
+        "element-ui": "^2.13.2",
+        "file-saver": "1.3.8",
+        "fuse.js": "3.4.4",
+        "highlight.js": "^10.6.0",
+        "js-beautify": "^1.10.2",
+        "js-cookie": "2.2.0",
+        "jsencrypt": "^3.0.0-rc.1",
+        "jszip": "^3.7.1",
+        "mavon-editor": "^2.9.0",
+        "moment": "^2.29.3",
+        "normalize.css": "7.0.0",
+        "nprogress": "0.2.0",
+        "path-to-regexp": "2.4.0",
+        "qs": "^6.9.1",
+        "screenfull": "4.2.0",
+        "sortablejs": "1.8.4",
+        "vue": "2.6.10",
+        "vue-count-to": "1.0.13",
+        "vue-cropper": "0.4.9",
+        "vue-echarts": "^5.0.0-beta.0",
+        "vue-highlightjs": "^1.3.3",
+        "vue-image-crop-upload": "^2.5.0",
+        "vue-router": "3.0.2",
+        "vue-splitpane": "1.0.4",
+        "vuedraggable": "2.20.0",
+        "vuex": "3.1.0",
+        "wangeditor": "^3.1.1",
+        "xlsx": "^0.17.1"
+    },
+    "devDependencies": {
+        "@babel/core": "7.0.0",
+        "@babel/parser": "^7.7.4",
+        "@babel/register": "7.0.0",
+        "@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
+        "@vue/cli-plugin-babel": "3.5.3",
+        "@vue/cli-plugin-eslint": "^3.9.1",
+        "@vue/cli-plugin-unit-jest": "3.5.3",
+        "@vue/cli-service": "^3.5.3",
+        "@vue/test-utils": "1.0.0-beta.29",
+        "autoprefixer": "^9.5.1",
+        "babel-core": "7.0.0-bridge.0",
+        "babel-eslint": "10.0.1",
+        "babel-jest": "23.6.0",
+        "babel-plugin-dynamic-import-node": "2.3.0",
+        "babel-plugin-transform-remove-console": "^6.9.4",
+        "chalk": "2.4.2",
+        "chokidar": "2.1.5",
+        "connect": "3.6.6",
+        "eslint": "5.15.3",
+        "eslint-plugin-vue": "5.2.2",
+        "html-webpack-plugin": "3.2.0",
+        "http-proxy-middleware": "^0.19.1",
+        "husky": "1.3.1",
+        "lint-staged": "8.1.5",
+        "plop": "^2.7.4",
+        "runjs": "^4.3.2",
+        "sass": "^1.26.10",
+        "sass-loader": "^7.1.0",
+        "script-ext-html-webpack-plugin": "2.1.3",
+        "script-loader": "0.7.2",
+        "serve-static": "^1.13.2",
+        "svg-sprite-loader": "4.1.3",
+        "svgo": "1.2.0",
+        "vue-template-compiler": "2.6.10"
+    },
+    "engines": {
+        "node": ">=8.9",
+        "npm": ">= 3.0.0"
+    },
+    "browserslist": [
+        "> 1%",
+        "last 2 versions"
     ]
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/elunez/eladmin-web.git"
-  },
-  "bugs": {
-    "url": "https://github.com/elunez/eladmin/issues"
-  },
-  "dependencies": {
-    "@easydarwin/easyplayer": "^5.0.3",
-    "@riophae/vue-treeselect": "0.4.0",
-    "@wangeditor/editor": "^5.1.1",
-    "@wangeditor/editor-for-vue": "^1.0.1",
-    "axios": "^0.21.4",
-    "clipboard": "2.0.4",
-    "codemirror": "^5.49.2",
-    "connect": "3.6.6",
-    "copy-webpack-plugin": "5.1.2",
-    "core-js": "^2.6.12",
-    "echarts": "^4.2.1",
-    "echarts-gl": "^1.1.1",
-    "echarts-wordcloud": "^1.1.3",
-    "element-ui": "^2.13.2",
-    "file-saver": "1.3.8",
-    "fuse.js": "3.4.4",
-    "highlight.js": "^10.6.0",
-    "js-beautify": "^1.10.2",
-    "js-cookie": "2.2.0",
-    "jsencrypt": "^3.0.0-rc.1",
-    "jszip": "^3.7.1",
-    "mavon-editor": "^2.9.0",
-    "moment": "^2.29.3",
-    "normalize.css": "7.0.0",
-    "nprogress": "0.2.0",
-    "path-to-regexp": "2.4.0",
-    "qs": "^6.9.1",
-    "screenfull": "4.2.0",
-    "sortablejs": "1.8.4",
-    "vue": "2.6.10",
-    "vue-count-to": "1.0.13",
-    "vue-cropper": "0.4.9",
-    "vue-echarts": "^5.0.0-beta.0",
-    "vue-highlightjs": "^1.3.3",
-    "vue-image-crop-upload": "^2.5.0",
-    "vue-router": "3.0.2",
-    "vue-splitpane": "1.0.4",
-    "vuedraggable": "2.20.0",
-    "vuex": "3.1.0",
-    "wangeditor": "^3.1.1",
-    "xlsx": "^0.17.1"
-  },
-  "devDependencies": {
-    "@babel/core": "7.0.0",
-    "@babel/parser": "^7.7.4",
-    "@babel/register": "7.0.0",
-    "@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
-    "@vue/cli-plugin-babel": "3.5.3",
-    "@vue/cli-plugin-eslint": "^3.9.1",
-    "@vue/cli-plugin-unit-jest": "3.5.3",
-    "@vue/cli-service": "^3.5.3",
-    "@vue/test-utils": "1.0.0-beta.29",
-    "autoprefixer": "^9.5.1",
-    "babel-core": "7.0.0-bridge.0",
-    "babel-eslint": "10.0.1",
-    "babel-jest": "23.6.0",
-    "babel-plugin-dynamic-import-node": "2.3.0",
-    "babel-plugin-transform-remove-console": "^6.9.4",
-    "chalk": "2.4.2",
-    "chokidar": "2.1.5",
-    "connect": "3.6.6",
-    "eslint": "5.15.3",
-    "eslint-plugin-vue": "5.2.2",
-    "html-webpack-plugin": "3.2.0",
-    "http-proxy-middleware": "^0.19.1",
-    "husky": "1.3.1",
-    "lint-staged": "8.1.5",
-    "plop": "^2.7.4",
-    "runjs": "^4.3.2",
-    "sass": "^1.26.10",
-    "sass-loader": "^7.1.0",
-    "script-ext-html-webpack-plugin": "2.1.3",
-    "script-loader": "0.7.2",
-    "serve-static": "^1.13.2",
-    "svg-sprite-loader": "4.1.3",
-    "svgo": "1.2.0",
-    "vue-template-compiler": "2.6.10"
-  },
-  "engines": {
-    "node": ">=8.9",
-    "npm": ">= 3.0.0"
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions"
-  ]
-}
+}

+ 20 - 20
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="/zhcyweb/favicon.png">
     <script src="./libs/EasyPlayer/EasyPlayer-lib.min.js"></script>
     <title>
         <%= webpackConfig.name %>
@@ -20,14 +20,14 @@
             padding: 0px;
             /* background-color: #7171C6; */
         }
-        
+
         .chromeframe {
             margin: 0.2em 0;
             background: #ccc;
             color: #000;
             padding: 0.2em 0;
         }
-        
+
         #loader-wrapper {
             position: fixed;
             top: 0;
@@ -36,7 +36,7 @@
             height: 100%;
             z-index: 999999;
         }
-        
+
         #loader {
             display: block;
             position: relative;
@@ -55,7 +55,7 @@
             animation: spin 2s linear infinite;
             z-index: 1001;
         }
-        
+
         #loader:before {
             content: "";
             position: absolute;
@@ -72,7 +72,7 @@
             -ms-animation: spin 3s linear infinite;
             animation: spin 3s linear infinite;
         }
-        
+
         #loader:after {
             content: "";
             position: absolute;
@@ -89,7 +89,7 @@
             -webkit-animation: spin 1.5s linear infinite;
             animation: spin 1.5s linear infinite;
         }
-        
+
         @-webkit-keyframes spin {
             0% {
                 -webkit-transform: rotate(0deg);
@@ -102,7 +102,7 @@
                 transform: rotate(360deg);
             }
         }
-        
+
         @keyframes spin {
             0% {
                 -webkit-transform: rotate(0deg);
@@ -115,7 +115,7 @@
                 transform: rotate(360deg);
             }
         }
-        
+
         #loader-wrapper .loader-section {
             position: fixed;
             top: 0;
@@ -127,15 +127,15 @@
             -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%);
@@ -143,7 +143,7 @@
             -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%);
@@ -151,13 +151,13 @@
             -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%);
@@ -166,15 +166,15 @@
             -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;
@@ -187,7 +187,7 @@
             opacity: 1;
             line-height: 30px;
         }
-        
+
         #loader-wrapper .load_title span {
             font-weight: normal;
             font-style: italic;
@@ -210,4 +210,4 @@
 </body>
 
 
-</html>
+</html>

+ 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("username20220419", data.username, { expires: 30 });
-        Cookies.set("password20220419", url.passWordSaaS, { expires: 30 });
+        Cookies.set('username20220419', data.username, { expires: 30 })
+        Cookies.set('password20220419', 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("username20220419");
-      const password = Cookies.get("password20220419");
+      const username = Cookies.get('username20220419')
+      const password = Cookies.get('password20220419')
       const rememberMe = Cookies.get('rememberMe20220419')
       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("username20220419", this.loginForm.username, { expires: 30 });
-        Cookies.set("password20220419", encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 });
-        Cookies.set('rememberMe20220419', this.loginForm.rememberMe, { expires: 30 });
+        Cookies.set('username20220419', this.loginForm.username, { expires: 30 })
+        Cookies.set('password20220419', encrypt(encodeuricomponent(this.loginForm.password)), { expires: 30 })
+        Cookies.set('rememberMe20220419', this.loginForm.rememberMe, { expires: 30 })
       } else {
-        Cookies.remove("username20220419");
-        Cookies.remove("password20220419");
-        Cookies.remove('rememberMe20220419');
+        Cookies.remove('username20220419')
+        Cookies.remove('password20220419')
+        Cookies.remove('rememberMe20220419')
       }
     },
-    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 = '/zhcyweb/#/'
+      })
     },
-    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 = '/zhcyweb/#/'
+      })
     }
   }
-};
+}
 </script>
 
 <style  lang="scss" scoped>