Commit 90a63d27febfb53c9a6112cb02e511a1f81a95e1

Authored by vking
1 parent 0839cfff

taocan

... ... @@ -11,7 +11,10 @@ Page({
* 页面的初始数据
*/
data: {
list: [[],[],[],[],[]],
list: [
[],[],[],[],[],
[],[],[],[]
],
total: 0,
tabType:1,
hasMore:true,
... ... @@ -85,9 +88,10 @@ Page({
offset:this.offset,
limit:this.limit,
}).then(res => {
let total = res.data.length
let data = this.formatList(res.data);
this.hasMore=res.data.length>=this.limit
let resData=res.data||[]
let total = resData.length
let data = this.formatList(resData);
this.hasMore=resData.length>=this.limit
if(this.hasMore){
this.offset+=this.limit
}
... ... @@ -113,8 +117,9 @@ Page({
return dlist;
},
switchTab(e) {
this.tabType=util.attr(e, 'index')
this.setData({
tabFlag: util.attr(e, 'index'),
tabType: this.tabType,
})
this.getListData();
},
... ... @@ -153,7 +158,7 @@ Page({
this.tabType=util.attr(e,'type')
this.setData({
tabType:this.tabType,
list: [[],[],[],[],[]],
list: [[],[],[],[],[],[],[],[],[]],
hasMore:false
})
this.getListData()
... ...
... ... @@ -25,13 +25,24 @@
</view>
</block>
<block wx:else="">
<block wx:for="{{list[tabType]}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
<navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<block wx:if="{{tabType<5}}">
<navigator wx:for="{{list[tabType]}}" wx:key="success.key"
wx:for-item="detail" wx:for-index="dateIndex"
url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<card
hasShowStatus bindevent="gotoDetail"
seller="{{detail.seller}}" detail="{{detail}}"></card>
</navigator>
</block>
<block wx:else="">
<navigator wx:for="{{list[tabType]}}" wx:key="success.key"
wx:for-item="detail" wx:for-index="dateIndex"
url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<card
hasShowStatus bindevent="gotoDetail"
seller="{{detail.seller}}" detail="{{detail}}"></card>
</navigator>
</block>
<view class="view" style="height: 192rpx;"></view>
</block>
</view>
\ No newline at end of file
... ...