<!--pages/group-details/group-details.wxml-->
<view class="group-details">
    <view class="details-head" bindtap="collage">
        <view class="headImg">
            <block wx:for="{{joinUserList}}" wx:key="{{index}}">
                <view class="headImg-item">
                    <image src="{{item.avatar}}"></image>
                </view>
            </block>
            <block wx:for="{{surplusList}}" wx:key="{{index}}">
                <view class="headImg-item">
                    <image src="../../../static/groupImg/no_head.png"></image>
                </view>  
            </block>                      
        </view>
        <view class="shengyu">
            <view class="shengyu-num" hidden="{{surplusNum == '0'}}">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
            <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功</view>
            <view class="shengyu-time">
                剩余时间:
                <view class="time">
                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
                    <text>{{timeList[0]}}</text>
                </view>
                天
                <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
                    <view class="time">
                        <image src="../../../static/groupImg/Rectangle_31.png"></image>
                        <text>{{item}}</text>
                    </view>
                </block>
                时             
                <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
                    <view class="time">
                        <image src="../../../static/groupImg/Rectangle_31.png"></image>
                        <text>{{item}}</text>
                    </view>
                </block>                
                分             
            </view>
        </view>
    </view>
    <scroll-view scroll-y="{{true}}">
        <view class="grade-details" bindtap="gradeDetails">
            <image src="{{titleIcon}}" ></image>
            <text>{{title}}</text>
            <text>{{bookInfo}}</text>
        </view>
        <view class="catalog">
            <image src="../../../static/groupImg/Rectangle 34@2x.png"></image>
            <text>语文目录</text>
        </view>
        <view class="catalog-list">
            <view class="catalog-item" wx:for="{{lessonList}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}">
                <text class="left">{{item.title}}</text>
                <text class="right">{{item.readingNum}}朗读 ></text>
            </view>           
        </view>
    </scroll-view>
    <view class="group-details-btn">
        <view class="left-btn" bindtap="openGroup">
            开团
        </view>
        <view class="right-btn" bindtap="jionGroup">
            <image src="../../../static/groupImg/jionBg.png"></image>
            <text>参团</text>
        </view>
    </view>
</view>

<popup
    typeOf="{{typeOf}}"
    title="{{title}}"
    headTextOne="{{headTextOne}}"
    headTextTwo="{{headTextTwo}}"
    content="{{content}}"
    bindGroup="group"
></popup>