<template>
    <div class="list">
        <record-order
            v-for="(item, index) in list"
            :key="index"
            :info="item"
            :status="status"
            :auditAmount="auditAmount"
            :amount="amount"
        ></record-order>
        <!-- <record-order></record-order> -->
    </div>
</template>
<script>
import { mapState } from 'pinia'
import { useUserStore } from '@/stores/user'
import recordOrder from '@/components/RecordOrder.vue'
export default {
    name: 'commissionRecordListPage',
    data() {
        return {
            list: [],
            status: '',
            amount: 0,
            auditAmount: 0
        }
    },
    computed: {
        ...mapState(useUserStore, ['user'])
    },
    mounted() {
        this.$http.post('/withdrawApply/detail/' + this.$route.query.id).then(res => {
            this.list = res.commissionOrders
            this.status = res.status
            if (res.amount) {
                this.amount = res.amount
            }
            if (res.auditAmount) {
                this.auditAmount = res.auditAmount
            }
        })
    },
    components: {
        recordOrder
    }
}
</script>
<style lang="less" scoped>
.list {
    padding: 15px;
}
</style>
