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