<!-- 秒杀商品详情 -->
<!-- pages/snapUpDetail/snapUpDetail.wxml -->

<scroll-view scroll-y="{{hideModal}}" bindscroll="onPageScroll" scroll-with-animation="{{true}}" scroll-top='{{scrollTop}}' style="height:100%">
	<view class="top-goods-box">
		<!-- 商品图片 -->
		<view class="goods-img">
			<image src="{{seckilldet.pic}}"></image>
		</view>
		<!-- 倒计时栏 -->
		<view class="countdown-box clearfix">
			<!-- 秒杀 -->
			<text class="second-kill">{{seckilldet.seckill.seckillName}}</text>
			<view class="countdown-content">
				<!-- 秒杀在进行 -->
				<view wx:if="{{countDownList[0].type===1}}">
					<view class="countdown-tips">距结束仅剩</view>
					<view class="countdown-time">
						{{countDownList[0].day}} {{countDownList[0].hou}} {{countDownList[0].min}} {{countDownList[0].sec}}
					</view>
				</view>
				<!-- 秒杀未开始 -->
				<view wx:else>
					<view class="countdown-tips">距开始还有</view>
					<view class="countdown-time">
						{{countDownList[0].day}} {{countDownList[0].hou}} {{countDownList[0].min}} {{countDownList[0].sec}}
					</view>
				</view>
			</view>
		</view>
		<!-- 商品信息 -->
		<view class="goods-msg">
			<!-- 标题 -->
			<view class="goods-title">{{seckilldet.prodName}}</view>
			<!-- 价格 -->
			<!-- 秒杀开始前 -->
			<view class="goods-price">
				<text class="current-price">
        <text class="sub">￥</text> {{wxs.toPrice(seckillPrice)}}
				</text>
				<text class="original-price">￥{{wxs.toPrice(originalPrice)}}</text>
			</view>
			<!-- 运费 -->
			<view class="other-infor clearfix">
				<!-- <text class="freight">运费：免运费</text> -->
				<text class="inventory">剩余：{{seckilldet.seckill.seckillTotalStocks}}</text>
			</view>
		</view>
		<!-- 悬浮按钮 -->
		<view class="suspension-box {{showBacktop?'scroll-top':''}}">
			<!-- 分享 -->
			<button class="suspension-btn btn-type" open-type='share' bindtap='shareProd'>
				<image src="../../images/icon/share-prod.png"></image>
			</button>
			<!-- 回到顶部 -->
			<view class="suspension-btn" bindtap='backToTop' wx:if="{{showBacktop}}">
				<image src="../../images/icon/back-to-top.png"></image>
			</view>
		</view>
		<!-- /悬浮按钮 -->
	</view>
	<!-- 规格 -->
	<view class="choose-color border-radius-box" bindtap="showModal">
		选择：<text wx:for="{{skuGroup}}" wx:for-index="key" wx:for-item="value" wx:key='*this'>{{key}} </text>
		<view class="more-icon">
			<image src="../../images/icon/more.png"></image>
		</view>
	</view>
	<!-- 商品详情 -->
	<view class="prod-detail">
		<rich-text nodes="{{content}}"></rich-text>
	</view>
  <view class="button-placeholder"></view>
	</scroll-view>
	<!-- 【秒杀】立即抢购btn -->
	<view class="buynow" wx:if="{{countDownList[0].type===1}}" bindtap="showModal">
		<view class="buynow-btn">立即抢购</view>
	</view>
	<!-- 【秒杀】零售价购买btn -->
	<view class="buynow" wx:if="{{countDownList[0].type===0}}" bindtap="toProdDetailsPage">
		<view class="buynow-btn retail-price-buy">零售价购买</view>
	</view>
	<!-- 底部弹框 -->
	<view class="modals" hidden="{{hideModal}}">
		<view class="modals-cancel" bindtap="hideModal"></view>
		<view class="bottom-dialog-body bottom-pos border-radius-t-r" animation="{{animationData}}">
			<!-- 上部 -->
			<view class="top-content">
				<view class="top-content-img-box">
					<image src="{{seckilldet.pic}}" />
				</view>
				<!-- 商品信息 -->
				<view class="goods-msg-box">
					<view class="goods-names">{{seckilldet.prodName}}</view>
					<view class="goods-prices" wx-if="{{findSku}}">
						秒杀价：￥
						<text class="rmb-symbol">{{wxs.toPrice(defaultSku.seckillPrice)}}</text>
					</view>
					<view class="goods-prices" wx-if="{{!findSku}}">无货</view>
					<!-- 关闭按钮 -->
				</view>
				<view class="close-btn" bindtap="hideModal">
					<image src="../../images/icon/close.png"></image>
				</view>
			</view>
			<!-- 规格 -->
			<view class="sku-selectbox">
				<block wx:for="{{skuGroup}}" wx:for-index="key" wx:for-item="value" wx:key='*this'>
					<view class="choose-color-box">
						<view class="color-txt">{{key}}</view>
						<view class="color-box">
							<block wx:for="{{value}}" wx:key="*this">
								<text class="color-item  {{wxs.array_contain(selectedProp,item)?'color-item-current':''}} {{['gray','','dashed'][wxs.props_contain2(allProperties,selectedPropObj,key,item,propKeys)]}}" data-ok="{{wxs.props_contain2(allProperties,selectedPropObj,key,item,propKeys)}}"
              bindtap='toChooseItem' data-key="{{key}}" data-val="{{item}}">{{item}}</text>

							</block>
						</view>
					</view>
				</block>
			</view>
			<!-- 数量 -->
			<view class="quantity">
				<view class="left-text">
					<view class="left-text-top">购买数量：</view>
					<view class="left-text-bottom">剩余{{defaultSku.seckillStocks}}件 </view>

				</view>
				<!-- 数量加减 -->
				<view class="right-choose">
					<view class="subtract {{prodNum>1?'current-state':''}}" bindtap='onCountMinus'>–</view>
					<view class="show-num current-state">{{prodNum}}</view>
					<view class="add current-state" bindtap='onCountPlus'>＋</view>
				</view>
			</view>
			<!-- 确认按钮 -->
			<view class="confirm-btn {{findSku?'':'gray'}}" bindtap="seckillconfirm" wx:if="{{countDownList[0].type==1}}">
				<view class="confirm">确认</view>
			</view>
			<view class="confirm-btn" wx:else>
				<view class="confirm gray">秒杀暂未开始</view>
			</view>
		</view>
	</view>

<wxs module="wxs" src="../../wxs/number.wxs" />