提交 9512db40 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

增加屏蔽loading功能

上级 8848ee9a
......@@ -7,10 +7,10 @@ import service from "@/utils/request";
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/getSystemConfig [post]
export const getSystemConfig = () => {
return service({
url: "/system/getSystemConfig",
method: "post",
});
return service({
url: "/system/getSystemConfig",
method: "post",
});
};
// @Tags system
......@@ -21,11 +21,11 @@ export const getSystemConfig = () => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/setSystemConfig [post]
export const setSystemConfig = (data) => {
return service({
url: "/system/setSystemConfig",
method: "post",
data,
});
return service({
url: "/system/setSystemConfig",
method: "post",
data,
});
};
// @Tags system
......@@ -35,8 +35,9 @@ export const setSystemConfig = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/getServerInfo [post]
export const getSystemState = () => {
return service({
url: "/system/getServerInfo",
method: "post",
});
};
return service({
url: "/system/getServerInfo",
method: "post",
donNotShowLoading: true
});
};
\ No newline at end of file
......@@ -30,7 +30,10 @@ const closeLoading = () => {
//http request 拦截器
service.interceptors.request.use(
config => {
showLoading()
console.log(config)
if (!config.donNotShowLoading) {
showLoading()
}
const token = store.getters['user/token']
const user = store.getters['user/userInfo']
config.data = JSON.stringify(config.data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册