Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
ca5d9984
Commit
ca5d9984
authored
Apr 17, 2019
by
Junling Bu
Browse files
refactor: 分页的中每页的数量统一采用limit,而不是size
parent
6db1c80d
Changes
24
Show whitespace changes
Inline
Side-by-side
litemall-wx/pages/search/search.js
View file @
ca5d9984
...
...
@@ -17,7 +17,7 @@ Page({
defaultKeyword
:
{},
hotKeyword
:
[],
page
:
1
,
size
:
20
,
limit
:
20
,
categoryId
:
0
},
//事件处理函数
...
...
@@ -95,7 +95,7 @@ Page({
util
.
request
(
api
.
GoodsList
,
{
keyword
:
that
.
data
.
keyword
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
,
limit
:
that
.
data
.
limit
,
sort
:
that
.
data
.
currentSort
,
order
:
that
.
data
.
currentSortOrder
,
categoryId
:
that
.
data
.
categoryId
...
...
litemall-wx/pages/topic/topic.js
View file @
ca5d9984
...
...
@@ -5,7 +5,7 @@ Page({
data
:
{
topicList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
count
:
0
,
scrollTop
:
0
,
showPage
:
false
...
...
@@ -28,7 +28,7 @@ Page({
},
nextPage
:
function
(
event
)
{
var
that
=
this
;
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
size
)
{
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
limit
)
{
return
true
;
}
...
...
@@ -57,7 +57,7 @@ Page({
util
.
request
(
api
.
TopicList
,
{
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
...
...
renard-wx/pages/category/category.js
View file @
ca5d9984
...
...
@@ -11,7 +11,7 @@ Page({
scrollTop
:
0
,
scrollHeight
:
0
,
page
:
1
,
size
:
100
limit
:
100
},
onLoad
:
function
(
options
)
{
...
...
@@ -103,7 +103,7 @@ Page({
util
.
request
(
api
.
GoodsList
,
{
categoryId
:
that
.
data
.
currentCategory
.
id
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
})
.
then
(
function
(
res
)
{
that
.
setData
({
...
...
renard-wx/pages/hotGoods/hotGoods.js
View file @
ca5d9984
...
...
@@ -16,7 +16,7 @@ Page({
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
,
page
:
1
,
size
:
100
limit
:
100
},
getCategoryList
:
function
()
{
var
that
=
this
;
...
...
@@ -38,7 +38,7 @@ Page({
util
.
request
(
api
.
GoodsList
,
{
isHot
:
true
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
,
limit
:
that
.
data
.
size
,
order
:
that
.
data
.
currentSortOrder
,
sort
:
that
.
data
.
currentSort
,
categoryId
:
that
.
data
.
categoryId
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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