<template>
    <!-- 顶部导航栏 -->
    <van-nav-bar class="navBar" :fixed="true">
            <template #left>
                <div @click="$router.go(-1)">
                    <van-icon name="cross" size="18" color="#333333"/>
                </div>
            </template>
            <template #right>
                <van-icon name="ellipsis" size="18" color="#333333"/>
            </template>
    </van-nav-bar>
    <div class="content">
        <div class="gift_confirmation">赠送确认</div>
        <div class="gift_confirmation_tip">通过手机号码检索用户信息，确认赠送后该加密作品将会被转移</div>
        <div class="gift_confirmation_information">
            <div class="gift_confirmation_information_title">用户信息</div>
            <van-divider />
            <div class="gift_confirmation_information_con">
                <img :src="require('@assets/data_display.png')" alt="" class="gift_confirmation_information_con_img">
                <div>
                    <div class="gift_confirmation_information_con_name">用户昵称</div>
                    <div class="gift_confirmation_information_con_phone">手机号码&nbsp;12346777811</div>
                </div>
            </div>
        </div>
        <div class="transaction_password">
            <div class="transaction_password_one">
                <div class="transaction_password_one_title">请输入交易密码</div>
                <div class="transaction_password_forget">
                    忘记密码
                    <van-divider />
                </div>
            </div>
            <van-divider />
            <!-- 密码输入框 -->
            <van-password-input
            :value="value"
            :gutter="10"
            :focused="showKeyboard"
            @focus="showKeyboard = true"
            />
            <!-- 数字键盘 -->
            <van-number-keyboard
            v-model="value"
            :show="showKeyboard"
            @blur="showKeyboard = false"
            />
        </div>
        <div class="additional_costs">
            <div class="additional_costs_left">GAS费用</div>
            <div class="additional_costs_right">¥1</div>
        </div>
        <div class="payment_method">
            <div class="payment_method_con">
                <div class="payment_method_con_left">
                    <img :src="require('@assets/zhifubao.png')" alt="" class="payment_method_img">
                    <div class="payment_method_title">支付宝</div>
                </div>
                <van-radio-group v-model="checked">
                    <van-radio name="1" icon-size="24px" checked-color="#28B6FF"></van-radio>
                </van-radio-group>
            </div>
            <van-divider class="fee_details_divider"/>
            <div class="payment_method_con">
                <div class="payment_method_con_left">
                    <img :src="require('@assets/weixin.png')" alt="" class="payment_method_img">
                    <div class="payment_method_title">微信</div>
                </div>
                <van-radio-group v-model="checked">
                    <van-radio name="2" icon-size="24px" checked-color="#28B6FF"></van-radio>
                </van-radio-group>
            </div>
        </div>  
    </div>
    <div class="gift_button">
        <div class="gift_button_cancel">取消</div>
        <div class="gift_button_payment">确认支付</div>
    </div>
</template>

<script>
import { ref } from 'vue';
export default {
    setup() {
        const value = ref('');
        const showKeyboard = ref(false);
        const checked = ref('1');
        return { 
            checked,
            value,
            showKeyboard
        };
    },
}
</script>

<style lang="less" scoped>
    .navBar{
        width: 100%;
        height: 44px;
    }
    .content{
        width: 100%;
        height: 100%;
        position: absolute;
        background: #0A0A1B;
        padding: 16px;
        box-sizing: border-box;
        margin-top: 44px;
        .gift_confirmation{
            font-size: 20px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            margin-bottom: 6px;
            color: #FFFFFF;
        }
        .gift_confirmation_tip{
            font-size: 12px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #939599;
            margin-bottom: 20px;
        }
        .gift_confirmation_information{
            width: 100%;
            height: 103px;
            background: #29293F;
            border-radius: 8px;
            padding: 10px;
            box-sizing: border-box;
            .gift_confirmation_information_title{
                font-size: 14px;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #FFFFFF;
                line-height: 24px;
                margin-bottom: 4px;
            }
            .gift_confirmation_information_con{
                margin-top: 8px;
                display: flex;
                .gift_confirmation_information_con_img{
                    width: 40px;
                    height: 40px;
                    border-radius: 65px;
                    margin-right: 10px;
                }
                .gift_confirmation_information_con_name{
                    font-size: 14px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #FFFFFF;
                    line-height: 24px;
                }
                .gift_confirmation_information_con_phone{
                    font-size: 12px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #939599;
                    line-height: 17px;
                }
            }
        }
        .transaction_password{
            width: 100%;
            height: 103px;
            background: #29293F;
            border-radius: 8px;
            padding: 10px;
            box-sizing: border-box;
            margin-top: 10px;
            .transaction_password_one{
                display: flex;
                justify-content: space-between;
                margin-bottom: 4px;
                .transaction_password_one_title{
                    font-size: 14px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #FFFFFF;
                }
                .transaction_password_forget{
                    width: 48px;
                    font-size: 12px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #939599;
                }
            }
            /deep/ .van-password-input{
                margin: 0;
                margin-top: 8px;
                .van-password-input__item{
                    width: 44px;
                    height: 44px;
                    background: rgba(10, 10, 27, 0.3);
                    border-radius: 8px;
                }
            }
        }
        .additional_costs{
            width: 100%;
            margin-top: 10px;
            background: #29293F;
            border-radius: 8px;
            padding: 12px 10px;
            box-sizing: border-box;
            display: flex;
            justify-content: space-between;
            .additional_costs_left{
                font-size: 14px;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #FFFFFF;
            }
            .additional_costs_right{
                font-size: 14px;
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #28B6FF;
            }
        }
        .payment_method{
            width: 100%;
            background: #29293F;
            border-radius: 8px;
            padding: 12px 10px;
            box-sizing: border-box;
            margin-top: 10px;
            .payment_method_con{
                display: flex;
                justify-content: space-between;
                font-size: 14px;
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #FFFFFF;
                .payment_method_con_left{
                    display: flex;
                    .payment_method_title{
                        margin-top: 2px;
                    }
                }
                .payment_method_img{
                    width: 24px;
                    height: 24px;
                    margin-right: 6px;
                }
            }
        }
        .fee_details_divider{
            margin: 10px 0;
        }
    }
    .gift_button{
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 56px;
        background: #15152D;
        padding: 8px 16px;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        .gift_button_cancel{
            width: 164px;
            height: 40px;
            border-radius: 8px;
            border: 1px solid #28B6FF;
            line-height: 40px;
            text-align: center;
            font-size: 16px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #28B6FF;
        }
        .gift_button_payment{
            width: 164px;
            height: 40px;
            background: #28B6FF;
            border-radius: 8px;
            font-size: 16px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #FFFFFF;
            text-align: center;
            line-height: 40px;
        }
    }
</style>