chore[litemall-wx, litemall-wx-api]: 专题API调整及文档

This commit is contained in:
Junling Bu
2019-05-07 11:56:20 +08:00
parent bb120ca4fc
commit 1f7f63136b
7 changed files with 261 additions and 22 deletions

View File

@@ -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();

View File

@@ -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}}">

View File

@@ -43,7 +43,7 @@ Page({
}).then(function(res) {
if (res.errno === 0) {
that.setData({
topicList: res.data
topicList: res.data.list
});
}
});