<view class="group_detail">
    <view class="content">
        <view class="goods_list">
            <view class="top_title">
                <view>成团人数 <text style="color:#ff2c29">{{gooddatas.limit_num}}人</text></view>
                <view style="color:#ff2c29">{{gooddatas.state_name}}</view>
            </view>
            <view class="goods_box">
                <view class="goods_img">
                    <image src="{{gooddatas.thumb}}" catchtap="OpenLeader" />
                </view>
                <view class="goods_info ul">
                    <view class="name li" style="-webkit-box-orient: vertical;">
                        {{gooddatas.title}}
                    </view>
                    <view class="number li">
                        <text class="span">{{gooddatas.payed_num}}人付款</text>
                    </view>
                    <view class="price li">
                        <text class="span">{{language['money']}}</text>
                        {{gooddatas.price}}
                        <!-- <text class="span"
                            style="text-decoration:line-through;">{{language['money']}}{{gooddatas.market_price}}</text> -->
                    </view>
                </view>
            </view>
        </view>
        <view class="group_user">
            <view class="user_box">
                <view class="user" wx:for="{{gooddatas.team_data}}" wx:key="index">
                    <view class="img current">
                        <image src="{{item.avatar}}" />
                    </view>
                    <text class="span" wx:if="{{item.is_leader==1}}">团长</text>
                </view>
                <block wx:if="{{gooddatas.surplus_num>0}}">
                <view class="user" wx:for="{{gooddatas.surplus_num}}" wx:key="index">
                    <view class="img">
                        <!-- <image src="{{item.avatar}}" /> -->
                    </view>
                    <icon class="iconfont icon-group_wenhao"></icon>
                </view>
                </block>
            </view>
            <view class="into_group">
                <view class="p" style="color:#000;" wx:if="{{(gooddatas.state == 1 || gooddatas.state == 4)&&nowTime <gooddatas.activity_end_time}}">
                    离成团还差{{gooddatas.surplus_num}}人，<view style="color:#ff2c29">
                        <count now-time="{{nowTime}}" over-time="{{gooddatas.team_end_time}}" style="text-align:center;" />
                    </view>后结束
                </view>
                <view class="p" wx:if="{{gooddatas.state == 2}}">该团已抢团成功</view>
                <view class="p" wx:if="{{nowTime < gooddatas.activity_end_time&&nowTime >gooddatas.team_end_time}}">很抱歉，抢团已结束</view>
                <view class="p" wx:if="{{gooddatas.state == 0}}">待支付，请尽快支付！</view>
                <view class="p" wx:if="{{nowTime >gooddatas.activity_end_time}}">很抱歉，该团已结束</view>

                <block wx:if="{{nowTime < gooddatas.team_end_time}}">
                    <!-- 进行中 -->
                    <block wx:if="{{gooddatas.is_leader == 1}}">
                        <!-- 团长 -->
                        <button type="button" class="btn" open-type="share" catchtap="tapGoteam"
                        wx:if="{{gooddatas.state == 1 && ((gooddatas.is_join == 0 && gooddatas.is_wait_pay == 0) || (gooddatas.is_join == 1 && gooddatas.is_wait_pay == 0))}}">邀请好友</button>
                    </block>

                    <block wx:if="{{gooddatas.is_leader == 0}}">
                        <!-- 团员 -->
                        <button type="button" class="btn" open-type="share" catchtap="tapGoteam" wx:if="{{gooddatas.is_join == 1 && gooddatas.state == 1}}">邀请好友</button>

                        <button type="button" class="btn" catchtap="showPopView" wx:if="{{isCheckActivity && gooddatas.surplus_num > 0 && gooddatas.is_join == 0 && gooddatas.is_wait_pay == 0 && gooddatas.state == 1}}">我要参团</button>
                    </block>

                    <button type="button" class="btn" catchtap="gotoOrder"
                    wx:if="{{gooddatas.order_id && gooddatas.is_join == 0 && gooddatas.is_wait_pay == 1}}">去支付</button>

                    <button type="button" class="btn" catchtap="gotoList"
                    wx:if="{{!isCheckActivity || gooddatas.state == 2 || gooddatas.state == 3}}">更多抢团进行中</button>

                    <button type="button" class="btn" catchtap="OpenLeader"
                    wx:if="{{gooddatas.state == 2 || gooddatas.state == 3}}">我要开团</button>

                </block>
                <block wx:else>
                    <!-- 结束 -->
                    <button type="button" class="btn" catchtap="gotoList"
                    wx:if="{{!isCheckActivity || gooddatas.state == 2 || gooddatas.state == 3}}">更多抢团进行中</button>
                </block>

                <!-- <button type="button" class="btn" open-type="share" catchtap="tapGoteam"
                    wx:if="{{nowTime < gooddatas.team_end_time && gooddatas.is_oneself == 1 && (gooddatas.state == 1 || gooddatas.state == 4)}}">邀请好友</button>
                <button type="button" class="btn" catchtap="OpenLeader"
                    wx:if="{{(nowTime < gooddatas.team_end_time && gooddatas.surplus_num > 0 && gooddatas.state == 5) ||gooddatas.state == 6 ||gooddatas.state == 3}}">我要开团</button>
                <button type="button" class="btn" catchtap="gotoList"
                    wx:if="{{!isCheckActivity || nowTime > gooddatas.team_end_time || gooddatas.state == 7 || gooddatas.state == 8}}">更多抢团进行中</button>
                <button type="button" class="btn" catchtap="showPopView"
                    wx:if="{{gooddatas.surplus_num > 0 &&isCheckActivity &&gooddatas.is_oneself == 0 &&nowTime < gooddatas.team_end_time &&(gooddatas.state == 4 || gooddatas.state == 1)}}">我要参团</button>
                <button type="button" class="btn" catchtap="gotoOrder"
                    wx:if="{{gooddatas.surplus_num > 0 && nowTime < gooddatas.team_end_time && gooddatas.state == 0}}">去支付</button> -->
            </view>
        </view>
        <!--  抢团中奖 -->
        <view class="win_member" wx:if="{{gooddatas.win_member.nickname}}">
            <view class="win_member_text">抢团中奖</view>
            <view class="win_member_img">
                <image src="{{gooddatas.win_member.avatar}}" alt="" />
            </view>
            <view class="win_member_text" style="text-align:center;color: #ff2c29;">
                恭喜 {{ gooddatas.win_member.nickname }} 中奖！
            </view>
        </view>

        <!-- 规格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}}" disabled="true" bindinput="inputGoodsNum" />
                        <view class="rightnav" bindtap='addGoods'>+</view>
                    </view>
                </view>
                <view class="subbtn" bindtap="checkActivity" 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>
</view>