<template>
    <van-popup
        round
        close-on-popstate
        safe-area-inset-bottom
        v-model:show="show"
        closeable
        position="bottom"
        :close-icon="require('@assets/icon_close.png')"
    >
        <div class="popup">
            <div class="title">
                <img src="@assets/icon-zhanghugauanli.png" alt="" />
                <span>绑定账户</span>
            </div>
            <van-form @submit="submit">
                <van-field
                    name="游戏昵称"
                    label="游戏昵称"
                    placeholder="请输入您的游戏昵称"
                    v-model="form.nickname"
                    :rules="[{ required: true, message: '请输入您的游戏昵称' }]"
                />
                <van-field
                    type="digit"
                    name="游戏营地"
                    label="游戏营地"
                    placeholder="请输入您的营地ID"
                    v-model="form.id"
                    :rules="[{ required: true, message: '请输入您的营地ID' }]"
                />
                <div class="tips">
                    <div class="text1">温馨提示</div>
                    <div class="text2">便于游戏公平性，校验官方数据，请认真填写王者荣耀昵称及王者营地1D账号</div>
                    <div class="text2">如误填将有可能导致赛事结算延迟，漏结算等</div>
                    <div class="text2">
                        注：王者营地ID账号将用于无法结算，对方恶意结算，乱提交赛事截图等。方便人工后续查询，请您打开王者营地个人战绩，谢谢配合
                    </div>
                </div>
                <div class="btn">
                    <van-button round block type="primary" native-type="submit">提交</van-button>
                </div>
            </van-form>
        </div>
    </van-popup>
</template>

<script>
export default {
    data() {
        return {
            show: true,
            form: {
                nickname: '',
                id: ''
            }
        };
    },
    methods: {
        submit() {}
    }
};
</script>

<style lang="less" scoped>
.title {
    .flex();
    img {
        width: 28px;
        height: 28px;
    }
    span {
        font-size: 14px;
        font-weight: bold;
        color: #ffffff;
        line-height: 24px;
        margin-left: 10px;
    }
    padding: 14px 16px 8px;
    border-bottom: 1px solid #313346;
}

/deep/.van-form {
    .van-field__label {
        color: #fff;
        width: 56px;
        margin-right: 12px;
    }
}

.tips {
    font-size: 12px;
    color: #6a6d83;
    line-height: 20px;
    padding: 20px 16px 60px;

    .text1 {
        padding-bottom: 2px;
    }
    .text2 + .text2 {
        margin-top: 20px;
    }
}

.btn {
    padding: 9px 28px;
    .bottom(9px);
}
</style>
