wuxiang 2 years ago
parent
commit
8350a823b9
2 changed files with 13 additions and 23 deletions
  1. 1 1
      src/views/login/index.vue
  2. 12 22
      vue.config.js

+ 1 - 1
src/views/login/index.vue

@@ -36,7 +36,6 @@
             type="primary"
             style="width: 100%"
             @click="dataFormSubmit()"
-            :loading="isHttpLoading"
           >
             登录
           </el-button>
@@ -82,6 +81,7 @@ export default {
             .then((data) => {
               this.$store.commit("user/setUserInfo",{ loginName: params.loginName, ...data.data });
               setToken(data.data.tokenData);
+              console.log("login success")
               this.$router.push({ path: "/home" });
             })
             .catch((e) => {});

+ 12 - 22
vue.config.js

@@ -45,29 +45,19 @@ module.exports = {
         },
         output: {
             sourcePrefix: ' '
-          }
-         },
-        devServer: {
-          proxy: {
-            '/socket.io':{
-              target: 'http://192.168.1.6:1234', // target host
-              changeOrigin: true, // needed for virtual hosted sites
-              logLevel: 'debug'
-            },
-            '/sockjs-node': {
-              target: 'http://192.168.1.6:1234',
-              ws: true,
-              changeOrigin: true
-            },
-        '/api': {
-          target: 'http://localhost:80',
-          ws: true,
-          changeOrigin: true,
-          // pathRewrite:{
-          //   "^/geoserver":""
-          // } 
         }
-    }
+    },
+    devServer: {
+        proxy: {
+            '/api': {
+                target: 'http://localhost:80',
+                ws: true,
+                changeOrigin: true,
+                // pathRewrite:{
+                //   "^/geoserver":""
+                // } 
+            }
+        }
     },
 
     chainWebpack: config => {