Browse Source

移除store引用

yuanwj 2 năm trước cách đây
mục cha
commit
2fa98de121
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      src/utils/request.js

+ 1 - 2
src/utils/request.js

@@ -1,5 +1,4 @@
 import axios from 'axios'
-import store from '@/store'
 import storage from 'store'
 import notification from 'ant-design-vue/es/notification'
 import { VueAxios } from './axios'
@@ -30,7 +29,7 @@ const errorHandler = (error) => {
         description: 'Authorization verification failed'
       })
       if (token) {
-        store.dispatch('Logout').then(() => {
+        this.$store.dispatch('Logout').then(() => {
           setTimeout(() => {
             window.location.reload()
           }, 1500)