|
|
@@ -1,4 +1,5 @@
|
|
|
const content = {
|
|
|
+ ismodule: 0,
|
|
|
pageNumber: 1,
|
|
|
pageTotal: 1
|
|
|
},
|
|
|
@@ -20,76 +21,11 @@ Component({
|
|
|
init() {
|
|
|
content.where = {
|
|
|
condition: "",
|
|
|
- itemclassid: "",
|
|
|
tradefield: ""
|
|
|
}
|
|
|
- // this.getBrand();
|
|
|
- // this.getTradefie();
|
|
|
this.getList(true);
|
|
|
return true;
|
|
|
},
|
|
|
- /* 获取分类 */
|
|
|
- getTypeList() {
|
|
|
- _Http.basic({
|
|
|
- "id": "20220922110403",
|
|
|
- pageSize: 1000,
|
|
|
- content: {
|
|
|
- nocache: true,
|
|
|
- sa_brandid: sa_brandid,
|
|
|
- where: {
|
|
|
- istool: 0,
|
|
|
- ishide: 0
|
|
|
- }
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log("营销类别", res)
|
|
|
- if (res.data.length) {
|
|
|
- res.data[0].ttemclass.unshift({
|
|
|
- itemclassid: "",
|
|
|
- itemclassfullname: "全部",
|
|
|
- itemclassname: "全部",
|
|
|
- subdep: []
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- itemClasss: [res.data[0].ttemclass]
|
|
|
- });
|
|
|
- try {
|
|
|
- this.selectAllComponents('#class0').filter(v => {
|
|
|
- v.setData({
|
|
|
- active: 0
|
|
|
- })
|
|
|
- })
|
|
|
- } catch {}
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- itemClasssChange(e) {
|
|
|
- let detail = e.detail;
|
|
|
- content.where.itemclassid = detail.item.itemclassid;
|
|
|
- let itemClasss = this.data.itemClasss,
|
|
|
- subdep = detail.item.subdep;
|
|
|
- itemClasss = itemClasss.slice(0, detail.rowIndex + 1);
|
|
|
- /* if (subdep.length) {
|
|
|
- subdep.unshift({
|
|
|
- itemclassid: detail.item.itemclassid,
|
|
|
- itemclassfullname: "全部",
|
|
|
- itemclassname: "全部",
|
|
|
- subdep: []
|
|
|
- })
|
|
|
- itemClasss.push(subdep)
|
|
|
- this.selectAllComponents('#class' + (detail.rowIndex - 0 + 1)).filter(v => v.setData({
|
|
|
- active: 0
|
|
|
- }))
|
|
|
- } */
|
|
|
- this.setData({
|
|
|
- itemClasss
|
|
|
- })
|
|
|
- itemClasss.push(subdep)
|
|
|
- this.setData({
|
|
|
- itemClasss
|
|
|
- })
|
|
|
- this.getList(true);
|
|
|
- },
|
|
|
/* 获取产品 */
|
|
|
getList(init = false) {
|
|
|
wx.hideLoading()
|
|
|
@@ -97,7 +33,7 @@ Component({
|
|
|
if (init) content.pageNumber = 1;
|
|
|
if (content.pageNumber > content.pageTotal) return;
|
|
|
content.brandids = [];
|
|
|
- content.ismodule = 0;
|
|
|
+ content.nocache = false
|
|
|
_Http.basic({
|
|
|
"id": 20220926142203,
|
|
|
content
|
|
|
@@ -141,33 +77,6 @@ Component({
|
|
|
'condition': detail
|
|
|
})
|
|
|
},
|
|
|
- /* 获取领域 */
|
|
|
- getTradefie() {
|
|
|
- _Http.basic({
|
|
|
- "id": 20221223141802,
|
|
|
- content: {
|
|
|
- nocache: true,
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 9999,
|
|
|
- where: {
|
|
|
- condition: ""
|
|
|
- }
|
|
|
- }
|
|
|
- }, false).then(res => {
|
|
|
- console.log("获取领域", res)
|
|
|
- if (res.msg == '成功' && res.data.length > 1) {
|
|
|
- res.data.unshift({
|
|
|
- rowindex: 0,
|
|
|
- subvalues: [],
|
|
|
- sys_enterprise_tradefieldid: 0,
|
|
|
- tradefield: "全部"
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- tradefieList: res.data
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
/* 设置页面高度 */
|
|
|
setListHeight() {
|
|
|
this.selectComponent("#ListBox").setHeight(".division", this);
|