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
a051d5a2
Commit
a051d5a2
authored
May 08, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
Develop See merge request
!93
parents
9dbfa7f3
3ed2c383
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
5 deletions
+10
-5
fetch.js
src/api/fetch.js
+4
-2
areaStore.js
src/components/input/AreaDashboard/areaStore.js
+1
-0
Demo.vue
src/containers/HomePage/Demo.vue
+0
-0
Home.vue
src/containers/HomePage/Home.vue
+0
-0
index.vue
src/containers/HomePage/index.vue
+0
-0
Api.js
src/lib/Api.js
+4
-2
index.js
src/router/index.js
+1
-1
No files found.
src/api/fetch.js
View file @
a051d5a2
...
@@ -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 @
a051d5a2
...
@@ -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/containers/
hom
e/Demo.vue
→
src/containers/
HomePag
e/Demo.vue
View file @
a051d5a2
File moved
src/containers/
hom
e/Home.vue
→
src/containers/
HomePag
e/Home.vue
View file @
a051d5a2
File moved
src/containers/
hom
e/index.vue
→
src/containers/
HomePag
e/index.vue
View file @
a051d5a2
File moved
src/lib/Api.js
View file @
a051d5a2
...
@@ -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
(
...
...
src/router/index.js
View file @
a051d5a2
...
@@ -19,7 +19,7 @@ const constantRouterMap = [
...
@@ -19,7 +19,7 @@ const constantRouterMap = [
icon
:
HomeIcon
,
icon
:
HomeIcon
,
store
:
require
(
'@/containers/Dashboard/store'
).
default
,
store
:
require
(
'@/containers/Dashboard/store'
).
default
,
},
},
component
:
_import
(
'Home/Home'
),
component
:
_import
(
'Home
Page
/Home'
),
},
},
{
{
path
:
'/dashboard'
,
path
:
'/dashboard'
,
...
...
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