zhaoxiaohai 2 rokov pred
rodič
commit
d938a960a0

+ 1 - 1
components/Yl_HeadNav/index.wxml

@@ -16,7 +16,7 @@
         <navigator wx:if="{{condition}}" bindtap="endSearch" url="#" class="iconfont icon-quxiao" />
     </view>
     <navigator url="#" class="but" bindtap="onChick1" data-id="sort"><text class="iconfont icon-shengxu"></text>排序</navigator>
-    <navigator url="#" class="but" bindtap="onChick1" data-id="filtrate"><text class="iconfont icon-shaixuan" bindtap="startFiltration"></text>筛选</navigator>
+    <navigator url="#" class="but" bindtap="onChick1" data-id="filtrate"><text class="iconfont icon-shaixuan"></text>筛选</navigator>
 </view>
 
 <van-transition show="{{ startUsing }}" custom-class="block">

+ 36 - 2
packageA/market/index.js

@@ -15,10 +15,45 @@ Page({
 			},
 			sort: []
 		},
+
+		filter: [{
+			label: "标准",
+			index: null,
+			showName: "value", //显示字段
+			valueKey: "name", //返回Key
+			selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+			value: "", //选中值
+			list: []
+		}]
 	},
 	onLoad(options) {
 		this.getBrand()
 		this.getNum();
+		this.getOptionTypeSelect();
+	},
+	/* 获取系统分类 */
+	getOptionTypeSelect() {
+		_Http.basic({
+			"classname": "sysmanage.develop.optiontype.optiontype",
+			"method": "optiontypeselect",
+			"content": {
+				"pageNumber": 1,
+				"pageSize": 999,
+				"typename": "itemstandards",
+				"parameter": {
+					"siteid": wx.getStorageSync('userMsg').siteid
+				}
+			}
+		}, false).then(res => {
+			console.log("系统标准列表", res)
+			if (res.msg == '成功') this.setData({
+				"filter[0].list": res.data
+			})
+		})
+	},
+	/* 处理筛选 */
+	handleFilter({detail}){
+		console.log(detail)
 	},
 	/* 切换分类 */
 	typeChange({
@@ -73,7 +108,7 @@ Page({
 		})
 	},
 	/* 获取产品 */
-	getList(init=false) {
+	getList(init = false) {
 		if (init.detail != undefined) init = init.detail;
 		let content = this.data.content;
 		if (init) content.pageNumber = 1;
@@ -96,7 +131,6 @@ Page({
 			this.setListHeight()
 		})
 	},
-
 	startFiltration() {
 		/* _Http.basic().then(res => {
 			console.log("获取领域", res)

+ 3 - 1
packageA/market/index.wxml

@@ -11,7 +11,9 @@
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
 	<List list="{{list}}" />
 </Yl_ListBox>
+
 <!-- 筛选条件 -->
-<Yl_Filtrate id='Filtrate' bind:handle="handleFilter" />
+<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />
+
 <!-- 购物车按钮 -->
 <Float id="Float" />