Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-manage-shell
Commits
c494868d
Commit
c494868d
authored
May 08, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加区域选择框不loading
parent
eb48e21a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
fetch.js
src/api/fetch.js
+4
-2
areaStore.js
src/components/input/AreaDashboard/areaStore.js
+1
-0
Api.js
src/lib/Api.js
+4
-2
No files found.
src/api/fetch.js
View file @
c494868d
...
@@ -19,7 +19,8 @@ let logout = false;
...
@@ -19,7 +19,8 @@ let logout = false;
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
conf
=>
{
conf
=>
{
store
.
dispatch
(
'fetchStart'
);
const
{
notLoading
}
=
conf
;
store
.
dispatch
(
'fetchStart'
,
notLoading
);
if
(
store
.
getters
.
token
)
{
if
(
store
.
getters
.
token
)
{
conf
.
headers
=
{
conf
.
headers
=
{
...
conf
.
headers
,
...
conf
.
headers
,
...
@@ -51,7 +52,8 @@ service.interceptors.response.use(response => {
...
@@ -51,7 +52,8 @@ service.interceptors.response.use(response => {
* code为非'0'是抛错
* code为非'0'是抛错
*/
*/
setTimeout
(()
=>
{
setTimeout
(()
=>
{
store
.
dispatch
(
'fetchDone'
);
const
{
notLoading
}
=
response
.
config
;
store
.
dispatch
(
'fetchDone'
,
notLoading
);
},
500
);
},
500
);
if
(
res
.
code
!==
SUCCESS_CODE
)
{
if
(
res
.
code
!==
SUCCESS_CODE
)
{
if
(
if
(
...
...
src/components/input/AreaDashboard/areaStore.js
View file @
c494868d
...
@@ -18,6 +18,7 @@ const initAction = () => ({
...
@@ -18,6 +18,7 @@ const initAction = () => ({
fetchDashboardAreaList
({
commit
},
entity
)
{
fetchDashboardAreaList
({
commit
},
entity
)
{
return
fetchDashboardAreaList
({
return
fetchDashboardAreaList
({
data
:
entity
,
data
:
entity
,
notLoading
:
true
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
const
list
=
res
.
data
;
const
list
=
res
.
data
;
commit
(
GET_AREA_LIST
,
list
);
commit
(
GET_AREA_LIST
,
list
);
...
...
src/lib/Api.js
View file @
c494868d
...
@@ -20,7 +20,8 @@ const createBaseFetch = config => {
...
@@ -20,7 +20,8 @@ const createBaseFetch = config => {
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
conf
=>
{
conf
=>
{
store
.
dispatch
(
'fetchStart'
);
const
{
notLoading
}
=
conf
;
store
.
dispatch
(
'fetchStart'
,
notLoading
);
if
(
store
.
getters
.
token
)
{
if
(
store
.
getters
.
token
)
{
conf
.
headers
=
{
conf
.
headers
=
{
...
conf
.
headers
,
...
conf
.
headers
,
...
@@ -52,7 +53,8 @@ const createBaseFetch = config => {
...
@@ -52,7 +53,8 @@ const createBaseFetch = config => {
* code为非'0'是抛错
* code为非'0'是抛错
*/
*/
setTimeout
(()
=>
{
setTimeout
(()
=>
{
store
.
dispatch
(
'fetchDone'
);
const
{
notLoading
}
=
response
.
config
;
store
.
dispatch
(
'fetchDone'
,
notLoading
);
},
500
);
},
500
);
if
(
res
.
code
!==
SUCCESS_CODE
)
{
if
(
res
.
code
!==
SUCCESS_CODE
)
{
if
(
if
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment