Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
王水玲
2017-01-13 14:44:46 +0800
Commit
1f61518b7a05eccd025e91b0fa60abcaa75553ad
2 parents
e246c683
198be8af
Merge branch 'feature/help' of git.yoho.cn:fe/yohobuy-node into feature/help
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
utils/pager.js
utils/pager.js
View file @
1f61518
...
...
@@ -38,6 +38,11 @@ exports.setPager = (total, params)=>{
let
pages
=
[];
let
currentPage
=
parseInt
(
params
.
page
||
1
,
10
);
// 当前页
// 小于两页直接退出
if
(
total
<
2
)
{
return
resData
;
}
for
(
i
=
currentPage
-
2
;
i
<=
currentPage
+
2
;
i
++
)
{
if
(
i
<
1
)
{
cutStatus
=
1
;
...
...
Please
register
or
login
to post a comment