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
0bf63802
Commit
0bf63802
authored
Jun 08, 2018
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove hardcoded
parent
233b4fb7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
mock/api.js
mock/api.js
+3
-10
No files found.
mock/api.js
View file @
0bf63802
import
{
parse
}
from
'
url
'
;
const
titles
=
[
const
titles
=
[
'
Alipay
'
,
'
Alipay
'
,
'
Angular
'
,
'
Angular
'
,
...
@@ -69,7 +67,7 @@ export function fakeList(count) {
...
@@ -69,7 +67,7 @@ export function fakeList(count) {
owner
:
user
[
i
%
10
],
owner
:
user
[
i
%
10
],
title
:
titles
[
i
%
8
],
title
:
titles
[
i
%
8
],
avatar
:
avatars
[
i
%
8
],
avatar
:
avatars
[
i
%
8
],
cover
:
parseInt
(
i
/
4
,
10
)
%
2
===
0
?
covers
[
i
%
4
]
:
covers
[
3
-
i
%
4
],
cover
:
parseInt
(
i
/
4
,
10
)
%
2
===
0
?
covers
[
i
%
4
]
:
covers
[
3
-
(
i
%
4
)
],
status
:
[
'
active
'
,
'
exception
'
,
'
normal
'
][
i
%
3
],
status
:
[
'
active
'
,
'
exception
'
,
'
normal
'
][
i
%
3
],
percent
:
Math
.
ceil
(
Math
.
random
()
*
50
)
+
50
,
percent
:
Math
.
ceil
(
Math
.
random
()
*
50
)
+
50
,
logo
:
avatars
[
i
%
8
],
logo
:
avatars
[
i
%
8
],
...
@@ -111,13 +109,8 @@ export function fakeList(count) {
...
@@ -111,13 +109,8 @@ export function fakeList(count) {
let
sourceData
;
let
sourceData
;
export
function
getFakeList
(
req
,
res
,
u
)
{
export
function
getFakeList
(
req
,
res
)
{
let
url
=
u
;
const
params
=
req
.
query
;
if
(
!
url
||
Object
.
prototype
.
toString
.
call
(
url
)
!==
'
[object String]
'
)
{
url
=
req
.
url
;
// eslint-disable-line
}
const
params
=
parse
(
url
,
true
).
query
;
const
count
=
params
.
count
*
1
||
20
;
const
count
=
params
.
count
*
1
||
20
;
...
...
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