|
|
@@ -33,7 +33,8 @@ Page({
|
|
|
"startdate": "",
|
|
|
"enddate": ""
|
|
|
},
|
|
|
- "sort": []
|
|
|
+ "sort": [],
|
|
|
+ total: 0,
|
|
|
},
|
|
|
classShow: false, //type类型
|
|
|
filtratelist: [{
|
|
|
@@ -91,7 +92,6 @@ Page({
|
|
|
url: './add'
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
/* 筛选状态选择 */
|
|
|
selectStatus(e) {
|
|
|
const {
|
|
|
@@ -110,29 +110,23 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
getList(init = false) {
|
|
|
- //init 用于初始化分页
|
|
|
- if (init.detail != undefined) init = init.detail;
|
|
|
- let content = this.data.content;
|
|
|
- if (init) content.pageNumber = 1;
|
|
|
- if (content.pageNumber > content.pageTotal) return;
|
|
|
- _Http.basic({
|
|
|
- "id": 20220901162901,
|
|
|
- content
|
|
|
- }).then(res => {
|
|
|
- console.log("任务列表", res)
|
|
|
- this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
- if (res.msg != '成功') return wx.showToast({
|
|
|
- title: res.data,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- 'content.pageNumber': res.pageNumber + 1,
|
|
|
- 'content.pageTotal': res.pageTotal,
|
|
|
- 'content.total': res.total,
|
|
|
- 'content.sort': res.sort,
|
|
|
- list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
|
|
|
+ _Http.init(this.data.content, init).then(content => {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20220901162901,
|
|
|
+ content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("任务列表", res)
|
|
|
+ this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ content: _Http.paging(content, res),
|
|
|
+ list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
|
|
|
+ })
|
|
|
+ this.getTags();
|
|
|
})
|
|
|
- this.getTags();
|
|
|
})
|
|
|
},
|
|
|
/* 获取列表标签 */
|
|
|
@@ -207,8 +201,5 @@ Page({
|
|
|
this.classClose();
|
|
|
this.getList(true)
|
|
|
},
|
|
|
- onReady() {
|
|
|
- this.selectComponent("#ListBox").setHeight(".total", this);
|
|
|
- },
|
|
|
onShareAppMessage() {}
|
|
|
})
|