<!-- 展示蒙层 显示推广画报 -->
<view class="poster" wx:if="{{myqr_show}}">
	<view class="title">
		<text>推广文案</text></view>
	<view class="ads">
		<view style="width:480rpx">{{myqr_ads}}</view>
	</view>
	<image src="{{myqr_url}}" mode="widthFix" style="width:480rpx" show-menu-by-longpress="true"></image>
	<view class="tool">
		<view bindtap="posterCopy" style="text-align:right">
			<image class="img" style="width:110rpx;height:130rpx" src="/static/images/share/p_copy.png"></image>
		</view>
		<button open-type='share' class="share-btn">
			<image class="img" style="width: 85rpx;height: 127rpx;" src="/static/images/share/p_wx.png"></image>
		</button>
		<view style="text-align:left">
			<image class="img" bindtap="goSaveQrcode" src="/static/images/share/p_save.png"></image>
		</view>
	</view>
	<view style="text-align:center">
		<image class="closeImg" bindtap="hidePoster" src="/static/images/share/close.png"></image>
	</view>
</view>


<view class="container" style="filter:brightness({{myqr_blur}}%)">
	<image src="/static/images/new/isnew.png" wx:if="{{goods.isNew}}" class="isNew"></image>
	<swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
		<swiper-item wx:for="{{goods.picAddress}}" wx:key="*this">
			<image src="{{item}}" mode="aspectFill"></image>
		</swiper-item>
	</swiper>

	<!-- 分享  
	<view class='goods_name'>
		<view class='goods_name_left'>{{goods.name}}</view>
		<view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle"> 
			<image class="img" src="/static/images/share.png" />
		</view> 
	</view>-->

	<view class="share-pop-box" hidden="{{!openShare}}">
		<view class="share-pop">
			<view class="close" bindtap="closeShare">
				<van-icon class="icon" name="cross" />
			</view>
		
		</view>
	</view>

	<view class="goods-info">
		<view class="c">
			<view>
				<view class='goods_name'>
					<view class='goods_name_left'>{{goods.commodityName}}</view>
				</view>
				<!-- <text class="desc sub-color" wx:if="{{goods.commodityName}}">{{goods.commodityName}}</text>  -->
				<view class="price" >
					<view class="retailPrice">商品编码：<text class="checked-price">{{goods.spuCode}}</text></view>
					<!-- <view class="member-price-tag spread-tag">推广优惠价</view> -->
				</view>  
				<!-- <view class="price" wx:else> 
					<view class="retailPrice">￥<text class="checked-price">{{checkedSpecPrice}}</text><text
							wx:if="{{goods.type=='2'}}"> 起</text></view> -->
				
					<!-- <view class="memberPrice"  wx:if="{{goods.memberPrice!=checkedSpecPrice}}">￥{{goods.memberPrice}}</view> -->
					<!-- <view class="member-price-tag"  wx:if="{{goods.memberPrice!=checkedSpecPrice}}" bindtap="goMemberCenter">会员价</view> -->
				<!-- </view> -->

			</view>

			<!-- 分享商品 -->
			<!-- <view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">
				<image class="img" src="/static/images/share.png" />
			</view> -->
		</view>
	</view>

     <!-- 数量和sku列表 -->
	

		 <view class="sku-list">
			<view class="sku-title">请输入商品数量：</view>
			<view class="spu-number">
			  <view class="minus" bindtap="minusNumber">-</view>
				<input value="{{goosNumber}}" class="goods-number" maxlength="4" type="number" placeholder="" bindinput="bindNumberInput"/>
				<view class="add" bindtap="addNumber" >+</view>
			</view>

		    <view class="sku-title">规格选择：</view>
				<view >
					<label class="radio" wx:for="{{goods.skus}}" wx:key="index">
      
   
		    <view  class="sku-item" bindtap="skuSelect" data-id="{{item.id}}" data-stock="{{item.inHouseCount}}">
             
				     <view>
							<radio 
							color="#09afff" value="{{item.id}}" checked="{{currentSku==item.id?true:false}}" disabled="{{item.inHouseCount<=0}}"/>
						 </view>
				      <view class="sku-center"><text class="sku-name">{{item.propertyValue}}（库存：{{item.inHouseCount}} ）</text></view>
							<view class="sku-price">
						单价：¥<text>{{item.salePrice}}</text>
							</view>
				</view>
			</label>
			</view>
		 </view>




	<!-- <view class="detail">
		<import src="/lib/wxParse/wxParse.wxml" />
		<template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
	</view> -->



	<!-- 大家都在看 -->
	<view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
		<view class="h">
			<view class="line"></view>
			<text class="title">大家都在看</text>
		</view>
		<view class="b">
			<view class="item" wx:for="{{relatedGoods}}" wx:key="id">
				<navigator url="/pages/goods/goods?id={{item.id}}">
					<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
					<text class="name">{{item.name}}（库存：{{item.inHouseCount}} ）</text>
					<text class="price">￥{{item.retailPrice}}</text>
				</navigator>
			</view>
		</view>
	</view>
</view>
<!-- 规格选择界面 -->
<view class="attr-pop-box" hidden="{{!openshow}}">
	<view class="attr-pop">
		<view class="close" bindtap="closeAttr">
			<van-icon class="icon" name="cross" />
		</view>
	</view>
</view>
<!-- 规格选择界面 -->
<view class="attr-pop-box" hidden="{{!openAttr}}">
	<view class="attr-pop">
		<view class="close" bindtap="closeAttr">
			<van-icon class="icon" name="cross" />
		</view>
		<view class="img-info">
			<image class="img" src="{{goods.picUrl}}"></image>
			<view class="info">
				<view class="c">
					<view class="p">价格：￥{{checkedSpecPrice}}</view>
					<view class="a">{{tmpSpecText}}</view>
				</view>
			</view>
		</view>

		<!-- 规格列表 -->
		<view class="spec-con">
			<view class="spec-item" wx:for="{{specificationList}}" wx:key="name">
				<view class="name">{{item.name}}</view>
				<view class="values">
					<view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}"
						wx:for-item="vitem" wx:key="id" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">
						{{vitem.value}}</view>
				</view>
			</view>

			<view class="spec-item" wx:if="{{groupon.length > 0}}">
				<view class="name">团购立减</view>
				<view class="values">
					<view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickGroupon" wx:for="{{groupon}}"
						wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">
						￥{{vitem.discount}} ({{vitem.discountMember}}人)</view>
				</view>
			</view>

			<!-- 数量 -->
			<view class="number-item">
				<view class="name">数量</view>
				<view class="selnum">
					<!-- <view class="cut" bindtap="cutNumber">-</view> -->
					<input value="{{number}}" class="number" disabled="true" type="number" />
					<!-- <view class="add" bindtap="addNumber">+</view> -->
				</view>
			</view>


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

<!-- 联系客服
<view class="contact">
	<contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="36">
	</contact-button>
</view> -->

<!-- 底部按钮 -->
<view class="bottom-btn" style="position:{{myqr_bottom_btn}}">
	<!-- <view class="l l-collect" bindtap="addCollectOrNot" wx:if="{{!isGroupon}}">
		<view class="collect-wrapper">

			<van-icon class="icon" name="star" color="#09afff" wx:if="{{collect}}" size="22px" />
			<van-icon class="icon" size="22px" color="#09afff" name="star-o" wx:else />
			<text class="jz-color collect-text">收藏</text>
		</view>
	</view> -->

	 <view class="l l-kefu">
		<!-- bindtap="goCustomerService" -->
		<view class="service-wrapper" >
			<view class="contact-block">
				<van-icon name="service-o" color="#09afff" size="22px" />
			</view>

			<text class="jz-color">在线客服</text>
		</view>
		<contact-button  class="csr"   type="default-dark" style="opacity: 0;position: absolute;z-index: 99999; width: 100rpx;height: 84rpx;top:0;left:0" session-from="weapp" size="27">
			</contact-button>
	</view>

	<view class="l l-cart" bindtap="openCartPage" >
		<view class="collect-wrapper box">
			<text class="cart-count" wx:if="{{cartGoodsCount>0}}">{{cartGoodsCount}}</text>
			<van-icon class="icon" size="22px" color="#09afff" name="cart-o"  />
			<text class="jz-color collect-text">购物车</text>
		</view>
	</view>
	<view class="c" >
	<view bindtap="addToCart" class="add-cart">加入购物车</view>
	<view bindtap="addFast" class="buy-now" >立即购买</view>
	</view>
	
	<!-- <view class="l l-cart" wx:if="{{!isGroupon}}">
		<view class="box" bindtap="openCartPage">
			<text class="cart-count" wx:if="{{cartGoodsCount>0}}">{{cartGoodsCount}}</text>
			<van-icon   class="icon" name="cart-o" />
			<text class="txt">购物车</text>
		</view>
	</view>
	 <view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view>  -->
<!-- 
	 <view class="r" bindtap="copyToHM">
		<view class="title">复制链接</view>
     <view  class="subtitle">去盒马APP下单</view>
	</view> -->


	 <!-- <view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
	<view class="n" wx:if="{{soldout}}">商品已售空</view> -->



	<!-- 自购&推广 分享进入有shareId不展示自购推广-->
	<!-- (hasLogin&&userInfo.isDis)||(hasLogin&&shareId==0) -->

	
	<!-- <view class="dis-order-wrapper" wx:if="{{hasLogin&&userInfo.isDis&&referee.self>0}}">
		<view class="self-order" bindtap="goSelfPay">
			<view class="buy-type">自购</view>
			<view>立省 {{referee.self}}元</view>
		</view>
		<view class="spread-order" bindtap="goSpread">
			<view class="buy-type jz-color" style="overflow: hidden;">推广</view>
			<view class="jz-color" style="overflow: hidden;">最高返 {{referee.share}}元</view>
		</view>
	</view>
	<block wx:else>
		<view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
		<view class="n" wx:if="{{soldout}}">商品已售空</view>
	</block>  -->



</view>


<!-- 自购提示 -->
<van-overlay show="{{ selfPayShow }}">
	<view class="overlay-wrapper">
		<view class="tips-wrapper">
			<view class="tips-top">
				<view class="tips-title">立省金额说明</view>
				<view>立省金额会以佣金形式发放，请在引荐人中心查收哦</view>
			</view>
			<view class="notip-again">
				<van-checkbox value="{{selfPayChecked}}" shape="square" icon-size="20px" bind:change="onSelfPayChange"
					checked-color="#09afff"></van-checkbox>
				<text class="user-agree">我已知晓，不再提示</text>
			</view>
			<view class="tips-bottom">
				<view class="cancel-btn" bindtap="cancelSelfPay">取消</view>
				<view class="btn-devide"></view>
				<view class="repay-btn" bindtap="reSelfPay">继续购买</view>
			</view>
		</view>
	</view>
</van-overlay>

<!-- 推广提示 -->
<van-overlay show="{{spreadPayShow }}">
	<view class="overlay-wrapper">
		<view class="tips-wrapper">
			<view class="tips-top">
				<view class="tips-title">推广佣金说明</view>
				<view>页面展示推广佣金为预计最高返现金额，实际金额根据购买者团队身份计算，请在引荐人中心查看实际佣金</view>
			</view>
			<view class="notip-again">
				<van-checkbox value="{{spreadPayChecked}}" shape="square" icon-size="20px" bind:change="onSpreadPayChange"
					checked-color="#09afff"></van-checkbox>
				<text class="user-agree">我已知晓，不再提示</text>
			</view>
			<view class="tips-bottom">
				<view class="cancel-btn" bindtap="cancelSpreadPay">取消</view>
				<view class="btn-devide"></view>
				<view class="repay-btn" bindtap="reSpread">继续推广</view>
			</view>
		</view>
	</view>
</van-overlay>