<template>
    <div class="withdrawal">
        <!-- 表格 -->
        <el-table v-loading="loading" :data="payList">
            <el-table-column label="用户编号" align="center" prop="userId" />
            <el-table-column label="姓名" align="center" prop="name" />
            <el-table-column label="账户余额" align="center" prop="balance" />
            <el-table-column label="可提现余额" align="center" prop="availableBalance" />
            <el-table-column label="支付宝账户" align="center" prop="alipay" />
            <el-table-column label="银行账户" align="center" prop="bankAccount" />
            <el-table-column label="开户行" align="center" prop="bankDeposit" />
        </el-table>
        <!-- 分页符 -->
        <pagination
            v-show="total > 0"
            :total="total"
            :page.sync="queryParam.pageNum"
            :limit.sync="queryParam.pageSize"
            @pagination="getList"
        />
    </div>
</template>

<script>
import { userAccount } from '@/api/pay/withdrawal'
export default {
    name: 'withdrawal',
    data() {
        return {
            loading: false, //列表loading加载
            payList: [], //支付列表
            total: 0,
            queryParam: {
                pageNum: 1,
                pageSize: 10,
            },
        }
    },
    created() {
        this.getList()
    },
    mounted() {},
    methods: {
        // 获取列表
        async getList() {
            try {
                this.loading = true
                const res = await userAccount(this.queryParam)
                this.total = res.total
                this.payList = res.rows
                this.loading = false
            } catch (error) {
                this.loading = false
            }
        },
    },
}
</script>

<style scoped lang="scss">
.withdrawal {
    padding: 20px;
    box-sizing: border-box;
}
</style>