取消拼接token 前缀,由后端处理
This commit is contained in:
@@ -15,7 +15,7 @@ const service = axios.create({
|
|||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
}
|
}
|
||||||
config.headers['Content-Type'] = 'application/json'
|
config.headers['Content-Type'] = 'application/json'
|
||||||
return config
|
return config
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + getToken()
|
'Authorization': getToken()
|
||||||
},
|
},
|
||||||
editorContent:
|
editorContent:
|
||||||
`<h3 style="text-align: center;">欢迎使用 wangEditor 富文本编辑器!</h3>
|
`<h3 style="text-align: center;">欢迎使用 wangEditor 富文本编辑器!</h3>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default {
|
|||||||
url: this.imagesUploadApi,
|
url: this.imagesUploadApi,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: formdata,
|
data: formdata,
|
||||||
headers: { 'Content-Type': 'multipart/form-data', 'Authorization': 'Bearer ' + getToken() }
|
headers: { 'Content-Type': 'multipart/form-data', 'Authorization': getToken() }
|
||||||
}).then((data) => {
|
}).then((data) => {
|
||||||
this.data = data.data
|
this.data = data.data
|
||||||
this.$refs.md.$img2Url(pos, this.data.data[0])
|
this.$refs.md.$img2Url(pos, this.data.data[0])
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default {
|
|||||||
apps: [],
|
apps: [],
|
||||||
servers: [],
|
servers: [],
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: 'Bearer ' + getToken()
|
Authorization: getToken()
|
||||||
},
|
},
|
||||||
deployInfo: {},
|
deployInfo: {},
|
||||||
form: {
|
form: {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
Avatar: Avatar,
|
Avatar: Avatar,
|
||||||
ico: 'el-icon-refresh',
|
ico: 'el-icon-refresh',
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + getToken()
|
'Authorization': getToken()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + getToken()
|
'Authorization': getToken()
|
||||||
},
|
},
|
||||||
loading: false, form: { subject: '', tos: [], content: '' },
|
loading: false, form: { subject: '', tos: [], content: '' },
|
||||||
tos: [{
|
tos: [{
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export default {
|
|||||||
title: '图片',
|
title: '图片',
|
||||||
crudMethod: { ...crudPic },
|
crudMethod: { ...crudPic },
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + getToken()
|
'Authorization': getToken()
|
||||||
},
|
},
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: '',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export default {
|
|||||||
title: '文件',
|
title: '文件',
|
||||||
crudMethod: { ...crudFile },
|
crudMethod: { ...crudFile },
|
||||||
delAllLoading: false,
|
delAllLoading: false,
|
||||||
headers: { 'Authorization': 'Bearer ' + getToken() },
|
headers: { 'Authorization': getToken() },
|
||||||
form: { id: null, name: null }
|
form: { id: null, name: null }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export default {
|
|||||||
title: '文件',
|
title: '文件',
|
||||||
crudMethod: { ...crudQiNiu },
|
crudMethod: { ...crudQiNiu },
|
||||||
icon: 'el-icon-refresh',
|
icon: 'el-icon-refresh',
|
||||||
url: '', headers: { 'Authorization': 'Bearer ' + getToken() }, dialog: false,
|
url: '', headers: { 'Authorization': getToken() }, dialog: false,
|
||||||
dialogImageUrl: '', dialogVisible: false, fileList: [], files: [], newWin: null
|
dialogImageUrl: '', dialogVisible: false, fileList: [], files: [], newWin: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user