<!--packageH/starMusic/starMusicGroupDetails/starMusicGroupDetails.wxml-->


<import src="../../../wxParse/wxParse.wxml" />
<view class="group_good">
  <view class="content">
    <!-- <view class="showicon {{hoet?'hoet':''}}">
      <view></view>
      <view class="show_b" wx:if="{{hoet}}">
        <view class="{{current == 1?'curr':''}}" id="1" bindtap="getTap">商品</view>
        <view class="{{current == 2?'curr':''}}" id="2" bindtap="getTap">评论</view>
        <view class="{{current == 3?'curr':''}}" id="3" bindtap="getTap">详情</view>
      </view>
      <view class="{{hoet?'cart hoet':'cart' }} " catchtap="gotoHome">
        <view class="back">
          <icon class="iconfont icon-ai-home"></icon>
        </view>
      </view>
      <view class="{{hoet?'member hoet':'member' }}" catchtap="gotoMember">
        <view class="back">
          <icon class="iconfont icon-wode-wode"></icon>
        </view>
      </view>
    </view> -->
    <view class="ithumb" style="position:relative">
      <swiper indicator-dots="{{true}}" autoplay="{{false}}" style="height:750rpx;" bindchange="bindchange"
        circular="{{true}}" indicator-active-color="#007aff">
        <swiper-item wx:if="{{gooddatas.goods_video}}">
          <video style="width: 100%;height:100%;" src="{{gooddatas.goods_video}}"
            poster="{{gooddatas.video_image}}"></video>
        </swiper-item>
        <block wx:for="{{gooddatas.thumb_url}}" wx:key="index" wx:for-item="ithumb" wx:for-index="index">
          <swiper-item>
            <image src="{{ithumb}}" mode='widthFix' style="width:100%;height:100%;" data-index="{{index}}"
              bindload="imageLoad" />
          </swiper-item>
        </block>
        <block wx:if="{{!gooddatas.thumb_url}}">
          <swiper-item>
            <image src="{{gooddatas.thumb}}" mode='widthFix' style="width:100%;height:100%;" />
          </swiper-item>
        </block>
      </swiper>
      <!-- <view class="hasGoods" wx:if="{{gooddatas.another_goods.length>0&&goodType =='groupBuy'}}"
        catchtap="showGoodslistM">
        <view class="hasGoods_img">
          <image src="{{item.thumb}}" alt="" wx:for="{{gooddatas.another_goods}}" wx:key="*this" wx:for-item="item" />
        </view>
        <view class="hasGoods_text">
          <view>内含{{ gooddatas.another_goods.length }}件商品</view>
          <view>点击查看</view>
        </view>
      </view> -->
    </view>

    <view class="price_time">
      <view class="img">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/rob-time.png" width="16%;" />
      </view>
      <view class="text span">
        超值
        <!-- <br /> -->
        开团
      </view>
      <view class="price span">
        <view class="font">{{language['money']}}{{gooddatas.price}}起</view>
      </view>
      <view class="timeContainer">
          <block wx:if="{{gooddatas.end_time>nowTime && team_state==1}}">
            <view class="span" style="text-align:center;width:100%">活动截止倒计时</view>
            <view class="time">
              <view class="date">{{countDownObj.day}}</view>
              <view class="mes">天</view>
              <view class="date">{{countDownObj.hou}}</view>
              <view class="mes">:</view>
              <view class="date">{{countDownObj.min}}</view>
              <view class="mes">:</view>
              <view class="date">{{countDownObj.sec}}</view>
            </view>
          </block>
          <block wx:else>截止倒计时：已结束</block>
      </view>
    </view>

    <!-- 抢团活动倒计时 -->
    <!-- <view class="rob-time">
      <view class="price">
        <view class="li text">
          <view class="span">{{isTime?'活动截止倒计时':'活动开始倒计时'}}</view>
        </view>
      </view>
      <view class="time" wx:if="{{isTime}}">
        <view class="right">
          <view class="content">
            <view class="date">{{countDownObj.day}}</view>
            <view class="mes">天</view>
            <view class="date">{{countDownObj.hou}}</view>
            <view class="mes">:</view>
            <view class="date">{{countDownObj.min}}</view>
            <view class="mes">:</view>
            <view class="date">{{countDownObj.sec}}</view>
          </view>
        </view>
      </view>
      <view class="time" wx:if="{{!isTime}}">
        <view class="right">
          <view class="content">
            <view class="date">{{beginDownObj.day}}</view>
            <view class="mes">天</view>
            <view class="date">{{beginDownObj.hou}}</view>
            <view class="mes">:</view>
            <view class="date">{{beginDownObj.min}}</view>
            <view class="mes">:</view>
            <view class="date">{{beginDownObj.sec}}</view>
          </view>
        </view>
      </view>
    </view> -->

    <view class="title_number">
      <view class="good_title_one">{{gooddatas.title}}</view>
	</view>
	
	<view class="join_list" wx:if="{{joinListData.length>0}}">
		<view class="name">
			<view class="c1">团长：{{gooddatas.leader_name}}</view>
			<view class="c2">团名称：{{gooddatas.activity_name}}</view>
		</view>
		<view class="join_container">
			<view class="join_face"  bindtap="setJoinListShow">
                <block wx:for="{{joinListData}}" wx:if="{{index<5}}">
                    <view class="face" wx:key="member_id">
                        <image src="{{item.avatar}}" ></image>
                    </view>
                </block>
			</view>
			<block wx:if="{{team_state==1}}">
				<view class="btn" wx:if="{{is_join==0}}"  bindtap="showPopView">立即参团</view>
				<button open-type="share" class="btn" wx:elif="{{is_join==1}}">邀请好友</button>
			</block>
			<block wx:else>
				<view class="btn" wx:if="{{team_state==3}}">抢团成功</view>
				<view class="btn" wx:if="{{team_state==4}}">抢团失败</view>
			</block>
    </view>
    
		<view class="desc" wx:if="{{gooddatas.end_time>nowTime && team_state==1}}">
			<view class="c1">抢购中，离成团还差 <span class="text">{{gooddatas.surplus_num}}</span> 人</view>
			<view class="c2 text" style="display:flex;align-items:center;">距结束:
				<count now-time="{{nowTime}}" over-time="{{gooddatas.end_time}}" style="text-align:center;" />
			</view>
		</view>
	</view>

  <view class="snapSucc" wx:if="{{team_state==3}}">
    <view class="name">抢购成功</view>
    <view class="face">
      <image src="{{win_data.avatar}}" ></image>
    </view>
  </view>

	<view class="act-box">
      
      <view class="act" catchtap='setExplainFlag'>
        <view class="act1">活动说明</view>
        <view class="canTxt">
          <text></text>
        </view>
        <view class="act3">
          <text></text>
        </view>
        <view class="ang_right">
          <view class="ang_right_icon">
            <van-icon name="arrow" size='32rpx' />
          </view>
        </view>
      </view>
    </view>


    <view class="group_play">
      <view class="h2">星拼乐玩法</view>
      <view class="play ul">
        <view class="li">
          <text class="span">1</text>
          <text class="span">选择商品付款开团/参团</text>
        </view>
        <view class="li border_lr">
          <text class="span">2</text>
          <text class="span">邀请并等好友支付参团</text>
        </view>
        <view class="li">
          <text class="span">3</text>
          <text class="span">达到人数顺利成团</text>
        </view>
      </view>
    </view>

    <view class="group_btn" style="{{ipnonexbol?'padding-bottom: 34px;':''}}">
      <view class="item ul">
        <view class="item_a li" catchtap="gotoHome">
          <view class="icon" class="icon-box">
            <icon class="iconfont icon-info_store"></icon>
          </view>
        </view>
        <view class="item_a li" catchtap="openKfServerFlag">
          <view class="icon" class="icon-box">
            <icon class="iconfont icon-kefu"></icon>
          </view>
        </view>
   
        <view class="btns">
            <block wx:if="{{activity_state==1}}">
                <block wx:if="{{team_state==1}}">
                    <view class="btn btn_join_group" wx:if="{{is_join==0}}" bindtap="showPopView">立即参团</view>
                    <view class="btn btn_join_group" wx:if="{{is_join==1}}">已参团</view>
                    <button open-type="share" class="btn btn_share" >邀请好友</button>
                </block>
                <block wx:else>
                    <view class="btn btn_join_group" bindtap="gotoStarMusicIndex">参与更多团</view>
                </block>
            </block>
            <block wx:else>
                <view class="btn btn_join_group" bindtap="gotoStarMusicIndex">更多活动</view>
            </block>
        
        </view>
      </view>
    </view>
    <view class="foShowBox" style="width:100%;margin-top:20rpx">
      <view class="pullBox {{xqBoxShow?'nondh':'rotadh'}}" style="margin-bottom:{{boxHeight}}px;">
        <image class="pullIcon {{xqBoxShow?'rotateImg':'normalImg'}}" src="{{imagUrl+'pull_up@2x.png'}}"></image>
        <text>上拉查看商品详情</text>
      </view>
      <view class="actives {{xqBoxShow?'actives':'noneBox'}}">
        <view style="text-align: center;width:100%;height:100rpx;line-height:100rpx;background:#fff;">商品详情</view>
        <block wx:if="{{article.nodes}}">
          <template is="wxParse" data="{{wxParseData:article.nodes}}" />
        </block>
        <block wx:else>
          <rich-text nodes="{{first_content}}"></rich-text>
        </block>
      </view>
    </view>


  <van-popup custom-style="border-radius: 38rpx;" show="{{kfServerFlag}}" overlay="{{true}}">
	<view class="pop-content">
		<view class="pop-top">
			<view class="left">
				<view class="wrap">
					<view>
						<view class="image" style="postion:relative">
							<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_online_contect@2x.png"></image>
						</view>
						<view>在线联系</view>
						<button open-type="contact" bindcontact="handleContact" style="postion:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
					</view>
				</view>
			</view>
			<view style="display:flex;" wx:if="{{!service_mobile==''}}">
				<view class="line"></view>
			</view>
			<view class="right" wx:if="{{!service_mobile==''}}">
				<view class="wrap" bindtap="callPhone">
					<view>
						<view class="image">
							<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_tel_contect@2x.png"></image>
						</view>
						<view>联系电话</view>
						<view style="margin-top:16rpx">{{service_mobile}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="pop-bottom" wx:if="{{!service_QRcode==''}}">
			<view class="image">
				<image src="{{service_QRcode}}" show-menu-by-longpress></image>
			</view>
		</view>
		<icon class="iconfont icon-close11" catchtap="openKfServerFlag"></icon>
	</view>
</van-popup>
	
	<van-popup   custom-style="background:transparent;" show="{{joinListShow}}" bind:close="setJoinListShow">
		<view class="joinListWrapper">
			<view class="divContent">
				<view class="title">参团人员</view>
				<view class="join_list_container">
						<view class="face" wx:for="{{joinListData}}" wx:key="member_id">
							<image src="{{item.avatar}}" ></image>
						</view>
				</view>
			</view>
			<view class="close">
				<icon class="iconfont icon-adsystem_icon_cancle" bindtap="setJoinListShow"></icon>
			</view>
		</view>
	</van-popup>
  
  <van-popup custom-style="width: 680rpx; border-radius: 49rpx;" show="{{explainFlag}}" bind:close="setExplainFlag">
  <view class="explainWrapper">
		<view class="header">
			<view style="line-height: 70rpx;">说明</view>
			<icon class="iconfont icon-guanbi" catchtap="setExplainFlag"></icon>
		</view>
		<view class="content">
      <block wx:if="{{explainText.nodes}}">
          <template is="wxParse" data="{{wxParseData:explainText.nodes}}" />
        </block>
		</view>
  </view>
</van-popup>
   
    <van-popup show="{{showGoodslist}}" closeable close-on-click-overlay="true" bind:close="clicktapshow"
      custom-style="width:100%;height:50%;overflow:auto;" position="bottom" round>
      <view class="list" id="group_buy_goodslist">
        <view class="child" wx:for="{{gooddatas.another_goods}}" catchtap="gotoShopGoods" data-id="{{item.id}}">
          <image src="{{item.thumb}}" alt="" />
          <view class="child_right">
            <view class="title">{{ item.title }}</view>
            <view class="money">
              <text>{{language['money']}}</text> {{ item.price }}
            </view>
          </view>
        </view>
      </view>
    </van-popup>
    <!-- 规格start -->
    <view class="shadeMode {{popupSpecs?'shadeModeShow':''}}">
      <view class="specifications">
        <view class="icon_close" bindtap="popupSpecsbtn">
          <view class="guanbi_icon">
            <van-icon name="close" size='40rpx' />
          </view>
        </view>
        <view class="shopimg">
          <view class="chooser_img">
            <image src="{{popThumb == null || popThumb == '' || popThumb == undefined?gooddatas.thumb:popThumb}}" />
          </view>
          <view class="right">
            <view class="price">
              {{language['money']}}
              <text id="option_price">{{popPrice}}</text>
            </view>
            <view class="option">库存{{popStock}}{{gooddatas.sku}}</view>
            <view class="option">{{goodsDescription}}</view>
          </view>
        </view>
        <view class="shopinfoContent" wx:if="{{gooddatas.has_option == 1}}">
          <view class="shopinfo" wx:key="{{specsIdex}}" wx:for="{{gooddatas.has_many_specs}}" wx:for-index="specsIdex"
            wx:for-item="specs">
            <view class="dl">
              <view class="dt">{{specs.title}}</view>
              <view class="dd" data-descr="{{specs.description}}">
                <view wx:for="{{specs.specitem}}" wx:key="{{specitemIdex}}" wx:for-index="specitemIdex"
                  wx:for-item="specitem"
                  class="spec {{specs.description==specitem.id?'sele':''}} {{specitem.c?'disab':''}}"
                  data-specitem="{{specitem}}" data-specsidex="{{specsIdex}}" bindtap='selectSpecs'>
                  {{specitem.title}}
                </view>
              </view>
            </view>
          </view>
        </view>
        <view class="goodsnum" >
          <view class="num">购买数量：</view>
          <view class="calculation">
            <view class="leftnav" bindtap='reduceGoods'>-</view>
            <input type="number" class="shownum" value="{{goodsCount}}" bindinput="inputGoodsNum" disabled="{{goodType == 'grabGroup'?true:false}}"/>
            <view class="rightnav" bindtap='addGoods'>+</view>
          </view>
        </view>
        <view class="subbtn" bindtap="sendJoinGroup" wx:if="{{popStock>=1}}">确认</view>
        <view class="subbtn" style="background-color:#999999;" wx:else>确认</view>
      </view>
    </view>
    <view class="popupMode {{popupModeshow?'popupModeShow':''}}" hidden="{{popupModeshow}}"></view>
    <!-- 规格end -->
    <view style="height: 34px;" wx:if="{{ipnonexbol}}"></view>
  </view>
</view>

