|
|
@@ -11,8 +11,8 @@ Page({
|
|
|
mainActiveIndex: 0, //分类选择器打开分类的下标
|
|
|
activeId: null, //分类选择器选择id
|
|
|
activeName: null,
|
|
|
- sat_sharematerial_classid1: 0,
|
|
|
- sat_sharematerial_classid2: 0,
|
|
|
+ sat_sharematerial_classid1: '',
|
|
|
+ sat_sharematerial_classid2: '',
|
|
|
items: [], //分类列表
|
|
|
total: 0,
|
|
|
sort: [],
|
|
|
@@ -66,7 +66,7 @@ Page({
|
|
|
if (this.data.content.pageNumber > this.data.content.pageTotal) return;
|
|
|
let content = this.data.content;
|
|
|
content.where.sat_sharematerial_classid1 = this.data.sat_sharematerial_classid1;
|
|
|
- content.where.sat_sharematerial_classid2 = this.data.sat_sharematerial_classid2;
|
|
|
+ content.where.sat_sharematerial_classid2 = this.data.sat_sharematerial_classid2 || '';
|
|
|
if (this.data.sort[0]) content.sort = this.data.sort;
|
|
|
_Http.basic({
|
|
|
"classname": "saletool.sharematerial.sharematerial",
|
|
|
@@ -158,6 +158,14 @@ Page({
|
|
|
if (res.code != '1') return this.selectMenu(index + 1, res);
|
|
|
let str = JSON.stringify(res.data).replace(/classname/g, 'text').replace(/sat_sharematerial_classid/g, 'id'),
|
|
|
items = JSON.parse(str)
|
|
|
+ items.unshift({
|
|
|
+ children: [],
|
|
|
+ createdate: "2024-10-21 09:04:09",
|
|
|
+ id: '',
|
|
|
+ parentid: 0,
|
|
|
+ rowindex: 1,
|
|
|
+ text: "全部"
|
|
|
+ })
|
|
|
this.setData({
|
|
|
items
|
|
|
});
|
|
|
@@ -195,7 +203,6 @@ Page({
|
|
|
});
|
|
|
this.selectComponent('#item').toggle(false);
|
|
|
this.getList(true);
|
|
|
- console.log("onClickItem", detail)
|
|
|
},
|
|
|
onClickNav({
|
|
|
detail = {}
|
|
|
@@ -207,7 +214,7 @@ Page({
|
|
|
if (item.children.length == 0) {
|
|
|
this.setData({
|
|
|
sat_sharematerial_classid1: item.id,
|
|
|
- sat_sharematerial_classid2: 0,
|
|
|
+ sat_sharematerial_classid2: '',
|
|
|
activeId: item.id,
|
|
|
activeName: item.text,
|
|
|
})
|