index.wxml 3.77 KB
Newer Older
李嘉林 committed
1
<!-- 商品列表组件 -->
李嘉林 committed
2
<view class="goodsList" style="padding-top:{{datas.componentData.paddingList[0].value*2}}rpx;padding-bottom:{{datas.componentData.paddingList[1].value*2}}rpx;padding-left:{{datas.componentData.paddingList[2].value*2}}rpx;padding-right:{{datas.componentData.paddingList[3].value*2}}rpx;">
李嘉林 committed
3 4 5 6
	<view class="list-wrap heap-wrap" style="background-color:{{datas.componentData['heapBgColorShow'] ? datas.componentData['heapBgColor'] : ''}};border-radius:{{datas.componentData['cardBorderRadius']*2}}rpx;">
		<!-- 头部 -->
		<view class="tops flex" style="padding:{{(datas.componentData['titleIcon'] || (datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top')) ?'0rpx 0rpx 0rpx 10rpx' : ''}};margin-bottom:{{datas.componentData['titleCardGap']*2}}rpx">
			<view class="left flex">
李嘉林 committed
7 8
				<view class="img" wx:if="{{titleIcon}}">
					<image mode="widthFix" src="{{titleIcon}}" />
李嘉林 committed
9 10 11
				</view>
				<view class="title">{{datas.componentData['titles']}}</view>
			</view>
李嘉林 committed
12 13 14 15 16
			<view
			 class="moreTop"
			 bindtap="viewMore"
			 wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top' && datas.componentData['goodsSource']!='assign'}}"
			>
李嘉林 committed
17 18
				查看更多
				<text class="jt"></text>
李嘉林 committed
19 20
			</view>
		</view>
李嘉林 committed
21
		<!-- 网格布局 -->
李嘉林 committed
22
		<view
李嘉林 committed
23 24 25
		 wx:if="{{datas.componentData.style==='list'}}"
		 class="goodsItem-list flex"
		 style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
李嘉林 committed
26
		>
李嘉林 committed
27
			<view
李嘉林 committed
28
			 wx:for="{{goodsList}}"
李嘉林 committed
29
			 wx:key="index"
李嘉林 committed
30 31 32 33 34
			 class="goods-item"
			 style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
			>
				<goods-item
				 datas="{{datas}}"
李嘉林 committed
35
				 items="{{goodsList[index]}}"
李嘉林 committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
				 indexs="{{index}}"
				></goods-item>
			</view>
		</view>
		<!-- 横向滚动 -->
		<view class="goods-across" wx:elif="{{datas.componentData.style==='across'}}">
			<view class="prev-btn">
				<text class="iconfont-common common-iconyoujiantou"></text>
			</view>
			<view class="next-btn">
				<text class="iconfont-common common-iconyoujiantou"></text>
			</view>
			<view
			 wx:for="{{datas.componentData.goodsList}}"
			 wx:key="index"
			 class="goods-item"
			 style="width:{{100/datas.componentData.columnNum}}%;margin-right:{{datas.componentData.proGap*2}}rpx"
			>
				<goods-item
				 datas="{{datas}}"
				 items="{{datas.componentData.goodsList[index]}}"
				 indexs="{{index}}"
				></goods-item>
			</view>
		</view>
61 62 63 64 65 66 67 68 69
		<!-- 瀑布流 -->
		<view wx:if="{{datas.componentData.style==='waterfall'}}">
			<waterfall-flow
			 generic:defaultCom="goods-item"
			 id="waterfallFlow"
			 note="{{datas.componentData.goodsList}}"
			 datas="{{datas}}"
			 padding="{{datas.componentData.proGap}}"
			 wx:if="{{datas.componentData.goodsList}}"
李嘉林 committed
70 71 72
			 bindonLoad="onLoad"
			 loading="{{loading}}"
			 finished="{{finished}}"
73 74
			></waterfall-flow>
		</view>
李嘉林 committed
75 76 77 78 79 80 81 82 83 84
		<!-- 横向列表 -->
		<view
		 class="goods goods-rowList"
		 wx:elif="{{datas.componentData.style==='rowList'}}"
		 style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
		>
			<view
			 wx:for="{{datas.componentData.goodsList}}"
			 wx:key="index"
			 class="goods-item"
李嘉林 committed
85 86 87 88 89 90 91 92
			 style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
			>
				<goods-item
				 datas="{{datas}}"
				 items="{{datas.componentData.goodsList[index]}}"
				 indexs="{{index}}"
				></goods-item>
			</view>
李嘉林 committed
93
		</view>
94 95 96 97
		<!-- 堆叠卡片 -->
		<view class="goods-heap-Item" wx:if="{{datas.componentData.style==='heap'}}">
			<heap-item datas="{{datas}}"></heap-item>
		</view>
李嘉林 committed
98 99 100 101 102 103 104 105
		<view
		 class="moreBottom"
		 bindtap="viewMore"
		 wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign'}}"
		>
			查看更多
			<text class="jt"></text>
		</view>
李嘉林 committed
106 107 108
	</view>
</view>