<template>
    <view class="cm-activity-info">
        <template v-if="productInfo.activeStatus == 1">
            <view class="ladder-main clearfix">
                <view class="ladder-item">
                    <view class="ladder-item-td">购买数</view> <view class="ladder-item-td">价格</view>
                </view>
                <view class="ladder-item" v-for="(ladd, index) in productInfo.ladderList" :key="index">
                    <view class="ladder-item-td">{{ ladd.buyNum }}</view>
                    <view class="ladder-item-td">{{ ladd.buyPrice | priceFormat }}</view>
                </view>
            </view>
        </template>
    </view>
</template>

<script>
export default {
    props: {
        productInfo: {
            type: Object,
            default: () => {}
        }
    },
    filters: {
        priceFormat(price) {
            return Number(price).toFixed(2)
        }
    }
}
</script>

<style lang="scss" scoped>
.ladder-main {
    width: 100%;
    border: 1px solid rgba(225, 86, 22, 0.3);
    border-radius: 10rpx;
    box-sizing: border-box;
    .ladder-item {
        width: 100%;
        height: 80rpx;
        float: left;
        border-bottom: 1px solid rgba(225, 86, 22, 0.3);
        &:nth-child(1) {
            .ladder-item-td {
                color: #333333;
            }
        }
        &:last-child {
            border-bottom: none;
        }
        .ladder-item-td {
            width: 50%;
            text-align: center;
            line-height: 80rpx;
            font-size: 24rpx;
            color: #333;
            box-sizing: border-box;
            float: left;
            &:nth-child(1) {
                border-right: 1px solid rgba(225, 86, 22, 0.3);
            }
        }
    }
}
</style>
