Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
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-system
Commits
4837694f
Commit
4837694f
authored
Mar 26, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改创建API方式
parent
136f54c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
Api.js
src/lib/Api.js
+2
-2
main.js
src/lib/main.js
+3
-6
No files found.
src/lib/Api.js
View file @
4837694f
import
axios
from
'axios'
;
import
{
Message
,
MessageBox
}
from
'element-ui'
;
//
import store from '../store';
import
store
from
'../store'
;
import
{
SUCCESS_CODE
}
from
'@/config'
;
import
{
errorHandle
}
from
'@/api/validate'
;
import
{
getYourIP
}
from
'@/utils/getIp.js'
;
...
...
@@ -10,7 +10,7 @@ getYourIP(ipVal => {
ip
=
ipVal
;
});
const
createBaseFetch
=
(
config
,
store
)
=>
{
const
createBaseFetch
=
config
=>
{
// 创建axios实例
const
service
=
axios
.
create
({
timeout
:
10000
,
...
...
src/lib/main.js
View file @
4837694f
...
...
@@ -14,12 +14,9 @@ import storeModule from './storeModule';
import
mixinModule
from
'./mixins'
;
import
utilsModule
from
'./utils'
;
const
fetch
=
createBaseFetch
(
{
timeout
:
10000
,
},
store
);
const
fetch
=
createBaseFetch
({
timeout
:
10000
,
});
class
SystemShell
{
constructor
()
{
...
...
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