const __sfc__ = defineComponent({
    data() {
        return {
            username: '',
            password: '',
            isModalVisible: false,
            modalTitle: '',
            modalContent: '' // 弹窗内容
        };
    },
    methods: {
        // 处理登录逻辑
        handleLogin() {
            if (!this.username || !this.password) {
                uni.showToast({ title: '请输入账号和密码', icon: 'none' });
                return;
            }
            uni.showToast({ title: '登录成功', icon: 'success' });
            uni.navigateTo({ url: '/pages/home/home' });
        },
        // 显示弹窗
        showModal(type) {
            if (type === 'userAgreement') {
                this.modalTitle = '用户协议';
                this.modalContent = '这是用户协议内容...';
            }
            else if (type === 'privacyPolicy') {
                this.modalTitle = '隐私政策';
                this.modalContent = '这是隐私政策内容...';
            }
            this.isModalVisible = true;
        },
        // 关闭弹窗
        closeModal() {
            this.isModalVisible = false;
        }
    }
});
export default __sfc__;
function GenPagesIndexLoginRender(this: InstanceType<typeof __sfc__>): any | null {
    const _ctx = this;
    const _cache = this.$.renderCache;
    const _component_uni_easyinput = resolveEasyComponent("uni-easyinput", _easycom_uni_easyinput);
    const _component_radio = resolveComponent("radio");
    return createElementVNode("view", utsMapOf({ class: "login-container" }), [
        createElementVNode("view", utsMapOf({ class: "welcome" }), [
            createElementVNode("text", utsMapOf({ class: "welcome-text" }), "欢迎登陆车辆合同生成")
        ]),
        createElementVNode("view", utsMapOf({ class: "input-container" }), [
            createVNode(_component_uni_easyinput, utsMapOf({
                prefixIcon: "person",
                class: "input",
                placeholder: "请输入您的账号",
                modelValue: _ctx.username,
                "onUpdate:modelValue": $event => { (_ctx.username) = $event; },
                inputBorder: false
            }), null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue"]),
            createElementVNode("view", utsMapOf({ class: "underline" }))
        ]),
        createElementVNode("view", utsMapOf({ class: "input-container" }), [
            createVNode(_component_uni_easyinput, utsMapOf({
                prefixIcon: "locked",
                class: "input",
                type: "password",
                placeholder: "请输入您的密码",
                modelValue: _ctx.password,
                "onUpdate:modelValue": $event => { (_ctx.password) = $event; },
                inputBorder: false
            }), null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue"]),
            createElementVNode("view", utsMapOf({ class: "underline" }))
        ]),
        createElementVNode("view", utsMapOf({ class: "agreement" }), [
            createVNode(_component_radio, utsMapOf({
                class: "login-agree",
                value: "r1",
                checked: false,
                style: normalizeStyle(utsMapOf({ "transform": "scale(0.7)", "margin-right": "15px" }))
            }), utsMapOf({
                default: withSlotCtx((): any[] => ["登录即代表同意 "]),
                _: 1 /* STABLE */
            }), 8 /* PROPS */, ["style"]),
            createElementVNode("text", utsMapOf({
                class: "link",
                onClick: () => { _ctx.showModal('userAgreement'); }
            }), "《用户协议》", 8 /* PROPS */, ["onClick"]),
            createElementVNode("text", utsMapOf({ class: "link" }), "与"),
            createElementVNode("text", utsMapOf({
                class: "link",
                onClick: () => { _ctx.showModal('privacyPolicy'); }
            }), "《隐私政策》", 8 /* PROPS */, ["onClick"])
        ]),
        createElementVNode("view", utsMapOf({ class: "button_container" }), [
            createElementVNode("button", utsMapOf({
                class: "login-button",
                onClick: _ctx.handleLogin
            }), "登陆", 8 /* PROPS */, ["onClick"])
        ]),
        isTrue(_ctx.isModalVisible)
            ? createElementVNode("view", utsMapOf({
                key: 0,
                class: "modal"
            }), [
                createElementVNode("view", utsMapOf({ class: "modal-content" }), [
                    createElementVNode("view", utsMapOf({ class: "modal-header" }), [
                        createElementVNode("text", null, toDisplayString(_ctx.modalTitle), 1 /* TEXT */),
                        createElementVNode("text", utsMapOf({
                            class: "close",
                            onClick: _ctx.closeModal
                        }), "×", 8 /* PROPS */, ["onClick"])
                    ]),
                    createElementVNode("view", utsMapOf({ class: "modal-body" }), [
                        createElementVNode("text", null, toDisplayString(_ctx.modalContent), 1 /* TEXT */)
                    ])
                ])
            ])
            : createCommentVNode("v-if", true)
    ]);
}
const GenPagesIndexLoginStyles = [utsMapOf([["login-container", padStyleMapOf(utsMapOf([["display", "flex"], ["flexDirection", "column"], ["alignItems", "center"], ["paddingTop", 40], ["paddingRight", 20], ["paddingBottom", 40], ["paddingLeft", 20], ["backgroundColor", "#ffffff"]]))], ["welcome", padStyleMapOf(utsMapOf([["height", "50%"], ["marginBottom", 40], ["display", "flex"], ["alignItems", "center"]]))], ["welcome-text", padStyleMapOf(utsMapOf([["fontSize", 20], ["fontWeight", "bold"], ["color", "#044f7a"]]))], ["input-container", padStyleMapOf(utsMapOf([["width", "100%"]]))], ["input", padStyleMapOf(utsMapOf([["width", "70%"], ["height", 40], ["fontSize", 16], ["borderWidth", "medium"], ["borderStyle", "none"], ["borderColor", "#000000"], ["outline", "none"], ["backgroundColor", "rgba(0,0,0,0)"]]))], ["underline", padStyleMapOf(utsMapOf([["width", "100%"], ["height", 1], ["backgroundColor", "#f2f2f2"], ["marginTop", 5]]))], ["agreement", padStyleMapOf(utsMapOf([["fontSize", 14], ["color", "#666666"], ["marginBottom", 20], ["display", "flex"], ["flexDirection", "row"]]))], ["login-agree", padStyleMapOf(utsMapOf([["fontSize", "16rpx"]]))], ["link", padStyleMapOf(utsMapOf([["color", "#007aff"], ["textDecoration", "underline"], ["fontSize", "16rpx"]]))], ["button_container", padStyleMapOf(utsMapOf([["width", "70%"], ["height", "40%"], ["display", "flex"], ["alignItems", "center"]]))], ["login-button", padStyleMapOf(utsMapOf([["width", "70%"], ["height", "70rpx"], ["lineHeight", "70rpx"], ["backgroundColor", "#044f7a"], ["color", "#ffffff"], ["borderWidth", "medium"], ["borderStyle", "none"], ["borderColor", "#000000"], ["borderRadius", 4], ["fontSize", 16], ["position", "absolute"], ["top", "15%"], ["left", "20%"]]))], ["modal", padStyleMapOf(utsMapOf([["position", "fixed"], ["top", 0], ["left", 0], ["width", "100%"], ["height", "100%"], ["backgroundColor", "rgba(0,0,0,0.5)"], ["display", "flex"], ["justifyContent", "center"], ["alignItems", "center"]]))], ["modal-content", padStyleMapOf(utsMapOf([["width", "80%"], ["backgroundColor", "#ffffff"], ["borderRadius", 8], ["paddingTop", 20], ["paddingRight", 20], ["paddingBottom", 20], ["paddingLeft", 20]]))], ["modal-header", padStyleMapOf(utsMapOf([["display", "flex"], ["justifyContent", "space-between"], ["alignItems", "center"], ["fontSize", 18], ["fontWeight", "bold"], ["marginBottom", 15]]))], ["close", padStyleMapOf(utsMapOf([["fontSize", 24], ["cursor", "pointer"]]))], ["modal-body", padStyleMapOf(utsMapOf([["fontSize", 16], ["lineHeight", 1.5]]))]])];
import _easycom_uni_easyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue';
//# sourceMappingURL=login.uvue.map