Commit a051d5a2 by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !93
parents 9dbfa7f3 3ed2c383
......@@ -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 (
......
......@@ -19,7 +19,7 @@ const constantRouterMap = [
icon: HomeIcon,
store: require('@/containers/Dashboard/store').default,
},
component: _import('Home/Home'),
component: _import('HomePage/Home'),
},
{
path: '/dashboard',
......
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