|
@@ -1,11 +1,4 @@
|
|
|
-const content = {
|
|
|
|
|
- ismodule: 0,
|
|
|
|
|
- pageNumber: 1,
|
|
|
|
|
- pageTotal: 1
|
|
|
|
|
- },
|
|
|
|
|
- _Http = getApp().globalData.http;
|
|
|
|
|
-let sa_brandid = 0,
|
|
|
|
|
- downCount = null;
|
|
|
|
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
Component({
|
|
Component({
|
|
|
options: {
|
|
options: {
|
|
|
addGlobalClass: true
|
|
addGlobalClass: true
|
|
@@ -15,14 +8,21 @@ Component({
|
|
|
typeList: [],
|
|
typeList: [],
|
|
|
list: [],
|
|
list: [],
|
|
|
filtratelist: [],
|
|
filtratelist: [],
|
|
|
- popupShow: false
|
|
|
|
|
|
|
+ popupShow: false,
|
|
|
|
|
+ content: {
|
|
|
|
|
+ ismodule: 0,
|
|
|
|
|
+ pageNumber: 1,
|
|
|
|
|
+ pageTotal: 1
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
init() {
|
|
init() {
|
|
|
- content.where = {
|
|
|
|
|
- condition: "",
|
|
|
|
|
- tradefield: ""
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ "content.where": {
|
|
|
|
|
+ condition: "",
|
|
|
|
|
+ tradefield: ""
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
this.getList(true);
|
|
this.getList(true);
|
|
|
return true;
|
|
return true;
|
|
|
},
|
|
},
|
|
@@ -30,6 +30,7 @@ Component({
|
|
|
getList(init = false) {
|
|
getList(init = false) {
|
|
|
wx.hideLoading()
|
|
wx.hideLoading()
|
|
|
if (init.detail != undefined) init = init.detail;
|
|
if (init.detail != undefined) init = init.detail;
|
|
|
|
|
+ let content = this.data.content;
|
|
|
if (init) content.pageNumber = 1;
|
|
if (init) content.pageNumber = 1;
|
|
|
if (content.pageNumber > content.pageTotal) return;
|
|
if (content.pageNumber > content.pageTotal) return;
|
|
|
content.brandids = [];
|
|
content.brandids = [];
|
|
@@ -51,7 +52,8 @@ Component({
|
|
|
content.pageNumber = res.pageNumber + 1;
|
|
content.pageNumber = res.pageNumber + 1;
|
|
|
content.pageTotal = res.pageTotal;
|
|
content.pageTotal = res.pageTotal;
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
|
|
|
|
|
|
|
+ list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
|
|
|
|
|
+ content
|
|
|
})
|
|
})
|
|
|
this.setListHeight()
|
|
this.setListHeight()
|
|
|
})
|
|
})
|
|
@@ -60,47 +62,34 @@ Component({
|
|
|
onSearch({
|
|
onSearch({
|
|
|
detail
|
|
detail
|
|
|
}) {
|
|
}) {
|
|
|
- content.where.condition = detail;
|
|
|
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
|
title: '搜索中...',
|
|
title: '搜索中...',
|
|
|
})
|
|
})
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- 'condition': detail
|
|
|
|
|
|
|
+ 'condition': detail,
|
|
|
|
|
+ "content.where.condition": detail
|
|
|
})
|
|
})
|
|
|
this.getList(true)
|
|
this.getList(true)
|
|
|
},
|
|
},
|
|
|
onChange({
|
|
onChange({
|
|
|
detail
|
|
detail
|
|
|
}) {
|
|
}) {
|
|
|
- content.where.condition = detail
|
|
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- 'condition': detail
|
|
|
|
|
|
|
+ 'condition': detail,
|
|
|
|
|
+ "content.where.condition": detail
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- /* 设置页面高度 */
|
|
|
|
|
- setListHeight() {
|
|
|
|
|
- this.selectComponent("#ListBox").setHeight(".division", this);
|
|
|
|
|
- },
|
|
|
|
|
- tradefieChange({
|
|
|
|
|
|
|
+ changeModule({
|
|
|
detail
|
|
detail
|
|
|
}) {
|
|
}) {
|
|
|
- content.where.tradefield = detail.item.tradefield == '全部' ? '' : detail.item.tradefield
|
|
|
|
|
- this.getList(true);
|
|
|
|
|
- this.selectAllComponents('#tradefieList').filter(v => {
|
|
|
|
|
- v.setData({
|
|
|
|
|
- active: detail.index
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- openPopup() {
|
|
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- popupShow: true
|
|
|
|
|
|
|
+ "content.ismodule": detail
|
|
|
})
|
|
})
|
|
|
|
|
+ this.getList(true)
|
|
|
},
|
|
},
|
|
|
- onClose() {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- popupShow: false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ /* 设置页面高度 */
|
|
|
|
|
+ setListHeight() {
|
|
|
|
|
+ this.selectComponent("#ListBox").setHeight(".division", this);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|