<template>
    <div>

        <el-table v-loading="loading" :data="userSignList" border>
            <el-table-column type="selection" width="55" align="center" />

            <el-table-column label="用户uid" align="center" prop="userId" />
            <el-table-column label="签到说明" align="center" prop="title" />
            <el-table-column label="获得积分" align="center" prop="number" />
            <el-table-column label="剩余积分" align="center" prop="balance" />
            <el-table-column label="添加时间" align="center" prop="isDel" />
            <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                <template slot-scope="scope">
                <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-edit"
                    @click="handleUpdate(scope.row)"
                    v-hasPermi="['store:userSign:edit']"
                >修改</el-button>
                <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-delete"
                    @click="handleDelete(scope.row)"
                    v-hasPermi="['store:userSign:remove']"
                >删除</el-button>
                </template>
            </el-table-column> -->
        </el-table>


        <pagination
            v-show="total>0"
            :total="total"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            @pagination="getList"
        />

    </div>

</template>

<script>
import { listUserSign } from "@/api/store/userSign";

    export default {
        //components: { productOrder  },
        name: "storeUserSign",
        data() {
            return {
               // 签到记录表格数据
                userSignList: [],
                statusOptions:[],
                // 遮罩层
                loading: true,
                // 总条数
                total: 0,
                // 查询参数
                queryParams: {
                    pageNum: 1,
                    pageSize: 10,
                    userId: null,
                    title: null,
                    number: null,
                    balance: null,
                    isDel: null
                },
            };
        },
        created() {
            this.getList();
        },
        methods: {
            getData(userId){
                this.queryParams.userId=userId;
                this.queryParams.pageNum=1;
                this.getList();
            },
            /** 查询签到记录列表 */
            getList() {
                    this.loading = true;
                    listUserSign(this.queryParams).then(response => {
                        this.userSignList = response.rows;
                        this.total = response.total;
                        this.loading = false;
                    });
            }
        }
    };
</script>


<style lang="scss" scoped>
</style>
