index.wxml 13 KB
Newer Older
李嘉林 committed
1
<!-- 商品列表item -->
李嘉林 committed
2 3 4 5 6
<view
 class="goodsItem {{datas.componentData.style==='rowList'?'goodsRowList':''}} {{datas.componentData.style==='heap'?'goodsRowList goodsHeapItem':''}}"
 style="--proGap2:{{datas.componentData.proGap*2}}rpx;"
 bindtap="onclickProduct"
>
李嘉林 committed
7
	<view class="goods-item-child {{datas.componentData['borderColorShow']?'goods-item-child-bd':''}}" style="border-radius:{{datas.componentData.borderRadius*2}}rpx;--border_color:{{datas.componentData['borderColor']}};box-shadow:{{datas.componentData['cardShadow']?'0rpx 0rpx 10rpx '+datas.componentData['cardShadowSize']*2+'rpx #ccc':''}};">
李嘉林 committed
8
		<!-- 商户入口-顶部 -->
李嘉林 committed
9 10 11 12 13
		<view
		 class="merchantsEntrance flex"
		 bindtoMerchants="toMerchants"
		 wx:if="{{datas.componentData['merchantsEntrance'] && datas.componentData['merchantsEntranceType'] == 0 && datas.componentData.style!='heap'}}"
		>
李嘉林 committed
14 15
			<view class="left flex" wx:if="{{items != null}}">
				<view class="logo">
李嘉林 committed
16
					<image mode='widthFix' src="{{items.shopLogoUrl}}" />
李嘉林 committed
17
				</view>
李嘉林 committed
18
				<view class="name">{{items.orgName}}</view>
李嘉林 committed
19 20
			</view>
		</view>
李嘉林 committed
21 22
		<!-- 商品图片 -->
		<view class="imgBox" style="background-color:{{datas.componentData['backgroundColorShow']?datas.componentData['backgroundColor']:''}}">
李嘉林 committed
23
			<view
李嘉林 committed
24 25 26
			 class="goodsPicture"
			 wx:if="{{items!=null}}"
			 style="padding:{{datas.componentData.imgSize}}"
李嘉林 committed
27
			>
HouTiZhuo committed
28
				 <!-- 秒杀活动 -->
hxx committed
29
        <block wx:if="{{items && items.secondKillActivityInfoGoodsList && !(items.cutActivityGoodsList && items.cutActivityGoodsList.length != 0 && items.cutActivityGoodsList[0].status == 2)}}">
HouTiZhuo committed
30
          <view class="secKillBanner" style="border-radius:{{datas.componentData.borderRadius*2}}rpx 0 {{datas.componentData.borderRadius*2}}rpx 0">
HouTiZhuo committed
31 32
						<image class="seckill-image" src="../../../svg/seckill.svg"></image>
            <block wx:if="{{!isBeginSecKill}}">{{ currentSecKillInfo.formatTime || "" }}</block>
HouTiZhuo committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
            <block wx:else>
              <block wx:if="{{!isLessTenHour}}">正在抢购中</block>
              <block wx:else>
                <van-count-down
									use-slot
                  time="{{currentSecKillInfo.restTime}}"
									bind:finish="handleSecFinish"
                  bind:change="onSecRestTimeChange"
                >
									<view style="color: #fff;font-size: 24rpx;">
										距结束还剩 {{secRestTime.hours}}:{{secRestTime.minutes}}:{{secRestTime.seconds}}
									</view>
                </van-count-down>
              </block>
            </block>
          </view>
        </block>
李嘉林 committed
50
				<!-- 开启售卖 -->
51
				<view class="saleWay" wx:if="{{items.saleWay==2 && items.getSaleTime>0 && datas.componentData.style!='heap'}}">
李嘉林 committed
52
					<view class="saleWayBg"></view>
李嘉林 committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
					<view class="saleTime">
						<van-count-down
						 use-slot
						 time="{{items.getSaleTime}}"
						 bind:change="onChange"
						>
							<text>距开售:</text>
							<text class="block">{{ timeData.days }}</text>
							<text class="colon">天</text>
							<text class="block">{{ timeData.hours }}</text>
							<text class="colon">时</text>
							<text class="block">{{ timeData.minutes }}</text>
							<text class="colon">分</text>
							<text class="block">{{ timeData.seconds }}</text>
							<text class="colon">秒</text>
						</van-count-down>
李嘉林 committed
69
					</view>
李嘉林 committed
70

李嘉林 committed
71 72 73 74 75 76 77
				</view>
				<!-- 商品角标 -->
				<view
				 class="angleSign"
				 style="width:{{datas.componentData.angleSignSize}}%;height:{{datas.componentData.angleSignSize}}%;"
				 wx:if="{{datas.componentData['angleSign'] && datas.componentData['angleSignImg']}}"
				>
李嘉林 committed
78
					<image mode="widthFix" src="{{datas.componentData['angleSignImg']}}" />
李嘉林 committed
79 80
				</view>
				<!-- 商品主图 -->
李嘉林 committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
				<view class="contentImg">
					<image
					 lazy-load
					 mode="{{imgFillType}}"
					 class="productImgUrl {{datas.componentData.imgShowMode == 1 && datas.componentData.style === 'waterfall'?'maxHeight':''}}"
					 binderror="errorFunction"
					 wx:if="{{datas.componentData.goodsImgType == 1}}"
					 src="{{items.productImgUrl}}"
					/>
					<image
					 lazy-load
					 mode="{{imgFillType}}"
					 class="productImgUrl {{datas.componentData.imgShowMode == 1 && datas.componentData.style === 'waterfall'?'maxHeight':''}}"
					 binderror="errorFunction"
					 wx:else
					 src="{{items.coverImage}}"
					/>
				</view>
					
李嘉林 committed
100 101 102
				<!-- 售罄遮罩 -->
				<view class="whiteBg" wx:if="{{items&&items.oversoldFlag==0&&items.totalQty-0<=0}}">
					<view class="cover">
李嘉林 committed
103
						<image mode="aspectFit" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/f254fe62-6dda-46f6-a2f4-a7b2aa0474df.png" />
李嘉林 committed
104 105 106
					</view>
				</view>
			</view>
李嘉林 committed
107 108 109
		</view>
		<!-- 商品详情 -->
		<view class="info" style="text-align:{{datas.componentData['initcharAlign']}};">
110
			<view class="itemNo" wx:if="{{datas.componentData['itemNo']}}">{{items.productCode}}</view>
李嘉林 committed
111
			<view class="info-top flex">
李嘉林 committed
112
				<view
HouTiZhuo committed
113
				 class="{{datas.componentData.style === 'swipe' ? 'line-clamp1' : 'name'}}"
李嘉林 committed
114
				 wx:if="{{datas.componentData['nameShow']}}"
李嘉林 committed
115
				 style="color:{{datas.componentData['nameColor']}};font-weight:{{datas.componentData['nameFontWeight']}};font-size:{{datas.componentData['nameFontSize']}}em;"
李嘉林 committed
116
				>
李嘉林 committed
117 118
					{{items!=null?items['productName']:'名称'}}
				</view>
李嘉林 committed
119 120 121 122 123
				<view
				 class="follower-wrap"
				 wx:if="{{datas.componentData['followerShow']}}"
				 style="padding-left:{{datas.componentData.columnNum == 3 ? '0' : '20rpx'}}"
				>
李嘉林 committed
124
					<view class="follower-num" style="color:{{datas.componentData['followerColor']?datas.componentData['followerColor']:'#ff9933'}};">
李嘉林 committed
125
						{{items!=null? items['totalCollectionCount']:0}}
李嘉林 committed
126
					</view>
李嘉林 committed
127
					<view class="follower-text">关注人数</view>
李嘉林 committed
128 129
				</view>
			</view>
130 131 132
			<view class="attributeValueList flex" wx:if="{{items!=null && items.attributeValueList && items.attributeValueList.length>0}}">
				<view class="item" wx:for="{{items.attributeValueList}}" wx:key="index">{{item}}</view>
			</view>
李嘉林 committed
133 134 135 136
			<!-- 已售 -->
			<view class="Sold">
				<text wx:if="{{datas.componentData['alSaleShow']}}">已售{{items!=null ? items['totalSalesCount'] :0}}件</text>
				<text wx:if="{{datas.componentData['alSaleShow'] && datas.componentData['collectShow']}}">/</text>
李嘉林 committed
137 138
				<text wx:if="{{datas.componentData['collectShow']}}">剩余{{items!=null && items['qty']!=undefined ? (items['qty'] > 0 ? items['qty']: items.oversoldFlag==1?'数量充足':'数量不足') : ''}}<text wx:if="{{items!=null && (items['qty'] ? items['qty'] >= 0 : items['saleQty'] >= 0) && items.oversoldFlag!=1}}">件</text>
				</text>
李嘉林 committed
139
			</view>
李嘉林 committed
140 141
			<!-- 标签 -->
			<view class="marketing flex" wx:if="{{datas.componentData['marketingTag']&&datas.componentData['marketingStyle']==0&&items.marketingTag}}">
李嘉林 committed
142 143 144 145 146 147 148 149
				<view
				 class="item"
				 wx:for="{{items.marketingTag}}"
				 wx:key="index"
				>
					{{item.label}}
				</view>
			</view>
150
			<view class="purchased" wx:if="{{items!= null && items.purchased && datas.componentData['purchased']}}">已加购</view>
李嘉林 committed
151 152 153
			<!-- 底部 -->
			<view class="bottom" wx:if="{{datas.componentData['goodsType'] !=1}}">
				<!-- 价格 -->
HouTiZhuo committed
154
				<view class="priceItem flex" style="flex-wrap:{{items && items.secondKillActivityInfoGoodsList ? 'wrap' : 'nowrap'}};justify-content:{{priceTextStyle}}">
李嘉林 committed
155 156 157 158 159 160 161
					<!-- 定金膨胀 -->
					<block wx:if="{{items && items.depositInflationInfoList && items.depositInflationInfoList.length != 0 && items.depositInflationInfoList[0].status == 1}}">
						<view class="flex cut-price__wrapper">
							<view class="cut-price__min" style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;">¥{{ items.depositInflationInfoList[0].goodsInfo[0].depositPrice }}</view>
							<view class="cut-price__tag">火热预定中</view>
						</view>
					</block>
hxx committed
162
					<!-- 砍价展示 -->
李嘉林 committed
163
					<block wx:elif="{{items && items.cutActivityGoodsList && items.cutActivityGoodsList.length != 0 && items.cutActivityGoodsList[0].status == 2}}">
hxx committed
164 165 166 167 168 169
						<view class="flex cut-price__wrapper">
							<view class="cut-price__min" style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;">¥{{ cutPrice }}</view>
							<text style="font-size:24rpx;color:#999;text-decoration:line-through;margin-left:12rpx;">¥{{items.minPrice}}</text>
							<view class="cut-price__tag">砍价享</view>
						</view>
					</block>
HouTiZhuo committed
170
					<!-- 秒杀展示 -->
hxx committed
171
          <block wx:elif="{{items && items.secondKillActivityInfoGoodsList}}">
HouTiZhuo committed
172 173 174 175 176 177 178 179 180 181
            <view class="flex" style="margin: 12rpx 0 6rpx;align-items: center;width: 100%;">
              <view style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;">
                ¥{{ currentSecKillInfo.spikePrice }}
              </view>
              <view class="secKillTag">秒杀价</view>
            </view>
            <view style="color: #999;font-size: 24rpx;margin-bottom: 6rpx;">
              ¥{{ currentSecKillInfo.originPrice }}
            </view>
          </block>
李嘉林 committed
182 183 184
					<view
					 class="price flex"
					 style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;"
HouTiZhuo committed
185
					 wx:elif="{{datas.componentData['priceShow']}}"
李嘉林 committed
186
					>
187 188
						<text>¥{{items!=null ? items['minPrice']:0}}</text>
						<text style="font-size:24rpx;color:#999;text-decoration:line-through;" wx:if="{{items!=null&&datas.componentData['priceMarking']&&items['minGoodsSuggestedRetailPrice']&&(items['minPrice']-0<items['minGoodsSuggestedRetailPrice']-0)&&datas.componentData['columnNum']<3}}">¥{{items['minGoodsSuggestedRetailPrice']}}</text>
李嘉林 committed
189
					</view>
190 191
					<view class="vipPrice2 flex" wx:if="{{datas.componentData.vipPrice}}">
						<view class="left" wx:if="{{items.showVipPrice==true}}">
李嘉林 committed
192
							¥{{items['minPriceAfterRecommendedCardPriceTable']}}
李嘉林 committed
193
						</view>
194
						<view class="vipIcon line-clamp1" wx:if="{{items.showVipTag==true}}">
李嘉林 committed
195 196 197 198 199
							{{items["recommendedCardMinPricePriceTableName"]}}
						</view>
					</view>
				</view>
				<!-- 收益样式一 -->
200 201 202 203 204 205 206
				<block wx:if="{{items!=null&&items['minProductGoodsCommission']&&items['minProductGoodsCommission']-0>0.01}}">
					<view
					 class="showCommission"
					 style="color:{{datas.componentData.commissionColor}};border-color:{{datas.componentData.commissionColor}};"
					 wx:if="{{datas.componentData.commissionStyle==0}}"
					>
						<view class="commission-box" style="background-color:{{datas.componentData.commissionBgColor}}">
李嘉林 committed
207
							<text>收益</text>
李嘉林 committed
208
							<text>¥{{items['minProductGoodsCommission']}}</text>
李嘉林 committed
209 210 211 212 213 214 215 216 217 218 219
						</view>
					</view>
				</block>
				<!-- 立即购买按钮 -->
				<view
				 class="buy-now"
				 style="background-color:#aaa;font-size:24rpx;"
				 wx:if="{{items&&items.oversoldFlag==0&&items.totalQty-0<=0 && datas.componentData['paynow']}}"
				>
					已售罄
				</view>
李嘉林 committed
220
				<view wx:if="{{(items&&items.totalQty-0>0||items&&items.oversoldFlag==1)&& datas.componentData['paynow']}}" catchtap="onclickBuynow">
李嘉林 committed
221
					<text wx:if="{{datas.componentData.btnType<6}}" style="color:{{datas.componentData.btnColor}}" class="buy-now-icon iconfont-common {{datas.componentData.btnIcon}}"></text>
李嘉林 committed
222 223 224 225 226 227 228
					<view
					 wx:else
					 class="buy-now"
					 style="background-color:{{datas.componentData.btnColor}};font-size:24rpx;"
					>
						{{datas.componentData.btnTest}}
					</view>
李嘉林 committed
229
				</view>
李嘉林 committed
230
				<view class="start" wx:if="{{datas.componentData['collectFlag']}}" catchtap="toStart">
李嘉林 committed
231
					<text style="color:{{datas.componentData.btnColor}}" class="buy-now-icon iconfont-common {{items.collectFlag?'common-iconaixin':'common-iconaixin1'}}"></text>
李嘉林 committed
232
			</view>
李嘉林 committed
233 234 235 236 237 238 239 240 241 242 243 244 245 246
			<!-- 底部展示标签列表 -->
			<block wx:if="{{items!=null}}">
				<view class="marketing flex" wx:if="{{datas.componentData.marketingTag&&datas.componentData.marketingStyle==1&&items.marketingTag}}">
					<view
					 class="item"
					 wx:for="{{items.marketingTag}}"
					 wx:key="index"
					>
						{{item.label}}
					</view>
				</view>
			</block>
			<!-- 收益样式二 -->
			<block wx:if="{{items!=null&&items['minProductGoodsCommission']&&items['minProductGoodsCommission']-0>0.01}}">
247 248 249 250 251 252 253 254 255
				<view
				 class="showCommissionTwo flex"
				 wx:if="{{datas.componentData.commissionStyle==1}}"
				 style="color:{{datas.componentData.commissionColor}};border-color:{{datas.componentData.commissionColor}};"
				>
					<view class="commission-box" style="background-color:{{datas.componentData.commissionBgColor}}">
						<text class="iconfont-common common-iconfenxiang"></text>
						<text style="padding:0 8rpx;">赚¥</text>
						<text style="font-size:32rpx;">{{items['minProductGoodsCommission']}}</text>
李嘉林 committed
256 257 258 259 260
					</view>
				</view>
			</block>
		</view>
		<!-- 商户入口二 -->
李嘉林 committed
261 262 263 264 265
		<view
		 class="merchantsEntrance flex"
		 bindtoMerchants="toMerchants"
		 wx:if="{{datas.componentData.merchantsEntrance&&datas.componentData.merchantsEntranceType==1 && datas.componentData.style!='heap'}}"
		>
李嘉林 committed
266 267 268 269 270
			<view class="left flex" wx:if="{{items!=null}}">
				<view class="logo">
					<image mode='widthFix' src="http://test-bucket-ant.oss-cn-shanghai.aliyuncs.com/product/ppefWK8BS6.png?x-oss-process=image/resize,limit_1,w_150,h_150" />
				</view>
				<view class="name">{{items.orgName}}</view>
李嘉林 committed
271 272 273 274
			</view>
		</view>
	</view>
</view>
李嘉林 committed
275
</view>
李嘉林 committed
276