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

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

parent 6db1c80d
...@@ -17,7 +17,7 @@ Page({ ...@@ -17,7 +17,7 @@ Page({
defaultKeyword: {}, defaultKeyword: {},
hotKeyword: [], hotKeyword: [],
page: 1, page: 1,
size: 20, limit: 20,
categoryId: 0 categoryId: 0
}, },
//事件处理函数 //事件处理函数
...@@ -95,7 +95,7 @@ Page({ ...@@ -95,7 +95,7 @@ Page({
util.request(api.GoodsList, { util.request(api.GoodsList, {
keyword: that.data.keyword, keyword: that.data.keyword,
page: that.data.page, page: that.data.page,
size: that.data.size, limit: that.data.limit,
sort: that.data.currentSort, sort: that.data.currentSort,
order: that.data.currentSortOrder, order: that.data.currentSortOrder,
categoryId: that.data.categoryId categoryId: that.data.categoryId
......
...@@ -5,7 +5,7 @@ Page({ ...@@ -5,7 +5,7 @@ Page({
data: { data: {
topicList: [], topicList: [],
page: 1, page: 1,
size: 10, limit: 10,
count: 0, count: 0,
scrollTop: 0, scrollTop: 0,
showPage: false showPage: false
...@@ -28,7 +28,7 @@ Page({ ...@@ -28,7 +28,7 @@ Page({
}, },
nextPage: function(event) { nextPage: function(event) {
var that = this; 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; return true;
} }
...@@ -57,7 +57,7 @@ Page({ ...@@ -57,7 +57,7 @@ Page({
util.request(api.TopicList, { util.request(api.TopicList, {
page: that.data.page, page: that.data.page,
size: that.data.size limit: that.data.limit
}).then(function(res) { }).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
......
...@@ -11,7 +11,7 @@ Page({ ...@@ -11,7 +11,7 @@ Page({
scrollTop: 0, scrollTop: 0,
scrollHeight: 0, scrollHeight: 0,
page: 1, page: 1,
size: 100 limit: 100
}, },
onLoad: function(options) { onLoad: function(options) {
...@@ -103,7 +103,7 @@ Page({ ...@@ -103,7 +103,7 @@ Page({
util.request(api.GoodsList, { util.request(api.GoodsList, {
categoryId: that.data.currentCategory.id, categoryId: that.data.currentCategory.id,
page: that.data.page, page: that.data.page,
size: that.data.size limit: that.data.limit
}) })
.then(function(res) { .then(function(res) {
that.setData({ that.setData({
......
...@@ -16,7 +16,7 @@ Page({ ...@@ -16,7 +16,7 @@ Page({
currentSort: 'add_time', currentSort: 'add_time',
currentSortOrder: 'desc', currentSortOrder: 'desc',
page: 1, page: 1,
size: 100 limit: 100
}, },
getCategoryList: function() { getCategoryList: function() {
var that = this; var that = this;
...@@ -38,7 +38,7 @@ Page({ ...@@ -38,7 +38,7 @@ Page({
util.request(api.GoodsList, { util.request(api.GoodsList, {
isHot: true, isHot: true,
page: that.data.page, page: that.data.page,
size: that.data.size, limit: that.data.size,
order: that.data.currentSortOrder, order: that.data.currentSortOrder,
sort: that.data.currentSort, sort: that.data.currentSort,
categoryId: that.data.categoryId 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