<!-- packageA/mycomponent/goodsComponent/selfParameterServicetag/selfParameterServicetag.wxml -->

<!-- 拼团 start -->
<view class="group_play" wx:if="{{goodsType == 'group_goods'||goodsType == 'groupwork'}}">
  <view class="h2">拼团玩法</view>
  <view class="play ul">
    <view class="li">
      <text class="span">1</text>
      <text class="span">选择商品付款开团/参团</text>
    </view>
    <view class="li">
      <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 catchtap="groupTotalTap" class="groupTotal" style="background: #fff;margin-top: 20rpx;" wx:if="{{gooddatas.fight_groups_number_show == '1'}}">
  <view class="headTop">
    <view class='span'>拼团人数</view>
    <view class="span">{{gooddatas.join_team_number}}人
      <i class="fa fa-angle-right" style="font-size:1rem;"></i>
    </view>
  </view>
  <swiper style="height: 120rpx;" vertical>
    <swiper-item wx:for="{{groupTotal.listData}}" wx:key="index">
      <view class="user" wx:if="{{item.has_one_member}}">
        <view class="left">
          <view class="image">
            <image src="{{item.has_one_member.avatar_image}}" alt="" />
          </view>
          <view class="userName">{{item.has_one_member.nickname}}</view>
        </view>
        <view class="right">{{item.has_one_member.mobile}}</view>
      </view>
    </swiper-item>
  </swiper>
</view>
<!-- 参与历史 -->
<view class="history-box" wx:if="{{gooddatas.is_show_custom_number}}">
  <view class="containe">
    <view class="left-text">
      <view class="count">{{gooddatas.join_number_custom_text}}</view>
      <view class="total">{{gooddatas.winning_number_custom_text}}</view>
    </view>
    <image class="money-img" src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/group_money@2x.png" alt=""></image>
  </view>
</view>

<view class="explain" wx:if="{{gooddatas.is_lottery && goodsType == 'group_goods'}}">
  <view class="title">{{gooddatas.lottery_title}}</view>
  <view class="content" style="text-align:left;" wx:for="{{gooddatas.lottery_desc}}">
    <mp-html content="{{item}}"></mp-html>
  </view>
</view>
<view class="store-position" wx:if="{{is_o2o}}">
  <view class="store-box" catchtap="gotoList">
    <view class="store-name">
      <van-icon name="shop-o" color="#999" size="34rpx" />
      <view class="span">门店名称</view>
    </view>
    <view class="o2oName">{{ gooddatas.store.store.store_name }}</view>
  </view>
  <view class="contact-box">
    <view class="contact">
      <view class="o2oPhone" catchtap="gophone" data-mobile="{{gooddatas.store.store.mobile}}">
        <van-icon name="phone-o" color="#999" size="34rpx" />
        <view class="span">联系商家</view>
      </view>
    </view>
    <view class="position" catchtap="showPop">
      <van-icon name="service-o" size='40rpx' color="#666" />
      <view class="span">客服</view>
    </view>
    <view class="position" catchtap="goToAdress">
      <van-icon name="location-o" color="#999" size="34rpx" />
    </view>
  </view>
</view>
<view class="group_into" wx:if="{{gooddatas.display_team!='' && gooddatas.display_team!=null && gooddatas.display_team!=undefined && goodsType == 'group_goods' }}">
  <view class="h2">以下小伙伴拼团中，可直接参与</view>
  <view class="more" catchtap='showGroupMore'>
    <text class="span">查看更多</text>
    <van-icon class="fa fa-angle-right" />
  </view>

  <swiper indicator-dots="{{false}}" autoplay="{{true}}" interval="2000" vertical style="height: 40px;">
    <swiper-item wx:for="{{teamInfo.listData}}">
      <view class="into_user">
        <view class="user">
          <image src="{{gooddatas.display_team.has_one_leader.avatar_image}}" />
        </view>
        <view class="time ul">
          <view class="time_a li">
            {{gooddatas.display_team.has_one_leader.username}} 开{{gooddatas.display_team.has_one_level.member_num}}人团
          </view>
          <view class="time_b li" style="display:flex;flex-wrap:wrap;">
            剩余
            <count now-time="{{nowTime}}" over-time="{{end_time_team}}" style="text-align:center;" />
            结束，仅差
            {{gooddatas.display_team.has_one_level.member_num - gooddatas.display_team.has_many_success_member_count}} 人
          </view>
        </view>
        <view style="width: 160rpx;height: 62rpx;">
          <button type="button" data-item="{{gooddatas.display_team.is_team_leader}}" open-type="{{gooddatas.display_team.is_team_leader=='1'?'share':''}}" data-id="{{gooddatas.display_team.id}}" catchtap="clickAdd" style="display:flex;align-items:center;justify-content: center;padding-left:0;padding-right:0;">
            {{gooddatas.display_team.is_team_leader == '0'?"加入该团":"邀请好友"}}
          </button>
        </view>
      </view>
    </swiper-item>
  </swiper>


</view>
<!-- 拼团end -->

<!-- 抢团 start -->
<view wx:if="{{goodsType == 'grabGroup'}}" class="group_good">
  <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="grab-result" wx:if="{{gooddatas.transport_reward>0}}">

    <view class="stepItem">
      <view class="img">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/grab_group_result1.png"></image>
      </view>
      <view class="text">参与抢团</view>
      <view class="text">
        <text class="red">{{gooddatas.limit_num}}</text>人成团
      </view>
    </view>
    <view class="block">
      <view></view>
      <view></view>
      <view></view>
    </view>
    <view class="stepItem">
      <view class="img">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/grab_group_result2.png"></image>
      </view>
      <view class="text"><text class="red" wx:if="{{gooddatas}}"> {{gooddatas.limit_num-1}}</text>人未中退款</view>
      <view class="text">
        <text class="red">1</text>人拼中发货
      </view>
    </view>
    <view class="block">
      <view></view>
      <view></view>
      <view></view>
    </view>
    <view class="stepItem">
      <view class="img">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/grab_group_result3.png"></image>
      </view>
      <view class="text c1">未拼中获得奖励</view>
      <view class="text c2">
        <text class="red" wx:if="{{gooddatas}}"> {{gooddatas.transport_reward}}</text>红包
      </view>
    </view>
  </view>
  <view class="member-reward" wx:if="{{gooddatas.is_profit==1}}">
    <view class="member-reward-btn">团长奖励</view>
    交易成功团长可获得
    <view class="member-reward-price">{{language['money']}} {{gooddatas.profit}}</view>
  </view>
  <view class="group_into" wx:if="{{team!=''&&team!=null&&team!=undefined}}">
    <view class="h2">以下小伙伴{{goodType == 'groupBuy'?'拼购':'抢团'}}中，可直接参与</view>
    <view class="more" catchtap='showGroupMore'>
      <text class="span">查看更多</text>
      <van-icon class="fa fa-angle-right" />
    </view>
    <view class="into_bg_color">
      <swiper autoplay="true" vertical="true" style="max-height:240rpx;" interval='1800' circular>
        <block wx:for="{{team}}" wx:key="index" wx:for-item="item">
          <swiper-item>
            <block wx:for="{{ item }}" wx:key="index">
              <view class="into_user">
                <view class="user">
                  <image src="{{item.avatar}}" />
                </view>
                <view class="time ul">
                  <view class="time_a li">
                    <view class="name">{{item.nickname}}</view>
                    <view style="color: #ff2c29;">还差{{item.surplus_member}}人成团</view>
                  </view>
                  <view class="time_b li" style="display:flex;flex-wrap:wrap;">
                    <view style="display: flex;">
                      剩余
                      <count now-time="{{nowTime}}" over-time="{{item.end_time}}" style="text-align:center;" />
                    </view>
                    <view>{{gooddatas.limit_num}}人团</view>
                  </view>
                </view>
                <view style="width: 114rpx;height: 50rpx;">
                  <button type="button" open-type="{{item.is_oneself == 1?'share':''}}" data-id="{{item.leader_id}}" data-oneself="{{item.is_oneself}}" catchtap="clickAdd">
                    {{item.is_oneself == 0?"加入该团":"邀请好友"}}
                  </button>
                </view>
              </view>
            </block>
          </swiper-item>
        </block>
      </swiper>
    </view>
  </view>
</view>
<!-- 抢团 end -->


<!--新样式-->
<!-- 二开 #79514 规格 -->
<view class="panel" wx:if="{{gooddatas.get_goods.has_option == 1 && (goodsType == 'goods' || goodsType == 'supplierGoods')}}">
  <view class="goods-additional-info">
    <view class="collect-order" catchtap="getBuyNow">
      <view class="goods-additional-text">规格</view>
      <view class="goods-additional-content" wx:if="{{optionObj.title || optionObj.total}}">已选：{{optionObj.title}} x{{optionObj.total}}</view>
      <view wx:else class="goods-additional-content"></view>
      <icon class="iconfont icon-advertise-next"></icon>
    </view>
  </view>
</view>
<view class="panel" wx:if="{{hasActivity || is_market || selfbuy_discount!=null || activitySwitch || goods_plugin.label && goods_plugin.label.length > 0}}">
  <view class="goods-additional-info">
    <!-- 一口价 -->
    <view class="collect-order" wx:if="{{hasActivity}}" catchtap="toFixedPrice">
      <view class="goods-additional-text">凑单</view>
      <view class="goods-additional-content">{{pack_price}}元任选{{goods_count}}件</view>
      <text class="goods-additional-button">去凑单></text>
    </view>

    <!--应用市场-->
    <view class="collect-order" wx:if="{{is_market}}" catchtap='marketShowTap'>
      <view class="goods-additional-text">应用</view>
      <view class="goods-additional-content">{{prdocut_market_name_apps || ""}}</view>
      <text class="goods-additional-button">插件></text>
    </view>
    <view class="service-box" wx:if="{{prdocut_market.is_show==1}}">赠送售后服务时长 <text style="color:red;margin-left:13rpx;">{{prdocut_market.service_time}}天</text>
      <text style="font-size:24rpx;">（剩余售后服务时长730天封顶，大于则不再增加）</text>
    </view>

    <!-- 自购省 -->
    <view class="selfbuy-discount" wx:if="{{selfbuy_discount!=null}}" catchtap='gotohuiyuan'>
      <view class="goods-additional-text">自省购</view>
      <view class="selfbuy-discount-items">
        <view class="goods-additional-content" wx:if="{{selfbuy_discount.this_level_discount_price.show==1}}">{{selfbuy_discount.this_level_discount_price.content}}</view>
        <view class="goods-additional-content overflow" wx:if="{{selfbuy_discount.next_level_discount_price.show==1}}">{{selfbuy_discount.next_level_discount_price.content}}</view>
      </view>
      <view class="goods-additional-button" wx:if="{{selfbuy_discount && selfbuy_discount.link_to_level_page && selfbuy_discount.link_to_level_page.show==1}}">去升级></view>
    </view>

    <!-- 活动 -->
    <view class="goods-activity" wx:if="{{activitySwitch}}" catchtap="activityShowFun">
      <view class="goods-additional-text">活动</view>
      <view class="goods-activity-items">
        <view class="goods-activity-item" wx:for="{{activityArr}}" wx:key="index" wx:for-item="activitem" wx:if="{{index < 3}}">
          <view class="goods-activity-item-label">{{activitem.name}}</view>
          <view class="goods-additional-content text-overHide">{{activitem.value}}</view>
        </view>
      </view>
      <icon style="margin-top: -6px;" class="iconfont icon-advertise-next"></icon>
    </view>

    <!-- 服务标签 -->
    <view class="server-tag-box" wx:if="{{goods_plugin.label && goods_plugin.label.length > 0}}" catchtap='showCan'>
      <view class="server-tag-item" wx:for="{{goods_plugin.label}}" wx:key="index" wx:if="{{item.status == 1}}">
        <view class="server-tag-icon">
          <image wx:if="{{item.pic}}" src="{{item.pic}}" class="img"></image>
        </view>
        <view class="server-tab-text text-overHide">{{item.name}}</view>
      </view>
    </view>
  </view>

</view>
<!--新样式end-->

<!--应用市场-->
<van-popup show="{{marketShow}}" round closeable position="bottom" bind:close="closeMarketShow" custom-style="width:100%;height:70%;">
  <view class="popup-title">
    插件列表
    <view class="closs_icon"></view>
  </view>
  <view class="popup-box">
    <view class="popup-item van-hairline--bottom" wx:for="{{prdocut_market_name}}" wx:key="index">{{item}}</view>
  </view>
</van-popup>

<!-- 活动弹窗 -->
<view class="shadeMode_1  {{activityShow?'shadeModeShow':''}}">
  <view class="activitycontent">
    <view class="header">
      <view class="left"></view>
      <view class="center">
        <text>活动</text>
      </view>
      <view class="right">
        <view class="close" bindtap='activityShowBtn'>
          <van-icon name="close" size='40rpx' />
        </view>
      </view>
    </view>
    <view class="activitybot">
      <view wx:for="{{activityArr}}" wx:key="index" wx:for-item="activitem">
        <view class="activicell">
          <view class="left">{{activitem.name}}</view>
          <view class="right">
            <view class="right_content">{{activitem.value}}</view>
          </view>
        </view>
        <view wx:if="{{activitem.desc}}" style="padding: 0 30rpx 30rpx 30rpx;color: rgb(241, 83, 83);">
          {{activitem.desc}}
        </view>
      </view>
    </view>
  </view>
</view>
<!-- 活动end -->

<!-- 服务标签 -->
<van-popup show="{{showCs}}" closeable bind:close="closeCs" class="canshu" position="bottom" custom-style="width:100%;height:70%;overflow:auto;">
  <view class="parameter">
    <view class="showTitle">标签</view>
    <view class="server-popup-item" wx:for="{{goods_plugin.label}}" wx:key="index" catchtap="toLink" data-item="{{item}}">
      <view class="server-popup-left">
        <view class="server-popup-top">
          <view class="img">
            <image wx:if="{{item.pic}}" src="{{item.pic}}" class="server-icon"></image>
          </view>
          <view class="name">{{item.name}}</view>
        </view>
        <view class="desc">{{item.desc}}</view>
      </view>
      <view class="server-popup-right">
        <icon class="iconfont icon-advertise-next"></icon>
      </view>
    </view>
  </view>
</van-popup>
<!-- end -->

<!-- 拼团中弹窗 -->
<van-popup show="{{show2}}" position="center" custom-class="border-radius: 16rpx;height:212rpx;" round width="88%" bind:click-overlay="tapOverlay">
  <view class="open_group" style="width:660rpx;border-radius: 16rpx;">
    <view class="p" style="text-align:center;">以下小伙伴拼团中，可直接参与</view>
    <view class="icon_close" catchtap="tapOverlay">
      <icon class="iconfont icon-close11"></icon>
    </view>
    <view style="max-height:600rpx;overflow-y:scroll;">
      <view class="into_user" wx:for="{{teamInfo.listData}}" wx:key="index">
        <view class="user">
          <image src="{{item.has_one_leader.avatar_image}}" />
        </view>
        <view class="time ul">
          <view class="time_a li">
            {{item.has_one_leader.username}} 开{{item.has_one_level.member_num}}人团
          </view>
          <view class="time_b li">
            <view class="span" style="display:flex;flex-wrap: wrap;">
              剩余
              <count now-time="{{item.nowTime}}" over-time="{{item.overTime}}" style="text-align:center;" />
              结束，仅差{{item.has_one_level.member_num-item.has_many_success_member_count}}人
            </view>
          </view>
        </view>
        <button type="button" data-item='0' data-id="{{item.id}}" catchtap="clickAdd" style="display:flex;align-items:center;justify-content: center;padding-left:0;padding-right:0;">
          加入该团
        </button>
      </view>
      <view class="moreTeam" style="line-height:2.5rem;text-align:center;" bindtap="getMoreTeamList" wx:if="{{teamInfo.total>teamInfo.listData.length}}">
        加载更多
      </view>
    </view>
  </view>
</van-popup>
<!-- end -->

<!-- 抢团弹窗 -->
<van-popup show="{{show3}}" position="center" round custom-class="border-radius: 16rpx;height:212rpx;" width="88%" bind:click-overlay="tapOverlay">
  <view class="group_good">
    <view class="open_group" style="width:660rpx;border-radius: 16rpx;">
      <view class="p">以下小伙伴{{goodType == 'groupBuy'?'拼购':'抢团'}}中，可直接参与</view>
      <view class="icon_close" catchtap="tapOverlay">
        <icon class="iconfont icon-close11"></icon>
      </view>
      <view class="into_bg_color">
        <view class="into_user" wx:for="{{teamLis}}" wx:key="index" catchtap="clickAdd" data-id="{{item.leader_id}}">
          <view class="user">
            <image src="{{item.avatar}}" />
          </view>
          <view class="time ul">
            <view class="time_a li">
              <view class="name">{{item.nickname}}{{item.leader_id}}</view>
              <view style="color: #ff2c29;">还差{{item.surplus_member}}人成团</view>
            </view>
            <view class="time_b li" style="display:flex;flex-wrap:wrap;">
              <view style="display: flex;">
                剩余
                <count now-time="{{nowTime}}" over-time="{{item.end_time}}" style="text-align:center;" />
              </view>
              <view>{{goodType == 'groupBuy'?item.buy_number:gooddatas.limit_num}}人团</view>
            </view>
          </view>
          <view style="width: 114rpx;height: 50rpx;">
            <button type="button" open-type="{{item.is_oneself == 1?'share':''}}" data-id="{{item.leader_id}}" catchtap="clickAdd">
              {{item.is_oneself == 0?"加入该团":"邀请好友"}}
            </button>
          </view>
        </view>
      </view>
    </view>
  </view>
</van-popup>
<!-- 抢团弹窗 -->

<!-- 0.1元拼 -->
<view class="group_into" wx:if="{{gooddatas.alliance!='' && gooddatas.alliance!=null && gooddatas.alliance!=undefined && goodsType == 'groupwork' }}">
  <view class="h2">以下小伙伴拼团中，可直接参与</view>
  <view class="more" catchtap='showGroupMore'>
    <text class="span">查看更多</text>
    <van-icon class="fa fa-angle-right" />
  </view>
  <view class="into_user">
    <view class="user">
      <image src="{{gooddatas.alliance[0].avatar_image}}" />
    </view>
    <view class="time ul">
      <view class="time_a li">
        {{gooddatas.alliance[0].nickname}} 开{{gooddatas.alliance[0].person}}人团
      </view>
      <view class="time_b li" style="display:flex;flex-wrap:wrap;">
        剩余
        <count now-time="{{nowTime}}" over-time="{{gooddatas.alliance[0].end_time}}" style="text-align:center;" />
        结束,仅差
        {{gooddatas.alliance[0].disparity}} 人
      </view>
    </view>
    <view style="width: 160rpx;height: 62rpx;">
      <button type="button" data-item="{{gooddatas.alliance[0]}}" open-type="{{gooddatas.alliance[0].uid == uid?'share':''}}" data-id="{{gooddatas.alliance[0].id}}" catchtap="clickAdd" style="display:flex;align-items:center;justify-content: center;padding-left:0;padding-right:0;">
        {{gooddatas.alliance[0].uid == uid?"邀请好友":"加入该团"}}
      </button>
    </view>
  </view>
</view>
<van-popup show="{{show4}}" position="center" custom-class="border-radius: 16rpx;height:212rpx;" width="88%" bind:click-overlay="tapOverlay">
  <view class="open_group" style="width:660rpx;border-radius: 16rpx;">
    <view class="p">以下小伙伴拼团中，可直接参与</view>
    <view class="icon_close" catchtap="tapOverlay">
      <icon class="iconfont icon-close11"></icon>
    </view>
    <view style="max-height:600rpx;overflow:scroll;">
      <view class="into_user" wx:for="{{gooddatas.alliance}}" wx:key="index">
        <view class="user">
          <image src="{{item.avatar_image}}" />
        </view>
        <view class="time ul">
          <view class="time_a li">
            {{item.nickname}} 开{{item.person}}人团
          </view>
          <view class="time_b li">
            <view class="span" style="display:flex;flex-wrap: wrap;font-size: 10px;">
              剩余
              <count now-time="{{nowTime}}" over-time="{{item.end_time}}" style="text-align:center;" />
              结束,仅差{{item.disparity}}人
            </view>
          </view>
        </view>
        <button type="button" data-item="{{item}}" open-type="{{item.uid == uid?'share':''}}" data-id="{{item.id}}" catchtap="clickAdd" style="display:flex;align-items:center;justify-content: center;padding-left:0;padding-right:0;">
          {{item.uid == uid?"邀请好友":"加入该团"}}
        </button>
      </view>
    </view>
  </view>
</van-popup>
<!-- 拼团次数 -->
<van-popup show="{{showTotal}}" position="center" custom-style="background: transparent; height: 800rpx; overflow: hidden">
  <view class="groupLIstBox">
    <view class="topHead">
      <view class="txt">已成团：<span>{{success_team_number}}</span></view>
      <view class="txt">已开团：<span>{{open_team_number}}</span></view>
    </view>
    <view class="txtT">参团者信息：</view>
    <view class="groupList" wx:for="{{groupTotal.listData}}" wx:key="ind">
      <view class="imgaeBox" wx:if="{{item.has_one_member}}">
        <image src="{{item.has_one_member.avatar_image}}" alt="" />
      </view>
      <view class="userinfo" wx:if="{{item.has_one_member}}">
        <view class="name">{{item.has_one_member.nickname}}</view>
        <view class="intro">{{item.has_one_member.mobile}}</view>
      </view>
    </view>
    <view class="isnone" wx:if="{{groupTotal.page >= groupTotal.last_page}}" >没有更多了~</view>
    <view class="isnone" wx:else catchtap="getMoreTeamList">点击加载更多</view>
  </view>
  <view style="transform: rotate(45deg);text-align: center;">
    <i class="iconfont icon-customform_add" catchtap="groupTotalTap" data-key="close"></i>
  </view>
</van-popup>