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 = () => { adminApi.counts = () => {
return service({ return service({
url: `${baseUrl}/counts`, url: `${baseUrl}/counts`,
method: 'get' method: 'get',
mute: true
}) })
} }

View File

@ -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
} }

View File

@ -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