|
|
|
@ -21,7 +21,9 @@ const axiosInstance = axios.create({
|
|
|
|
|
|
|
|
|
|
axiosInstance.interceptors.request.use(async (config) => { |
|
|
|
|
try{ |
|
|
|
|
if (config.url !== `${base_url}project/s-curve-command`) { |
|
|
|
|
$("body").addClass("loading"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
catch(e) |
|
|
|
|
{ |
|
|
|
@ -34,7 +36,9 @@ axiosInstance.interceptors.request.use(async (config) => {
|
|
|
|
|
|
|
|
|
|
axiosInstance.interceptors.response.use(async (config) => { |
|
|
|
|
try { |
|
|
|
|
if (config.url !== `${base_url}project/s-curve-command`) { |
|
|
|
|
$("body").removeClass("loading"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
catch(e) |
|
|
|
|
{ |
|
|
|
@ -60,11 +64,17 @@ $.ajaxSetup({
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$(document).on({ |
|
|
|
|
ajaxStart: function(){ |
|
|
|
|
|
|
|
|
|
$(document).ajaxStart(function(event) { |
|
|
|
|
var url = event.target.URL; |
|
|
|
|
if (url !== `${base_url}project/s-curve-command`) { |
|
|
|
|
$("body").addClass("loading"); |
|
|
|
|
}, |
|
|
|
|
ajaxStop: function(){ |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$(document).ajaxComplete(function(event) { |
|
|
|
|
var url = event.target.URL; |
|
|
|
|
if (url !== `${base_url}project/s-curve-command`) { |
|
|
|
|
$("body").removeClass("loading"); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|