mirror of https://github.com/halo-dev/halo-admin
Mute some apis
parent
4cdf634045
commit
cc4bfb58de
|
@ -7,7 +7,8 @@ const adminApi = {}
|
||||||
adminApi.counts = () => {
|
adminApi.counts = () => {
|
||||||
return service({
|
return service({
|
||||||
url: `${baseUrl}/counts`,
|
url: `${baseUrl}/counts`,
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
mute: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ postApi.create = (postToCreate, autoSave) => {
|
||||||
url: baseUrl,
|
url: baseUrl,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: postToCreate,
|
data: postToCreate,
|
||||||
|
mute: autoSave,
|
||||||
params: {
|
params: {
|
||||||
autoSave: autoSave
|
autoSave: autoSave
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,9 @@ function getFieldValidationError(data) {
|
||||||
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
NProgress.start()
|
if (!config.mute) {
|
||||||
|
NProgress.start()
|
||||||
|
}
|
||||||
// TODO set token
|
// TODO set token
|
||||||
setTokenToHeader(config)
|
setTokenToHeader(config)
|
||||||
return config
|
return config
|
||||||
|
|
Loading…
Reference in New Issue