<!DOCTYPE html>
<div class="signrecord">
    <ks-title title="签到记录" :underline="false" />
    <div style="position: relative">
        <!-- <div class="coupon-sort">
            <el-select v-model="value" placeholder="请选择" size="small" @change="change">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </div> -->
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="我的签到记录" name="first">
                <div class="signrecord-title">
                    <el-row>
                        <el-col :span="3"><span>序号</span></el-col>
                        <el-col :span="7"><span>领取内容</span></el-col>
                        <el-col :span="7"><span>签到时间</span></el-col>
                        <el-col :span="7"><span>IP地址</span></el-col>
                    </el-row>
                </div>
                <div class="signrecord-list">
                    <el-row type="flex" v-for="(item,i) in signInList" :key="i">
                        <el-col :span="3" align="middle"><span>{{i+1}}</span></el-col>
                        <el-col :span="7" align="middle"> <span>{{item.score+item.unit}}</span> </el-col>
                        <el-col :span="7" align="middle"><span>{{item.adddate}}</span> </el-col>
                        <el-col :span="7" align="middle"> <span>{{item.userip}}</span> </el-col>
                    </el-row>
                    <el-pagination style="text-align: center;background: #fff;margin-top:20px;" background layout="prev, pager, next" :current-page="currentPage" :total="pageCount" @current-change="getSignInList" v-if="pageCount > 0" />
                    <ks-empty msg="该分类下暂无内容" v-else />
                </div>
            </el-tab-pane>
            <el-tab-pane label="签到排名" name="second">
                <div class="signrecord-title">
                    <el-row>
                        <el-col :span="3"><span>排名</span></el-col>
                        <el-col :span="7"><span>用户名</span></el-col>
                        <el-col :span="7"><span>签到次数</span></el-col>
                        <el-col :span="7"><span>今日签到状态</span></el-col>
                    </el-row>
                </div>
                <div class="signrecord-list">
                    <el-row type="flex" v-for="(item,i) in signInRankList" :key="i">
                        <el-col :span="3" align="middle">
                            <span v-if="i<9">{{currentPage-1}}{{i+1}}</span>
                            <span v-else>{{i+1}}</span>
                        </el-col>
                        <el-col :span="7" align="middle"> <span>{{item.username}}</span> </el-col>
                        <el-col :span="7" align="middle"><span>{{item.sign_count}}</span> </el-col>
                        <el-col :span="7" align="middle"> <span>{{item.sign_status_title}}</span> </el-col>
                    </el-row>
                    <el-pagination style="text-align: center;background: #fff;margin-top:20px;" background layout="prev, pager, next" :current-page="currentPage" :total="pageCount" @current-change="getUserSignInRanking" v-if="pageCount > 0" />
                            <ks-empty msg="该分类下暂无内容" v-else />
                </div>
            </el-tab-pane>
        </el-tabs>
    </div>
</div>