Browse Source

增加屏蔽loading功能

main
pixel 4 years ago
parent
commit
9512db401b
  1. 1
      web/src/api/system.js
  2. 3
      web/src/utils/request.js

1
web/src/api/system.js

@ -38,5 +38,6 @@ export const getSystemState = () => {
return service({
url: "/system/getServerInfo",
method: "post",
donNotShowLoading: true
});
};

3
web/src/utils/request.js

@ -30,7 +30,10 @@ const closeLoading = () => {
//http request 拦截器
service.interceptors.request.use(
config => {
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);

Loading…
Cancel
Save