Mute some apis

pull/25/head
johnniang 2019-06-06 13:55:11 +08:00
parent 4cdf634045
commit cc4bfb58de
3 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,8 @@ const adminApi = {}
adminApi.counts = () => {
return service({
url: `${baseUrl}/counts`,
method: 'get'
method: 'get',
mute: true
})
}

View File

@ -34,6 +34,7 @@ postApi.create = (postToCreate, autoSave) => {
url: baseUrl,
method: 'post',
data: postToCreate,
mute: autoSave,
params: {
autoSave: autoSave
}

View File

@ -63,7 +63,9 @@ function getFieldValidationError(data) {
service.interceptors.request.use(
config => {
if (!config.mute) {
NProgress.start()
}
// TODO set token
setTokenToHeader(config)
return config