Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
1d8293a6
Commit
1d8293a6
authored
Jun 09, 2018
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the address location algorithm of the mock
parent
0bf63802
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
.roadhogrc.mock.js
.roadhogrc.mock.js
+1
-1
mock/geographic.js
mock/geographic.js
+2
-4
No files found.
.roadhogrc.mock.js
View file @
1d8293a6
...
@@ -6,7 +6,7 @@ import { getProfileBasicData } from './mock/profile';
...
@@ -6,7 +6,7 @@ import { getProfileBasicData } from './mock/profile';
import
{
getProfileAdvancedData
}
from
'
./mock/profile
'
;
import
{
getProfileAdvancedData
}
from
'
./mock/profile
'
;
import
{
getNotices
}
from
'
./mock/notices
'
;
import
{
getNotices
}
from
'
./mock/notices
'
;
import
{
format
,
delay
}
from
'
roadhog-api-doc
'
;
import
{
format
,
delay
}
from
'
roadhog-api-doc
'
;
import
{
getProvince
,
getCity
,
getArea
}
from
'
./mock/geographic
/geographic
'
;
import
{
getProvince
,
getCity
}
from
'
./mock
/geographic
'
;
// ζ―ε¦η¦η¨δ»£η
// ζ―ε¦η¦η¨δ»£η
const
noProxy
=
process
.
env
.
NO_PROXY
===
'
true
'
;
const
noProxy
=
process
.
env
.
NO_PROXY
===
'
true
'
;
...
...
mock/geographic
/geographic
.js
→
mock/geographic.js
View file @
1d8293a6
const
fs
=
require
(
'
fs
'
);
function
getJson
(
infoType
)
{
function
getJson
(
infoType
)
{
const
json
=
fs
.
readFileSync
(
`
${
__dirname
}
/
${
infoType
}
.json`
,
'
utf8
'
);
const
json
=
require
(
`
${
__dirname
}
/geographic/
${
infoType
}
.json`
);
// eslint-disable-line
return
JSON
.
parse
(
json
)
;
return
json
;
}
}
export
function
getProvince
(
req
,
res
)
{
export
function
getProvince
(
req
,
res
)
{
...
...
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