chore[litemall-wx, litemall-wx-api]: 专题API调整及文档
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -65,15 +65,15 @@ Page({
|
||||
|
||||
util.request(api.TopicList, {
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
limit: that.data.limit
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
that.setData({
|
||||
scrollTop: 0,
|
||||
topicList: res.data.data,
|
||||
topicList: res.data.list,
|
||||
showPage: true,
|
||||
count: res.data.count
|
||||
count: res.data.total
|
||||
});
|
||||
}
|
||||
wx.hideToast();
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<view class="info">
|
||||
<text class="title">{{item.title}}</text>
|
||||
<text class="desc">{{item.subtitle}}</text>
|
||||
<!-- <text class="price">{{item.price}}元起</text> -->
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="page" wx:if="{{showPage}}">
|
||||
|
||||
@@ -43,7 +43,7 @@ Page({
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
topicList: res.data
|
||||
topicList: res.data.list
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user