<template>
    <div class="account">
        <div class="account-top">
            <van-image class="bg" width="100%" :src="require('@assets/account_bg.png')" fit="scale-down" />
            <div class="account-content">
                <van-image width="58" height="58" radius="2" :src="require('@assets/game_icon.png')" fit="cover" />
                <div class="title">王者荣耀</div>
                <div class="type-list">
                    <div class="type prim">QQ区</div>
                    <div class="type">微信区</div>
                </div>
            </div>
        </div>

        <div class="account-list">
            <div class="account-title">已绑定0个账号</div>
            <div class="account-box">
                <div class="account-info" v-for="i in 3" :key="i">
                    <van-image
                        width="44"
                        height="44"
                        fit="cover"
                        radius="4"
                        src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
                    />
                    <div class="account-right">
                        <div class="text1">奶盖</div>
                        <div class="text2">营地ID:7873837378</div>
                    </div>
                </div>
            </div>
        </div>

        <div class="bottom">
            <van-button type="primary" block>绑定账号</van-button>
        </div>

        <band-accound></band-accound>
    </div>
</template>

<script>
import BandAccound from '../../components/BandAccound.vue';
export default {
    components: { BandAccound }
};
</script>

<style lang="less" scoped>
.account {
    padding: 16px;
}
.account-top {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    .bg {
        position: relative;
        z-index: 0;
    }
    .account-content {
        position: absolute;
        z-index: 1;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        .flex-col();
        justify-content: center;
        align-items: center;
        .title {
            font-size: 14px;
            font-weight: bold;
            color: #ffffff;
            line-height: 24px;
            margin-top: 6px;
        }
        .type-list {
            .flex();
            width: 123px;
            height: 24px;
            background: #25283d;
            border-radius: 2px;
            overflow: hidden;
            margin-top: 24px;
            .type {
                font-size: 12px;
                color: #ffffff;
                line-height: 24px;
                width: 50%;
                text-align: center;
                border-radius: 2px;

                &.prim {
                    background: linear-gradient(225deg, #f6abf0 0%, #10f7ee 100%);
                    color: #1a1c2b;
                }
            }
        }
    }
}

.account-list {
    margin-top: 20px;
    background: #25283d;

    .account-title {
        height: 56px;
        border-radius: 4px;
        line-height: 56px;
        text-align: center;
        font-size: 14px;
        color: #ffffff;
        position: relative;
        &::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 16px;
            right: 16px;
            height: 1px;
            background: #313346;
        }
    }
}

.bottom {
    padding: 9px 28px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    .bottom(9px);
    background-color: @bg;
    z-index: 20;
}
.account-info {
    .flex();
    padding: 10px 16px;
    .account-right {
        flex-grow: 1;
        margin-left: 10px;
        .text1 {
            font-size: 14px;
            color: #ffffff;
            line-height: 24px;
        }
        .text2 {
            font-size: 12px;
            color: #6a6d83;
            line-height: 17px;
            margin-top: 3px;
        }
    }
}
.account-box {
    padding: 10px 0;
}
</style>
