index.wxml 5.52 KB
Newer Older
李嘉林 committed
1 2 3 4 5 6
<!-- 限时活动 -->
<view class="time-limited-discount" 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;--backgroundColor:{{datas.componentData.backgroundColor}}">
	<!-- 标题 -->
	<view class="tops {{datas.componentData['countDownShow']?'hideCountDown':''}}">
		<view class="topInfo">
			<view class="title">
李嘉林 committed
7
				{{datas.componentData.dimension ==0?selectActivityValue:datas.componentData.actTitle}}
李嘉林 committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
			</view>
			<view class="subheading" wx:if="{{datas.componentData['countDownShow']&&datas.componentData.dimension==0}}">
				<view wx:if="{{datas.componentData['endTime']&&endTime>0}}">
					<van-count-down
					 use-slot
					 time="{{endTime}}"
					 class="countDown"
					 bind:change="onChange"
					>
						<text class="endTime days">{{ timeData.days }}</text>
						<text class="endTimedot">天</text>
						<text class="endTime hours">{{ timeData.hours }}</text>
						<text class="endTimedot">:</text>
						<text class="endTime minute">{{ timeData.minutes }}</text>
						<text class="endTimedot">:</text>
						<text class="endTime second">{{ timeData.seconds }}</text>
					</van-count-down>
				</view>
				<view class="countDown" wx:elif="{{isLoading}}">
					活动已结束
				</view>
			</view>
		</view>
	</view>
	<!-- 内容 -->
	<!-- 网格模式 -->
	<view class="goods" wx:if="{{datas.componentData.style==='list'}}">
		<view class="goodsList">
			<view
			 class="goodsItem {{datas.componentData.columnNum==2?'style2':'style3'}}"
			 wx:for="{{datas.componentData.goodsList}}"
			 wx:key="index"
			 style="width:{{100/datas.componentData.columnNum}}%"
			>
				<view class="goods-item-child {{datas.componentData.columnNum==1?'goods-item-child-flex':''}}">
					<view class="imgBox slidebox1">
						<view
						 class="goodsPicture"
						 bindtap="onclickProduct"
李嘉林 committed
47
						 data-items="{{goodsList[index]}}"
李嘉林 committed
48 49
						 style="padding:{{datas.componentData.imgSize}}"
						>
李嘉林 committed
50 51
							<image mode="widthFix" src="{{goodsList[index]['productImgUrl1']}}"></image>
							<view class="whiteBg" wx:if="{{goodsList[index].oversoldFlag==0&&datas.componentData.goodsList[index].saleQty-0<=0}}">
李嘉林 committed
52 53 54 55 56 57 58 59 60
								<view class="cover">
									<text>商品</text>
									<text>售罄</text>
								</view>
							</view>
						</view>
					</view>
					<view class="info">
						<view class="name">
李嘉林 committed
61
							{{goodsList[index]!=null?goodsList[index]['productName']:'名称'}}
李嘉林 committed
62 63 64 65 66 67
						</view>
						<view class="allPrice">
							<view>
								<!-- <text class="price" wx:if="{{((hours-0)+(minute-0)+(second-0))!=0}}">¥{{datas.componentData.goodsList[index]!=null?datas.componentData.goodsList[index]['minPrice']:0}}</text>
								<text class="price" wx:else>¥{{datas.componentData.goodsList[index]!=null?datas.componentData.goodsList[index]['minPrice']:0}}</text>
								<text class="delPrice" wx:if="{{((hours-0)+(minute-0)+(second-0))!=0}}">¥{{datas.componentData.goodsList[index]!=null?datas.componentData.goodsList[index]['maxPrice']:0}}</text> -->
李嘉林 committed
68 69
								<view class="price">¥{{goodsList[index]!=null?goodsList[index]['minPrice']:0}}</view>
								<view class="delPrice">¥{{goodsList[index]!=null?goodsList[index]['maxPrice']:0}}</view>
李嘉林 committed
70 71 72
							</view>
							<view
							 class="btn"
73
							 style="background:{{mainColor}};"
李嘉林 committed
74
							 data-items="{{goodsList[index]}}"
李嘉林 committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88
							 catchtap="onclickOrder"
							>
								立即抢购
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
	<!-- 横向滑动 -->
	<view class="goods1" wx:elif="{{datas.componentData.style==='across'}}">
		<view
		 class="goods-item"
李嘉林 committed
89
		 wx:for="{{goodsList}}"
李嘉林 committed
90 91 92 93 94 95
		 wx:key="index"
		>
			<view class="items">
				<view class="imgBox slidebox2">
					<view
					 class="goodsPicture"
李嘉林 committed
96
					 wx:if="{{goodsList[index]!=null}}"
李嘉林 committed
97
					 style="padding:{{datas.componentData.imgSize}}"
李嘉林 committed
98
					 data-items="{{goodsList[index]}}"
李嘉林 committed
99 100
					 bindtap="onclickProduct"
					>
李嘉林 committed
101 102
						<image mode="widthFix" src="{{goodsList[index]['productImgUrl']}}"></image>
						<view class="whiteBg" wx:if="{{goodsList[index].oversoldFlag==0&&goodsList[index].saleQty-0<=0}}">
李嘉林 committed
103 104 105 106 107 108 109 110 111 112 113
							<view class="cover">
								<text>商品</text>
								<text>售罄</text>
							</view>
						</view>
					</view>
				</view>
				<view class="info">
					<!-- <text class="price" wx:if="{{((hours-0)+(minute-0)+(second-0))!=0}}">¥{{datas.componentData.goodsList[index]!=null?datas.componentData.goodsList[index]['minPrice']:0}}</text>
					<text class="price" wx:else>¥{{datas.componentData.goodsList[index]!=null?datas.componentData.goodsList[index]['minPrice']:0}}</text>
					<text class="delPrice" wx:if="{{((hours-0)+(minute-0)+(second-0))!=0}}">¥{{datas.componentData.goodsList[index]!=null?datas.componentData.goodsList[index]['maxPrice']:0}}</text> -->
李嘉林 committed
114 115
					<view class="price">¥{{goodsList[index]!=null?goodsList[index]['minPrice']:0}}</view>
					<view class="delPrice">¥{{goodsList[index]!=null?goodsList[index]['maxPrice']:0}}</view>
李嘉林 committed
116 117 118 119 120
				</view>
			</view>
		</view>
	</view>
	<!-- 活动列表 -->
李嘉林 committed
121
	<activity-list-item
李嘉林 committed
122
	 wx:if="{{datas.componentData.dimension == 1 && !isLoading}}"
李嘉林 committed
123 124 125 126 127 128
	 wx:for="{{datas.componentData.actList}}"
	 wx:key="index"
	 datas="{{item}}"
	 num="{{index}}"
	 countDownShow="{{datas.componentData['countDownShow']}}"
	></activity-list-item>
李嘉林 committed
129 130 131 132 133 134 135 136 137
	<view wx:if="{{isLoading}}">
		<skeleton-block
		 loading="{{isLoading}}"
		 type="{{'row'}}"
		 height="60"
		 row="1"
		 col="1"
		></skeleton-block>
	</view>
李嘉林 committed
138 139
</view>