Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pro-blocks
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
pro-blocks
Commits
1d8293a6
Commit
1d8293a6
authored
6 years ago
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the address location algorithm of the mock
parent
0bf63802
master
eslint-typescript
greenkeeper/initial
qixian
screenshot
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';
import
{
getProfileAdvancedData
}
from
'
./mock/profile
'
;
import
{
getNotices
}
from
'
./mock/notices
'
;
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
'
;
...
...
This diff is collapsed.
Click to expand it.
mock/geographic
/geographic
.js
→
mock/geographic.js
View file @
1d8293a6
const
fs
=
require
(
'
fs
'
);
function
getJson
(
infoType
)
{
const
json
=
fs
.
readFileSync
(
`
${
__dirname
}
/
${
infoType
}
.json`
,
'
utf8
'
);
return
JSON
.
parse
(
json
)
;
const
json
=
require
(
`
${
__dirname
}
/geographic/
${
infoType
}
.json`
);
// eslint-disable-line
return
json
;
}
export
function
getProvince
(
req
,
res
)
{
...
...
This diff is collapsed.
Click to expand it.
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