v1.5 正式版发布 ,详情查看发行版说明

This commit is contained in:
郑杰
2019-01-21 17:20:07 +08:00
parent 45655e2bec
commit 685985ce59
7 changed files with 68 additions and 63 deletions

View File

@@ -2,7 +2,7 @@ import axios from 'axios'
import router from '@/router'
import { Notification, MessageBox } from 'element-ui'
import store from '../store'
import { getToken, getStorageToken } from '@/utils/auth'
import { getToken } from '@/utils/auth'
// 创建axios实例
const service = axios.create({
@@ -15,8 +15,6 @@ service.interceptors.request.use(
config => {
if (getToken()) {
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
} else if (getStorageToken()) {
config.headers['Authorization'] = 'Bearer ' + getStorageToken()
}
config.headers['Content-Type'] = 'application/json'
return config