Commit ca5d9984 authored by Junling Bu's avatar Junling Bu
Browse files

refactor: 分页的中每页的数量统一采用limit,而不是size

parent 6db1c80d
......@@ -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
......
......@@ -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) {
......
......@@ -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({
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment