<import src="../../wxParse/wxParse.wxml"/> 

<view class="container">
    <view>
        <swiper class="swiper_box" indicator-dots="{{indicatorDots}}" vertical="{{vertical}}"  circular="true" 
                autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
            <block wx:for="{{showimages}}">
                <swiper-item> 
                    <image src="{{item.img}}"  bindtap="viewimages0" data-index="{{index}}" class="slide-image"/>
                </swiper-item>
            </block>
        </swiper> 
    </view>

    <view class="shopping_container">
        <view class="title">{{title}}</view>
     
        <view class="price" style="margin-bottom: 0; padding-bottom: 0;"> 
            <text class="currentprice">{{oldpricetitle}}<text>￥{{oldprice}}</text></text>
            <text class="currentprice" style="margin-left:5px;">{{currenttitle}}<text>{{currentprice}}</text></text>
        </view> 
       <view class="price" wx:if="{{ttype==12||ttype==14}}"> 
            <text class="currentprice">可用补贴券：<text>{{currentprice0}}</text></text>
        </view>
        <view class="spell_list" wx:if="{{ttype==6}}"> 
            <view class="title"><text>{{spell_list.length}}</text>人在发起拼团，可直接参与</view>
            <swiper class="swiper_box0"  wx:if="{{spell_list.length>0}}" indicator-dots="{{indicatorDots0}}" vertical="{{vertical0}}"
                autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" display-multiple-items="{{spell_list.length==1?1:2}}">
              
                     <swiper-item  wx:for="{{spell_list}}"> 
                        
                        <view class="swiper-item">  
                        <view class="leftbox"> 
                            <image src="{{item.UserPic}}" class="slide-image"/>  
                            <view class="name">{{item.NCName}}</view>
                        </view>
                         <view class="rightbox"> 
                               <view class="spell_num_time">
                                   <view class="spell_num">还差<text>{{item.PCount}}</text>人完成</view>
                                   <view class="spell_time">正在拼团中</view>
                               </view>
                               <view class="button" bindtap="onpd" data-id="{{item.id}}">加入拼团</view>
                        </view> 
                        </view>
                      </swiper-item>
              
             </swiper>
        </view>

        <view class="wxParse">
    <template is="wxParse" data="{{wxParseData:body.nodes}}"/>
</view>
    </view>

   

</view>
<view class="footer">
    <view class="cartmbox">
                    <view class="leftbox">
                        <view class="leftbox_button" bindtap="showserver">
                             <image src="../../images/server.png" />
                             <text>客服</text>
                        </view>
                        <view class="leftbox_button" bindtap="addfavorite" style=" margin-left:1em;width:3em;">
                             <image src="../../images/favorite.png" id="addfavoriteimg" />
                             <text id="addfavorite">{{favorite}}</text>
                        </view>

                        <view class="leftbox_ShoppingCart" style=" margin-left:1em;" bindtap="showcart">
                        <text></text>
  
                        <view class="cartnum" id="cartcount">{{cartcount}}</view>
                        </view> 
                        </view>
                        <view class="rightbox">
                            <view bindtap="addcart" data-id="1" class='input_shopdh' ><view class="price">{{ttype==6?currentprice:""}}</view><view class='{{ttype==6?"":"button_font"}}'>{{(ttype==5)?"立即领取":(ttype==6?(IFPD>0?"加入拼团":"加入拼团"):(ttype==7?"立即申请":(ttype==8?"立即预定":"立即购买")))}}</view></view>
                            <view bindtap="addcart" class="input_shopdh input_shopcart" data-id="0" wx:if="{{ttype==0}}"><view class="price">{{ttype==6?"￥"+oldprice:""}}</view><view class='{{ttype==6?"":"button_font"}}'>{{(ttype==6)?"单独购买":"加入购物车"}}</view></view>
                            <view class='IFPD_Box {{yqpdname=="请点击下方按钮参与体验"?"ifpt0":""}}' wx:if="{{ttype==6&&IFPD>0}}">
                                  <view class='IFPD_Box_msg'>
                                       {{yqpdname}}
                                       <view class="close" bindtap="closeIFPD"><image src="../../images/close.png" /></view>
                                  </view>
                                 
                            </view>
                           
                            </view>
                   </view>
    </view>
    <view class="Hidden_box" hidden="{{serverHidden}}" bindtap="closeserver">
        <view class="Hidden_box_to" catchtap="inserver">
            <view class="close" bindtap="closeserver"><image src="../../images/close.png" /></view>
            <view class="body">
           <template is="wxParse" data="{{wxParseData:servermsg.nodes}}"/>
           </view>
        </view>
    </view>
    <view class="Hidden_box" hidden="{{addcartHidden}}" bindtap="closeaddcart">
        <view class="Hidden_box_to addcart_box" catchtap="inaddcart">
            <view class="close" bindtap="closeaddcart"><image src="../../images/close.png" /></view>
            <view class="select_box_pic" bindtap="viewimages"><image src="{{showimage}}"></image></view> 
<view class="select_box_title">
     <!--<view class="price"><text id="minprice">￥{{minprice}}</text></view>-->
     <view class="selguige">
         <text class="selguige_font">{{selguige_font}}</text>
         <text class="selguige_title">{{selguige_title}}</text>
     </view>
</view>
<view class="select_box_selguige" id="guiges" hidden="{{guigesHidden}}">
     
      <view class="selguige_box" wx:for="{{selguiges}}">
             <view class="selguige_item {{(item.selectednum>0?'hover':'')}}" data-id="{{index}}">
                   <view class="select_name">{{item.gg}}<view>兑换券：{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆：{{item.jg0}}</view>--></view>
                   <view class="select_colors" wx:if='{{item.colors!=""}}' bindtap="showcolor" data-id="{{index}}">
                         <view>{{item.selectedcolor==""?"选择颜色":item.selectedcolor}}</view>
                   </view>
                   <view class="select_box_selnum">
                        <view class="select_box_selnum_box">
                        <view class="num">数量</view> 
                        <view class="addcart_input">
                              <text class="num_del" bindtap="decrement"  data-id="{{index}}"></text>
                              <input name="product_amount" id="product_amount" type="text" class="input_text" bindinput="inputOnlyNum" value="{{item.selectednum}}"  data-id="{{index}}" disabled='' />
                             <text class="num_add" bindtap="increment" data-id="{{index}}"></text>
                         </view>
                        </view>
                         <view class="productkc">库存：{{item.kc}}</view>
                 </view>
               
             </view> 
     </view> 
</view>




<view class="select_box_btn">
      <button bindtap="qyaddcart" value="{{qyaddcart}}" >{{qyaddcart}}</button>
</view>  
        </view>
    </view>

    <view class="Hidden_box" hidden="{{colorHidden}}" bindtap="closecolor">
        <view class="Hidden_box_to" catchtap="incolor">
            <view class="title">点击下面颜色</view>
            <view class="close" bindtap="closecolor"><image src="../../images/close.png" /></view>
            <view class="body">
               
      <view class="select_box_selcolor" wx:for="{{selguiges[currentindex].colors}}">
        <view bindtap="selcolor" class="selguige_item {{selguiges[currentindex].selectedcolor==item.color?'selected':''}}" data-id="{{index}}"><text></text><view class="guigetit">{{item.color}}</view>
        </view>
      </view>
  
           </view>
        </view>
    </view>

    <view class="cartmsg" hidden="{{cartmsgHidden}}">
        <view class="cartmsg_title">商品已经成功加入</view>
        <view class="gotocart" bindtap="gotocart">去付款</view>
        <view class="em"></view><view class="icon" bindtap="closemsg"><image src="../../images/close.png" /></view>
</view>

<view class="Hidden_box" hidden="{{authorizeHidden0}}" bindtap="closeauth0">
        <view class="Hidden_box_to" catchtap="inauth">
            <view class="title">绑定手机号码</view>
            <view class="close" bindtap="closeauth0"><image src="../../images/close.png" /></view>
            <view class="body">
                <view>为了给您提供更好的服务，需要绑定您的手机号码</view>
                <view class="frombody" wx:if="{{!bindPhoneHidden}}">
            <form bindsubmit='bindPhone'>
              
           <view class="sendbutton">
                  <text>手机号码：</text><input name="phone" type="text" bindinput="inputphone" placeholder="填写手机号"  value="{{phone}}" /><button id="getPhoneNumber" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">{{onauthorizetitle0}}</button>
            </view>
            <view class="sendbutton">
                  <text>手机验证码：</text><input name="code" class="code" type="text" placeholder="填写验证码" value="" /> <button bindtap="getcode0">{{getcode0}}</button>
            </view>
             
            <view class="button">
                 <!--<button class="qx" bindtap="closeauth0">暂时不绑定</button>--><button form-type="submit">{{savebutton0}}</button>
                    
            </view>  
      </form>
     </view>
           </view>
        </view>
    </view>
    <view class="Hidden_box" hidden="{{ptgzHidden}}" bindtap="closeptgz">
        <view class="Hidden_box_to" catchtap="inauth">
            <view class="title">{{ptgztitle}}</view>
            <view class="close" bindtap="closeptgz"><image src="../../images/close.png" /></view>
            <view class="body">
                
                <view class="wxParse">
    <template is="wxParse" data="{{wxParseData:ptgzbody.nodes}}"/>
</view>
            <view class="check_box">
                  <view class='checkbox {{checked==1?"checked":""}}' bindtap="onchecked"></view><view class="fontbox"><text bindtap="onchecked">我已阅读并同意</text><text bindtap="openptgz" class="ptgztitle">《{{ptgztitle0}}》</text></view>
            </view>
            <view class="button">
                 <button bindtap="yydptgz">{{ptgzbutton}}</button>
                    
            </view>  
    
     </view>
           </view>
        </view>
        <view class="Hidden_box" hidden="{{ptgzHidden0}}" bindtap="closeptgz0">
        <view class="Hidden_box_to" catchtap="inauth">
            <view class="title">{{ptgztitle0}}</view>
            <view class="close" bindtap="closeptgz0"><image src="../../images/close.png" /></view>
            <view class="body">
                <view class="frmbody">
                <view class="wxParse">
    <template is="wxParse" data="{{wxParseData:ptgzbody0.nodes}}"/>
</view>
              </view>
            <view class="button">
                 <button bindtap="yydptgz0">{{ptgzbutton0}}</button>
                    
            </view>  
    
     </view>
           </view>
        </view>
<loading hidden="{{loadingHidden}}">
        加载中...
    </loading> 