<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
    <view slot="info" class="container main">
        <view class="zero one">
            <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入赛事名称" />
        </view>
        <view class="zero two">
            <scroll-view scroll-y="true" class="scroll-view">
                <view class="list-scroll-view">
                    <view class="list" wx:for="{{list}}" wx:key="item">
                        <view class="name">{{item.match_name}}</view>
                        <view class="other">
                            <view class="other_1">
                                <text>是否支付报名费：</text>
                                <text>{{item.pay_status=='0'?'待支付':item.pay_status=='1'?'已支付':'支付失败'}}</text>
                            </view>
                            <view class="other_1">
                                <text>比赛项目人数：</text>
                                <text>{{item.project_num||0}}人</text>
                            </view>
                        </view>
                        <view class="btn">
                            <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                            <button type="primary" size="mini" bindtap="toPay" data-item="{{item}}" wx:if="{{item.pay_status==='0'}}">支付</button>
                            <button type="primary" size="mini" bindtap="toTeam" data-item="{{item}}" wx:if="{{item.pay_status=='1'&&item.project_type=='双打'}}">组队申请</button>
                            <button type="warn" size="mini" bindtap="toOut" data-item="{{item}}" wx:if="{{item.pay_status=='1'&&item.is_sign_end==false}}">退出比赛</button>
                        </view>
                    </view>
                </view>
            </scroll-view>
        </view>
    </view>
</mobile-main>
<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
    <view slot="info">
        <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
            <view class="one_1">
                <text>赛事名称：</text>
                <text>{{info.match_name||'暂无'}}</text>
            </view>
            <view class="one_1">
                <text>赛事组别：</text>
                <text>{{info.group_name||'暂无'}}</text>
            </view>
            <view class="one_1">
                <text>组别项目：</text>
                <text>{{info.project_name||'暂无'}}</text>
            </view>
            <view class="one_1">
                <text>比赛项目人数：</text>
                <text>{{info.project_num||0}}人</text>
            </view>
            <view class="one_1">
                <text>报名状态：</text>
                <text>{{info.status=='0'?'报名':info.status=='1'?'参赛':'退赛'}}</text>
            </view>
            <view class="one_1" wx:if="{{info.has_teammate==true}}">
                <text>组队成员：</text>
                <view class="list" wx:for="{{info.teammates}}" wx:key="item">
                    <view class="name"><text>队友姓名：</text>{{item.teammate_name}}</view>
                </view>
            </view>
            <view class="one_1">
                <text>支付状态：</text>
                <text>{{info.pay_status=='0'?'未支付':info.pay_status=='1'?'已支付':info.pay_status=='-1'?'支付失败':info.pay_status=='-2'?'申请退款':info.pay_status=='-3'?'已退款':'暂无'}}</text>
            </view>
        </view>
    </view>
</e-dialog>