<script setup>
import {reactive, ref} from "vue";
import XInfoModal from "../../../components/XInfoModal.vue";
import XForm from "../../../components/XForm.vue";
import XFormItem from "../../../components/XFormItem.vue";
import XInput from "../../../components/XInput.vue";
import SendMsg from "../../../components/SendMsg.vue";

const XFormRef = ref();
const show = defineModel('show');
const rules = {};
const form = reactive({
    phone: null,
    verificationCode: null,
    password: null,
});

const success = () => {
    XFormRef.value.verify();
}
</script>

<template>
    <x-info-modal v-model:show="show" @success="success">
        <view class="title">修改密码</view>

        <x-form ref="XFormRef" :model="form" :rules="rules">
            <x-form-item label="手机号">
                <x-input height="72rpx" placeholder="微信号" v-model:model-value="form.phone"></x-input>
            </x-form-item>
            <x-form-item label="验证码">
                <send-msg height="72rpx" v-model:model-value="form.verificationCode"></send-msg>
            </x-form-item>
            <x-form-item label="新登录密码">
                <x-input height="72rpx" placeholder="新登录密码" v-model:model-value="form.password"></x-input>
            </x-form-item>
        </x-form>
    </x-info-modal>
</template>

<style scoped lang="scss">
.title {
    color: rgb(29, 33, 41);
    font-size: 32rpx;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
    text-align: center;
    margin-bottom: 20rpx;
}
</style>
