goods.wxml 5.44 KB
<view>
	<view class="head pr">
		<!-- 搜索 -->
		<view class="flex ai-center fs26 bg-white pd20">
			<view class="input-container f1">
				<input class="input" type="text" value="{{inputVal}}" placeholder="请输入商品关键字" bindfocus="inputFocus" bindblur="inputBlur" bindinput="input" confirm-type="search" bindconfirm="search"/>
				<text class="iconfont icon-guanbi" hidden="{{!isInputFocus}}" catchtap="inputClear"></text>
				<!-- 搜索输入框聚焦时显示关闭按钮,否则隐藏关闭按钮 -->
			</view>
			<view class="pd20 filter {{isHiddenDropdown ? '':'c-red'}}" bindtap="clickFilter">筛选</view>
			
			<view class="dropdown {{isHiddenDropdown ? '':'show'}}" hidden="{{isHiddenDropdown}}">
				<view class="dropdown-wrapper">
					<view class="pd20 bsbb">
						<view class="pdb20">国家</view>
						<view class="flex wrap t-c" bindtap="select">
							<view class="w25 pdt20" wx:for="{{nationList}}"><text class="label {{nationIndex == index ? 'selected':''}}" data-id="{{item.nation_id}}" data-name="nation" data-index="{{index}}">{{item.name}}</text></view>
						</view>
					</view>
					<view class="pd20 bsbb" >
						<view class="pdb20">品牌</view>
						<view class="flex wrap t-c" bindtap="select">
							<view class="w25 pdt20" wx:for="{{brandList}}"><text class="label {{brandIndex == index ? 'selected':''}}" data-id="{{item.brand_id}}" data-name="brand" data-index="{{index}}">{{item.name}}</text></view>
						</view>
					</view>
					<view class="pd20 bsbb">
						<view class="pdb20">价格区间</view>
						<view class="flex t-c ai-center jc-center">
							<view class="w30 pdh20"><input type="number" value="{{price}}" placeholder="最低价" class="input-price" bindinput="getPrice" data-ismax="0"/></view>
							<view class="mgh20">-</view>
							<view class="w30 pdh20"><input type="number" value="{{price}}" placeholder="最高价" class="input-price" bindinput="getPrice" data-ismax="1"/></view>
							<!-- <view class="w25 pdt20"><text class="label">品牌一</text></view> -->
						</view>
					</view>
					<!-- <view>
						<view class="pd20 bold">价格</view>
						<view class="flex">
							<view>价格一</view>
							<view>价格二</view>
							<view>价格三</view>
						</view>
					</view> -->
				</view>
				<view class="flex t-c">
					<view class="pd30 f1 bg-f0" bindtap="reset">重置</view>
					<view class="pd30 f1 l-red white" bindtap="startFilter">确定</view>
				</view>
			</view>
			<view class="mask" bindtap="clickMask"></view>
		</view>
		
		
		<view class="flex t-c fs26 bg-white bdb" bindtap="clickTab">
			<block wx:for="{{tabArr}}">
				<view class="f1 pd20 {{currentTabIndex == index ? 'active':''}}" data-index="{{index}}" wx:if="{{index != 3}}">{{item}}</view>
				<view class="f1 pd20 {{currentTabIndex == index ? 'active':''}}" data-index="{{index}}" wx:else  bindtap="clickSort">
					{{item}}<text class="iconfont icon-sort2 c-db" wx:if="{{!isSort}}" data-index="{{index}}"></text>
					<text class="t-icon t-icon-sort-up {{isDescending ? 'reverse':''}}" data-index="{{index}}" wx:else></text>
				</view>
			</block>
			<view class="f1 pd20" catchtap="change">
				<text class="iconfont {{isShowRow ? 'icon-fenxiang':'icon-fenlie'}}"></text>
			</view>
		</view>
		
	</view>
	
	
	<view class="content">
		<checkbox-group class="fs26" wx:if="{{isShowRow}}" bindchange="checkboxChange">
			<view class="item bg-white flex ai-center pd20" wx:for="{{list.pageData}}">
				<!-- <label>
					
				</label> -->
				<checkbox value="{{item.goods_id}}" checked="{{item.checked}}"/>
				<view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
					<view class="pdr20"><image class="img" src="{{imghost + item.original_img}}" lazy-load/></view>
					<view class="flex fdc jc_sb">
						<view class="ellipsis-2">{{item.goods_name}}</view>
						<view>
							<view class="money fs32 c-red">1.00</view>
							<view class="fs24 c-a">分成金额:<text class="money c-red">{{item.commission}}</text></view>
						</view>
					</view>
				</view>
			</view>			
		</checkbox-group>
		
		<checkbox-group class="fs26 flex pd20 wrap"  catchchange="checkboxChange" wx:else>
			<view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
				<image class="img2" src="{{imghost + item.original_img}}" mode="aspectFit" lazy-load/>
				<view class="pd20 fs26 flex jc_sb fdc f1">
					<view class="ellipsis-2">{{item.goods_name}}</view>
					<view class="flex ai-center jc_sb pdt20">
						<checkbox value="{{item.goods_id}}" checked="{{item.checked}}" data-name="checkbox"/>
						<view class="t-r">
							<view class="money c-red fs32">1.00</view>
							<view class="c-a">分成金额:<text class="money c-red">{{item.commission}}</text></view>
						</view>
					</view>
				</view>
			</view>
		</checkbox-group>
		
		<nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata>
		<view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 已经到底了 -</view>
	</view>
	

	
	
	
	<view class="bottomBar flex pd20 jc_sb fs26 ai-center">
		<!-- <view> -->
			<label class="flex ai-center" bindtap="clickCheckAll">
				<checkbox checked="{{isCheckAll}}"/>全选
			</label>
		<!-- </view> -->
		<view class="pd20 btn" wx:if="{{options.index == 0}}" bindtap="putOn">一键上架</view>
		<view class="pd20 btn" wx:else bindtap="pullOff">一键下架</view>
	</view>
	
	

</view>