mo 5 rokov pred
rodič
commit
6b75bf1a62

+ 2 - 1
package.json

@@ -18,6 +18,7 @@
     "axios": "0.18.1",
     "default-passive-events": "^1.0.10",
     "element-ui": "^2.12.0",
+    "i": "^0.3.6",
     "js-cookie": "2.2.0",
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
@@ -26,7 +27,6 @@
     "qs": "^6.8.0",
     "vue": "2.6.10",
     "vue-amap": "^0.5.10",
-    "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vuex": "3.1.0"
   },
@@ -42,6 +42,7 @@
     "babel-core": "7.0.0-bridge.0",
     "babel-eslint": "10.0.1",
     "babel-jest": "23.6.0",
+    "babel-polyfill": "^6.26.0",
     "chalk": "2.4.2",
     "connect": "3.6.6",
     "eslint": "5.15.3",

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

@@ -76,7 +76,7 @@ export default {
     },
     async logout () {
       await this.$store.dispatch("user/logout");
-      this.$router.push(`/login?redirect=${this.$route.fullPath}`);
+      this.$router.push(`/login`);
     }
   }
 };

+ 1 - 0
src/main.js

@@ -2,6 +2,7 @@ import Vue from 'vue'
 import ElementUI from 'element-ui'
 import 'normalize.css/normalize.css' // A modern alternative to CSS resets
 import 'default-passive-events'
+import 'babel-polyfill'
 
 import 'element-ui/lib/theme-chalk/index.css'
 import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

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

@@ -139,7 +139,11 @@ export default {
             .dispatch("user/login", this.loginForm)
             .then(() => {
               console.log('登录成功');
-              this.$router.push({ path: this.redirect || "/" });
+              this.$nextTick(res => {
+                this.$router.push({ path: "/main/main" });
+              })
+
+
 
             })
             .catch(() => {