index.wxml 12.7 KB
Newer Older
李嘉林 committed
1
<!-- 商品列表item -->
2 3 4 5 6 7 8 9 10 11
<!-- {{items.loadState}}--{{items.loadProductImgUrl}}--{{items.productImgUrl}} -->
<!-- <view wx:if="{{items && datas.componentData['style'] == 'list' &&  items.loadState == false}}">
	<view class="skeleton-animate">
    	<view class="skeleton-bg skeleton-img"></view>
        <view class="skeleton-bg skeleton-title"></view>
		<view class="skeleton-bg skeleton-detail"></view>
		<view class="skeleton-bg skeleton-price"></view>
    </view>
</view> -->

李嘉林 committed
12 13 14 15 16
<view
 class="goodsItem {{datas.componentData.style==='rowList'?'goodsRowList':''}} {{datas.componentData.style==='heap'?'goodsRowList goodsHeapItem':''}}"
 style="--proGap2:{{datas.componentData.proGap*2}}rpx;"
 bindtap="onclickProduct"
>
李嘉林 committed
17
	<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
18
		<!-- 商户入口-顶部 -->
李嘉林 committed
19 20 21 22 23
		<view
		 class="merchantsEntrance flex"
		 bindtoMerchants="toMerchants"
		 wx:if="{{datas.componentData['merchantsEntrance'] && datas.componentData['merchantsEntranceType'] == 0 && datas.componentData.style!='heap'}}"
		>
李嘉林 committed
24 25
			<view class="left flex" wx:if="{{items != null}}">
				<view class="logo">
李嘉林 committed
26
					<image mode='widthFix' src="{{items.shopLogoUrl}}" />
李嘉林 committed
27
				</view>
李嘉林 committed
28
				<view class="name">{{items.orgName}}</view>
李嘉林 committed
29 30
			</view>
		</view>
李嘉林 committed
31 32
		<!-- 商品图片 -->
		<view class="imgBox" style="background-color:{{datas.componentData['backgroundColorShow']?datas.componentData['backgroundColor']:''}}">
李嘉林 committed
33
			<view
李嘉林 committed
34 35 36
			 class="goodsPicture"
			 wx:if="{{items!=null}}"
			 style="padding:{{datas.componentData.imgSize}}"
李嘉林 committed
37
			>
HouTiZhuo committed
38 39 40
				 <!-- 秒杀活动 -->
        <block wx:if="{{items && items.secondKillActivityInfoGoodsList}}">
          <view class="secKillBanner" style="border-radius:{{datas.componentData.borderRadius*2}}rpx 0 {{datas.componentData.borderRadius*2}}rpx 0">
HouTiZhuo committed
41 42
						<image class="seckill-image" src="../../../svg/seckill.svg"></image>
            <block wx:if="{{!isBeginSecKill}}">{{ currentSecKillInfo.formatTime || "" }}</block>
HouTiZhuo committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
            <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
60
				<!-- 开启售卖 -->
61
				<view class="saleWay" wx:if="{{items.saleWay==2 && items.getSaleTime>0 && datas.componentData.style!='heap'}}">
李嘉林 committed
62
					<view class="saleWayBg"></view>
李嘉林 committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
					<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
79
					</view>
李嘉林 committed
80

李嘉林 committed
81 82 83 84 85 86 87
				</view>
				<!-- 商品角标 -->
				<view
				 class="angleSign"
				 style="width:{{datas.componentData.angleSignSize}}%;height:{{datas.componentData.angleSignSize}}%;"
				 wx:if="{{datas.componentData['angleSign'] && datas.componentData['angleSignImg']}}"
				>
李嘉林 committed
88
					<image mode="widthFix" src="{{datas.componentData['angleSignImg']}}" />
李嘉林 committed
89 90
				</view>
				<!-- 商品主图 -->
李嘉林 committed
91
				<image
李嘉林 committed
92
				 lazy-load
李嘉林 committed
93 94
				 mode="{{imgFillType}}"
				 class="productImgUrl {{datas.componentData.imgShowMode == 1 && datas.componentData.style === 'waterfall'?'maxHeight':''}}"
95
				 binderror="errorFunction"
李嘉林 committed
96 97 98 99
				 wx:if="{{datas.componentData.goodsImgType == 1}}"
				 src="{{items.productImgUrl}}"
				/>
				<image
李嘉林 committed
100
				 lazy-load
李嘉林 committed
101 102
				 mode="{{imgFillType}}"
				 class="productImgUrl {{datas.componentData.imgShowMode == 1 && datas.componentData.style === 'waterfall'?'maxHeight':''}}"
103
				 binderror="errorFunction"
李嘉林 committed
104 105 106
				 wx:else
				 src="{{items.coverImage}}"
				/>
李嘉林 committed
107 108 109
				<!-- 售罄遮罩 -->
				<view class="whiteBg" wx:if="{{items&&items.oversoldFlag==0&&items.totalQty-0<=0}}">
					<view class="cover">
李嘉林 committed
110
						<image mode="aspectFit" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/f254fe62-6dda-46f6-a2f4-a7b2aa0474df.png" />
李嘉林 committed
111 112 113
					</view>
				</view>
			</view>
李嘉林 committed
114 115 116
		</view>
		<!-- 商品详情 -->
		<view class="info" style="text-align:{{datas.componentData['initcharAlign']}};">
117
			<view class="itemNo" wx:if="{{datas.componentData['itemNo']}}">{{items.productCode}}</view>
李嘉林 committed
118
			<view class="info-top flex">
李嘉林 committed
119
				<view
HouTiZhuo committed
120
				 class="{{datas.componentData.style === 'swipe' ? 'line-clamp1' : 'name'}}"
李嘉林 committed
121
				 wx:if="{{datas.componentData['nameShow']}}"
李嘉林 committed
122
				 style="color:{{datas.componentData['nameColor']}};font-weight:{{datas.componentData['nameFontWeight']}};font-size:{{datas.componentData['nameFontSize']}}em;"
李嘉林 committed
123
				>
李嘉林 committed
124 125
					{{items!=null?items['productName']:'名称'}}
				</view>
李嘉林 committed
126 127 128 129 130
				<view
				 class="follower-wrap"
				 wx:if="{{datas.componentData['followerShow']}}"
				 style="padding-left:{{datas.componentData.columnNum == 3 ? '0' : '20rpx'}}"
				>
李嘉林 committed
131
					<view class="follower-num" style="color:{{datas.componentData['followerColor']?datas.componentData['followerColor']:'#ff9933'}};">
李嘉林 committed
132
						{{items!=null? items['totalCollectionCount']:0}}
李嘉林 committed
133
					</view>
李嘉林 committed
134
					<view class="follower-text">关注人数</view>
李嘉林 committed
135 136
				</view>
			</view>
137 138 139
			<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
140 141 142 143
			<!-- 已售 -->
			<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
144 145
				<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
146
			</view>
李嘉林 committed
147 148
			<!-- 标签 -->
			<view class="marketing flex" wx:if="{{datas.componentData['marketingTag']&&datas.componentData['marketingStyle']==0&&items.marketingTag}}">
李嘉林 committed
149 150 151 152 153 154 155 156
				<view
				 class="item"
				 wx:for="{{items.marketingTag}}"
				 wx:key="index"
				>
					{{item.label}}
				</view>
			</view>
157
			<view class="purchased" wx:if="{{items!= null && items.purchased && datas.componentData['purchased']}}">已加购</view>
李嘉林 committed
158 159 160
			<!-- 底部 -->
			<view class="bottom" wx:if="{{datas.componentData['goodsType'] !=1}}">
				<!-- 价格 -->
HouTiZhuo committed
161
				<view class="priceItem flex" style="flex-wrap:{{items && items.secondKillActivityInfoGoodsList ? 'wrap' : 'nowrap'}};justify-content:{{priceTextStyle}}">
hxx committed
162
					<!-- 砍价展示 -->
hxx committed
163
					<block wx:if="{{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