<!--pages/productDetail/productDetail.wxml-->
<import src="../../wxParser/index.wxml" />
<view
 class="page-product-detail product-container"
 bindtouchstart="pageTouchStart"
 bindtouchmove="pageMove"
 bindtouchend="pageMoveEnd"
>
	<view>
		<!-- <buy-image-swiper  image-data="{{imageData}}"/>
     -->
		<swiper autoplay="true" style="height: 750rpx;line-height: 100rpx;" bindchange="swiperChange">
			<block wx:for="{{productInfo.listUrls}}" wx:key="index">
				<swiper-item>
					<image class="swiper-image" mode="widthFix" src="{{item}}" />
				</swiper-item>
			</block>
		</swiper>
		<view class="dots">
			<block wx:for="{{productInfo.listUrls}}" wx:key="index">
				<view class="dot{{index == swiperCurrent ? ' active' : ''}}" />
			</block>
		</view>
	</view>

	<view class="product-detail-wrap">
		<view class="product-price">
			<view class="price-wrap">
				<view class="price-icon" wx:if="{{memberLevel}}">会员专享价</view>
				<text class="price">￥{{productInfo.minSalePrice / 100}}</text>
				<!-- <text class="cost-price">￥888</text> -->
			</view>
			<button
			 wx:if="{{!currentHasUserInfo}}"
			 bindgetuserinfo="_getUserInfo"
			 data-jflag="false"
			 open-type='getUserInfo'
			 hover-class="btn-hover"
			>
				<image class="share-img" src="/assets/imgs/share.png" />
				<text class="share-text">分享</text>
			</button>
			<view wx:if="{{currentHasUserInfo}}" class="share-wrap" bindtap="onTapShare">
				<image class="share-img" src="/assets/imgs/share.png" />
				<text class="share-text">分享</text>
			</view>
		</view>
		<view class="product-name">
			{{productInfo.productName}}
		</view>
		<view class="product-desc">
			{{productInfo.productStatusDesc}}
		</view>
		<view class="member-price" wx:if="{{openPlusStatus}}">
			<view class="member-price-info">
				<image class="member-price-icon" src="/assets/imgs/7_1_0/plus.png" />
				<text class="before-reduce-price">￥{{productInfo.plusPrice ? (productInfo.plusPrice / 100) : (productInfo.minSalePrice / 100)
        }}</text>
				<!-- <text class="reduce-price">本次立减￥60</text> -->
			</view>
			<view class="open">
				<text class="open-text">立即开通</text>
				<image class="big-arrow" src="/assets/imgs/big-arrow-right.png" />
			</view>
		</view>
		<view class="choose-wrap" bindtap="addCart">
			{{selectSkuName ? '已选：' + selectSkuName : '请选择规格'}}
			<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right-sku.png" mode="widthFix" />
		</view>
		<!-- <view class="choose-wrap">
    支持快递配送</view> -->
		<view class="surplus">
			剩余：
			<text class="surplus-number">{{productInfo.stock}}</text>
			件
		</view>

	</view>

	<view class="gray-line" />

	<!--<view class="scroll-tips">
		继续拖动，查看图文详情
	</view>-->
	<view class="scroll-tips" wx:if="{{htmlContent == null}}">{{scrollTips}}</view>

	<block wx:if="{{showHtml}}">
		<x-html html="{{productInfo.descHtml}}" />
	</block>

	<view class="product-footer">
		<view class="footer-icons clearfix">
			<form
			 class='get-formId'
			 bindsubmit="nav"
			 report-submit
			 name='home'
			>
				<navigator
				 class='get-formId--btn footer-icon'
				 url="/pages/userCenter/userCenter"
				 formType="submit"
				 open-type="navigate"
				>
					<image src="/assets/imgs/7_1_0/home_un.png" mode="widthFix" />
					<view>首页</view>
				</navigator>
			</form>
			<form
			 class='get-formId'
			 bindsubmit="nav"
			 report-submit
			 name='nav'
			>
				<navigator class='get-formId--btn footer-icon' open-type="navigate" url="/pages/cart/cart">
					<image class="contact-share-img" src="/assets/imgs/7_1_0/cart_un.png" />
					<view class="add-car-text">购物车</view>
				</navigator>
			</form>
			<!-- <form
			 class='get-formId'
			 bindsubmit="nav"
			 report-submit
			 name='home'
			>
				<navigator class="get-formId--btn footer-icon">
					<image src="https://hwimagecdn.ihotwind.cn/hotwind-mini/images/hotnewicon/bottom-kefu.png" mode="widthFix" />
					<view class="tab-text">分享</view>
				</navigator>
			</form> -->
		</view>
		<block>
			<view class="footer-buttons clearfix">
				<block>
					<form
					 class='get-formId get-formId--form'
					 bindsubmit="addCart"
					 report-submit
					 name='nav'
					>
						<button disabled="{{fromZc || productInfo.productStatus != 2}}" class="cart-button get-formId--btn  {{(fromZc || productInfo.productStatus != 2) ? 'btn-default' : 'btn-cart'}}" formType="submit">加入购物车</button>
					</form>
					<form
					 class='get-formId get-formId--form'
					 bindsubmit="goBuy"
					 report-submit
					 name='nav'
					>
						<button disabled="{{productInfo.productStatus != 2}}"  class="buy-button get-formId--btn {{productInfo.productStatus != 2 ? 'btn-default' : 'btn-buy'}}" formType="submit">立即购买</button>
					</form>
				</block>

			</view>
		</block>
	</view>
</view>

<sku-popup
 product-name="{{productInfo.productName}}"
 spec-item="{{productInfo.specItemList}}"
 good-type="{{productInfo.productType}}"
 index-img="{{productInfo.indexUrl}}"
 sku-infos="{{productInfo.productSku}}"
 show="{{showSkuPopup}}"
 bind:skuselect="confirmClick"
 btn-text="{{btnText}}"
 product-stock="{{productInfo.stock}}"
 currentHasUserInfo="{{currentHasUserInfo}}"
 bind:getAuth="_getUserInfo"
/>

<card-modal
 show-card-modal="{{showCardModal}}"
 card-title="{{cardTitle}}"
 card-url="{{cardUrl}}"
 page-path="{{pagePath}}"
/>

<!-- <sku-popup 
 product-sku="{{productInfo.productSku}}"
 
/> -->

<!--goHome-->
<go-home/>

