<!-- 拼团详情 -->
<!-- pages/SpellGroupDetails/spellGroupDetails.wxml -->
<view class="top-box">
  <view class="top-bg"></view>
  <!-- 商品内容盒子 -->
  <view class="goods-content">
    <view class="goods-img-box">
      <image src="{{groupTempInfo.groupProd.prodPic}}" class="goods-img" />
    </view>
    <!-- 商品信息信息 -->
    <view class="goods-msg">
      <text class="goods-title">{{groupTempInfo.groupProd.prodName}}</text>
      <!-- 商品规格 -->
      <!-- <view class="goods-sku">{{groupTempInfo.groupProd.skuName}}</view> -->
      <!-- 价格 -->
      <view class="goods-price">
        <text class="spell-group-price">￥{{groupTempInfo.groupProd.actPrice}}</text>
        <text class="original-price">￥{{groupTempInfo.groupProd.price}}</text>
      </view>
    </view>
  </view>
  <!-- 商品内容盒子 end -->
  <!-- 规则 -->
  <view class="tips-text clearfix">
    <image src="../../images/icon/thumb.png" class="thumb-icon" />
    <text class="tips-text-cnt">拼团规则：邀请 {{joinNum}} 人参团，人数不足自动退款</text>
    <!-- <image src="../../images/icon/more.png" class="right-arrow-icon" /> -->
  </view>
</view>
<!-- 下 -->
<view class="condition">
  <!-- 剩余时间 -->
  <view class="time-remaining">
    <text class="line"></text>
    <text class="round"></text>
    <text wx:if="{{groupTempInfo.groupTeam.status == 1}}" class="time-text">拼团剩余时间</text>
    <text wx:if="{{groupTempInfo.groupTeam.status == 2}}" class="time-text">拼团成功</text>
    <text wx:if="{{groupTempInfo.groupTeam.status == 3}}" class="time-text">拼团失败</text>
    <text class="round"></text>
    <text class="line"></text>
  </view>
  <view wx:if="{{groupTempInfo.groupTeam.status == 1}}" class="countdown">
    <text class="time-number">{{countDownObj.hou}}</text> ：
    <text class="time-number">{{countDownObj.min}}</text> ：
    <text class="time-number">{{countDownObj.sec}}</text>
  </view>

  <!-- 人员 -->
  <view class="member" >
    <block wx:for="{{groupUserList}}" wx:key='userId' wx:for-item="groupUser">
      <view wx:if="{{groupUser.identityType == 1}}" class="captain">
        <image class="captain-img" src="{{groupUser.pic?groupUser.pic:'../../images/icon/head04.png'}}" />
        <text class="status">团长</text>
      </view>
      <view wx:elif="{{groupUser.identityType == 0}}" class="group-member" style="z-index:{{(-index+999)}}; left:{{-index*1}}em">
        <image class="group-member-img" src="{{groupUser.pic?groupUser.pic:'../../images/icon/head04.png'}}" />
      </view>
      <view wx:else class="group-member" style="z-index:{{(-index+999)}}; left:{{-index*1}}em">
        <image class="group-member-img" src="../../images/icon/head04.png" />
      </view>
    </block>
  </view>

  <!-- 查看全部团员btn -->
  <view class="view-all display">查看全部团员</view>
  <view wx:if="{{groupTempInfo.groupTeam.status == 1}}" class="invite-text">
    仅剩
    <text>{{groupTempInfo.groupTeam.groupNumber - groupTempInfo.groupTeam.joinNum}}</text> 人，快来加入我们的团吧！
  </view>
  <view class="invite-text  display">
    还差
    <text>{{groupTempInfo.groupTeam.groupNumber - groupTempInfo.groupTeam.joinNum}}</text> 人，即可拼团成功！
  </view>
  <!-- 立即参团btn   wx:if="{{groupTempInfo.groupTeam.status == 1 && groupTempInfo.orderNumber}}"-->
  <view class="join-now" wx:if="{{!groupTempInfo.orderNumber && groupTempInfo.groupTeam.status == 1}}" bindtap="showSku">立即参团</view>
  <!-- 查看团队 -->
  <view class="join-now" bindtap="toGroupTempInfoPage" data-groupteamid="{{groupTempInfo.groupTeam.groupTeamId}}">查看团队</view>
  <!-- 邀请好友btn -->
  <button class="join-now {{groupTempInfo.groupTeam.status == 3?'display':''}}" wx:if="{{groupTempInfo.orderNumber && groupTempInfo.groupTeam.status ==1}}" open-type="share">邀请好友参团</button>
  <!-- 查看详情btn -->
  <view wx:if="{{groupTempInfo.orderNumber}}" bindtap='toOrderDetailPage' data-ordernum="{{groupTempInfo.orderNumber}}" class="check-order">查看订单详情</view>
</view>

<!-- 规格弹窗 -->
<view class="pup-sku" wx:if="{{skuShow}}">
  <view class="pup-sku-main">
    <view class='pup-sku-header'>
      <image class="pup-sku-img" src="{{defaultSku.pic?defaultSku.pic:groupTempInfo.groupProd.prodPic}}"></image>
      <view class="pup-sku-price" wx-if="{{findSku}}">
        ￥
        <text class="pup-sku-price-int">{{wxs.parsePrice(defaultSku.actPrice)[0]}}</text> .{{wxs.parsePrice(defaultSku.actPrice)[1]}}
      </view>
      <view class="pup-sku-price" wx-if="{{!findSku}}">无货</view>
      <view class='pup-sku-prop'>
        <text>已选</text> {{selectedProp.length>0?selectedProp+'，':selectedProp}}{{prodNum}}件
      </view>
      <view class='close' bindtap='closePopup'></view>
    </view>
    <view class='pup-sku-body'>
      <view class="pup-sku-area">
        <block wx:for="{{skuGroup}}" wx:for-index="key" wx:for-item="value" wx:key='*this'>
          <view class='sku-kind'>{{key}}</view>
          <view class='sku-choose'>
            <block wx:for="{{value}}" wx:key='*this'>
              <text class="sku-choose-item {{wxs.array_contain(selectedProp,item)?'active':''}} {{['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>
        </block>
      </view>
      <view class="pup-sku-count">
        <view class="num-wrap">
          <view class="minus" bindtap='onCountMinus'>
            <text class="row"></text>
          </view>
          <view class="text-wrap">
            <input type="number" value="{{prodNum}}" disabled />
          </view>
          <view class="plus" bindtap='onCountPlus'>
            <text class="row"></text>
            <text class="col"></text>
          </view>
        </view>
        <view class="count-name">数量</view>
      </view>
    </view>
    <view class='pup-sku-footer'>
      <!-- <view class="btn buy" bindtap='spellIn' wx:if="{{groupTempInfo.groupTeam.status == 1 }}">立即参团</view> -->
      <view class="btn buy {{findSku?'':'gray'}}" bindtap='groupConfirmOrder' data-teamid="{{groupTeamId}}">立即参团</view>
    </view>
  </view>
</view>
<!-- 规格弹窗 end -->

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

<!-- <login-popup bind:onGotUserInfo="onGotUserInfo" isAuthInfo="{{isAuthInfo}}"></login-popup> -->