<template>
    <view class="main">
        <!-- nav -->
        <navigation>{{ i18n.RechargeRecord }}</navigation>
        <!-- headBtn -->
        <view class="head">
            <view class="headItem" @click="pageState = 'coinRecharge'"
                :class="{ select: pageState === 'coinRecharge' }">
                {{ i18n.CoinRecharge }}
            </view>
            <view class="headItem" @click="pageState = 'cashRecharge'"
                :class="{ select: pageState === 'cashRecharge' }">
                {{ i18n.CashRecharge }}
            </view>
        </view>

        <view class="cardList">
            <view class="card" v-for="(item, index) in 4" :key="index">
                <!-- 卡片条件渲染 -->
                <!-- balance -->
                <card-header v-if="pageState === 'coinRecharge'" iconName="../../static/recharge/money-recive.png"
                    :title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
                </card-header>
                <view class="dataBody" v-if="pageState === 'coinRecharge'">
                    <view style="padding:20rpx 32rpx;">
                        <key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
                        <key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
                        <key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
                    </view>
                    <view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
                        <show-more>
                            <key-value-row :keyName="i18n.Address" :value="'dhiukyfdhi8797979870800'"></key-value-row>
                            <key-value-row :keyName="i18n.Hash" :value="'dhiukyfdhi8797979870800'"></key-value-row>
                            <view class="text">Postscript : ontact customer service on the top-left corner for identity
                                verific
                            </view>
                        </show-more>
                    </view>
                </view>


                <!-- contarct -->
                <card-header v-if="pageState === 'cashRecharge'" iconName="../../static/recharge/money-recive.png"
                    :title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
                </card-header>
                <view class="dataBody" v-if="pageState === 'cashRecharge'">
                    <view style="padding:20rpx 32rpx;">
                        <key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
                        <key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
                        <key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
                    </view>
                    <view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
                        <show-more>
                            <key-value-row :keyName="i18n.USDTRate" :value="'19298'"></key-value-row>
                            <key-value-row :keyName="i18n.USDT" :value="'298237'"></key-value-row>
                            <view class="text">Postscript : ontact customer service on the top-left corner for identity
                                verific
                            </view>
                        </show-more>
                    </view>

                </view>



            </view>
        </view>
    </view>
</template>

<script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
import ShowMore from '../../components/showMore/showMore.vue';
export default {
    components: { KeyValueRow, CardHeader, ShowMore },
    name: "rechargeRecord",
    data() {
        return {
            pageState: 'coinRecharge',
        };
    },
    computed: {
        i18n() {
            return this.$t("recharge");
        },
    },
    onLoad() {
    },
    onShow() { },
    methods: {
        change(e) {
            console.log(e);
        }

    },
}
</script>

<style lang="scss" scoped>
.main {

    .head {
        margin-top: 200rpx;
        margin-left: 60rpx;
        width: 632rpx;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 48rpx 0;

        .headItem {
            width: 300rpx;
            height: 68rpx;
            line-height: 68rpx;
            background: #211F32;
            border-radius: 16rpx;
            text-align: center;
            font-size: 32rpx;
            color: #A1A0A8;

            &.select {
                background: #00E8A2;
                color: #15141F;
            }

        }
    }

    .cardList {
        padding-bottom: 40rpx;

        .card {
            overflow: hidden;
            background: #211F32;
            border-radius: 32rpx;
            margin: 0 32rpx 32rpx;



            .dataBody {
                box-sizing: border-box;

                .text {
                    margin-top: 20rpx;
                    padding: 10rpx 16rpx;
                    background: #323045;
                    border-radius: 8rpx;
                    font-size: 24rpx;
                    color: #A1A0A8;
                }

            }

        }
    }

}
</style>
