loulijun2021
2022-08-04 1e9fa82cb2fe2c15f46bd1dd73f5c878c74b83b8
src/utils/request.js
@@ -1,7 +1,8 @@
import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
import store from '@/store'
import { getCookie, getToken, removeCookie } from '@/utils/auth'
import { getCookie, getToken, removeCookie, setCookie } from '@/utils/auth'
import { handleDatetime } from '@/utils/global'
// create an axios instance
const service = axios.create({
@@ -66,8 +67,9 @@
        removeCookie('userid')
        removeCookie('code')
        setTimeout(() => {
          sessionStorage.removeItem('tabViews')
          window.location.reload()
        }, 3000)
        }, 1000 * 2)
      }
      // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
      // if (res.code === 50008 || res.code === 50012 || res.code === 50014) {