Commit c494868d by 姜雷

添加区域选择框不loading

parent eb48e21a
......@@ -19,7 +19,8 @@ let logout = false;
// request拦截器
service.interceptors.request.use(
conf => {
store.dispatch('fetchStart');
const { notLoading } = conf;
store.dispatch('fetchStart', notLoading);
if (store.getters.token) {
conf.headers = {
...conf.headers,
......@@ -51,7 +52,8 @@ service.interceptors.response.use(response => {
* code为非'0'是抛错
*/
setTimeout(() => {
store.dispatch('fetchDone');
const { notLoading } = response.config;
store.dispatch('fetchDone', notLoading);
}, 500);
if (res.code !== SUCCESS_CODE) {
if (
......
......@@ -18,6 +18,7 @@ const initAction = () => ({
fetchDashboardAreaList({ commit }, entity) {
return fetchDashboardAreaList({
data: entity,
notLoading: true,
}).then(res => {
const list = res.data;
commit(GET_AREA_LIST, list);
......
......@@ -20,7 +20,8 @@ const createBaseFetch = config => {
// request拦截器
service.interceptors.request.use(
conf => {
store.dispatch('fetchStart');
const { notLoading } = conf;
store.dispatch('fetchStart', notLoading);
if (store.getters.token) {
conf.headers = {
...conf.headers,
......@@ -52,7 +53,8 @@ const createBaseFetch = config => {
* code为非'0'是抛错
*/
setTimeout(() => {
store.dispatch('fetchDone');
const { notLoading } = response.config;
store.dispatch('fetchDone', notLoading);
}, 500);
if (res.code !== SUCCESS_CODE) {
if (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment