|
@@ -40,12 +40,12 @@ Component({
|
|
|
"parentid": 1,
|
|
|
"pageTotal": 1,
|
|
|
"where": {
|
|
|
- "condition": "", //搜索内容
|
|
|
- "sorttype": 2 //1:热门,2:最新,不传默认最新
|
|
|
+ "condition": ""
|
|
|
}
|
|
|
},
|
|
|
list: [], //文件列表
|
|
|
inTotal: 0, //总计
|
|
|
+ sort: [], //排序规则
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -101,10 +101,13 @@ Component({
|
|
|
['content.pageNumber']: 1
|
|
|
})
|
|
|
if (this.data.content.pageNumber > this.data.content.pageTotal) return;
|
|
|
+ let content = this.data.content;
|
|
|
+ if (this.data.sort[0]) content.sort = this.data.sort;
|
|
|
+ console.log(content)
|
|
|
_Http.basic({
|
|
|
"classname": "saletool.salematerial.salematerial",
|
|
|
"method": (this.data.tabActiveTitle == '列表') ? "selectList" : "selectMyList",
|
|
|
- "content": this.data.content
|
|
|
+ content
|
|
|
}).then(res => {
|
|
|
console.log("营销", res)
|
|
|
this.selectComponent('#ListBox').RefreshToComplete();
|
|
@@ -116,7 +119,8 @@ Component({
|
|
|
list: (res.pageNumber == 1) ? MFT.fileList(res.data) : this.data.list.concat(MFT.fileList(res.data)),
|
|
|
['content.pageNumber']: res.pageNumber + 1,
|
|
|
['content.pageTotal']: res.pageTotal,
|
|
|
- inTotal: res.total
|
|
|
+ inTotal: res.total,
|
|
|
+ sort: res.sort
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -149,7 +153,7 @@ Component({
|
|
|
detail
|
|
|
}) {
|
|
|
this.setData({
|
|
|
- ["content.where.sorttype"]: detail == '最新' ? 2 : 1
|
|
|
+ sort: detail
|
|
|
})
|
|
|
this.getList(true);
|
|
|
},
|