import { defineComponent, ref, reactive, resolveComponent, mergeProps, withCtx, createVNode, unref, createTextVNode, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderComponent } from 'vue/server-renderer'; import { message } from 'ant-design-vue'; import { a as _export_sfc, c as useHead } from './server.mjs'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import 'better-sqlite3'; import 'vue-router'; import '@babel/runtime/helpers/esm/extends'; import 'stylis'; import 'dayjs'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/plugins'; import 'unhead/utils'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "contact", __ssrInlineRender: true, setup(__props) { useHead({ title: "联系我们 - 广西决策咨询网" }); const submitting = ref(false); const form = reactive({ name: "", phone: "", organization: "", type: void 0, content: "" }); const rules = { name: [{ required: true, message: "请输入您的姓名" }], phone: [{ required: true, message: "请输入联系电话" }], content: [{ required: true, message: "请输入咨询内容" }] }; async function handleSubmit() { if (!form.name || !form.phone || !form.content) { message.warning("请填写必填项"); return; } submitting.value = true; try { await new Promise((resolve) => setTimeout(resolve, 500)); message.success("咨询已提交,我们会尽快与您联系!"); handleReset(); } catch (e) { message.error(e?.message || "提交失败"); } finally { submitting.value = false; } } function handleReset() { Object.assign(form, { name: "", phone: "", organization: "", type: void 0, content: "" }); } return (_ctx, _push, _parent, _attrs) => { const _component_a_row = resolveComponent("a-row"); const _component_a_col = resolveComponent("a-col"); const _component_a_tooltip = resolveComponent("a-tooltip"); const _component_a_form = resolveComponent("a-form"); const _component_a_form_item = resolveComponent("a-form-item"); const _component_a_input = resolveComponent("a-input"); const _component_a_select = resolveComponent("a-select"); const _component_a_select_option = resolveComponent("a-select-option"); const _component_a_textarea = resolveComponent("a-textarea"); const _component_a_space = resolveComponent("a-space"); const _component_a_button = resolveComponent("a-button"); _push(`
请填写您的咨询内容,我们将尽快与您联系
`); _push3(ssrRenderComponent(_component_a_form, { layout: "vertical", model: unref(form), rules, class: "contact-form" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_row, { gutter: 16 }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(ssrRenderComponent(_component_a_col, { xs: 24, md: 12 }, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(ssrRenderComponent(_component_a_form_item, { label: "姓名", name: "name" }, { default: withCtx((_6, _push7, _parent7, _scopeId6) => { if (_push7) { _push7(ssrRenderComponent(_component_a_input, { value: unref(form).name, "onUpdate:value": ($event) => unref(form).name = $event, placeholder: "请输入您的姓名", size: "large" }, null, _parent7, _scopeId6)); } else { return [ createVNode(_component_a_input, { value: unref(form).name, "onUpdate:value": ($event) => unref(form).name = $event, placeholder: "请输入您的姓名", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent6, _scopeId5)); } else { return [ createVNode(_component_a_form_item, { label: "姓名", name: "name" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).name, "onUpdate:value": ($event) => unref(form).name = $event, placeholder: "请输入您的姓名", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]; } }), _: 1 }, _parent5, _scopeId4)); _push5(ssrRenderComponent(_component_a_col, { xs: 24, md: 12 }, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(ssrRenderComponent(_component_a_form_item, { label: "联系电话", name: "phone" }, { default: withCtx((_6, _push7, _parent7, _scopeId6) => { if (_push7) { _push7(ssrRenderComponent(_component_a_input, { value: unref(form).phone, "onUpdate:value": ($event) => unref(form).phone = $event, placeholder: "请输入联系电话", size: "large" }, null, _parent7, _scopeId6)); } else { return [ createVNode(_component_a_input, { value: unref(form).phone, "onUpdate:value": ($event) => unref(form).phone = $event, placeholder: "请输入联系电话", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent6, _scopeId5)); } else { return [ createVNode(_component_a_form_item, { label: "联系电话", name: "phone" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).phone, "onUpdate:value": ($event) => unref(form).phone = $event, placeholder: "请输入联系电话", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]; } }), _: 1 }, _parent5, _scopeId4)); } else { return [ createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "姓名", name: "name" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).name, "onUpdate:value": ($event) => unref(form).name = $event, placeholder: "请输入您的姓名", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }), createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "联系电话", name: "phone" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).phone, "onUpdate:value": ($event) => unref(form).phone = $event, placeholder: "请输入联系电话", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }) ]; } }), _: 1 }, _parent4, _scopeId3)); _push4(ssrRenderComponent(_component_a_row, { gutter: 16 }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(ssrRenderComponent(_component_a_col, { xs: 24, md: 12 }, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(ssrRenderComponent(_component_a_form_item, { label: "单位/组织", name: "organization" }, { default: withCtx((_6, _push7, _parent7, _scopeId6) => { if (_push7) { _push7(ssrRenderComponent(_component_a_input, { value: unref(form).organization, "onUpdate:value": ($event) => unref(form).organization = $event, placeholder: "请输入单位或组织名称", size: "large" }, null, _parent7, _scopeId6)); } else { return [ createVNode(_component_a_input, { value: unref(form).organization, "onUpdate:value": ($event) => unref(form).organization = $event, placeholder: "请输入单位或组织名称", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent6, _scopeId5)); } else { return [ createVNode(_component_a_form_item, { label: "单位/组织", name: "organization" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).organization, "onUpdate:value": ($event) => unref(form).organization = $event, placeholder: "请输入单位或组织名称", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]; } }), _: 1 }, _parent5, _scopeId4)); _push5(ssrRenderComponent(_component_a_col, { xs: 24, md: 12 }, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(ssrRenderComponent(_component_a_form_item, { label: "咨询类型", name: "type" }, { default: withCtx((_6, _push7, _parent7, _scopeId6) => { if (_push7) { _push7(ssrRenderComponent(_component_a_select, { value: unref(form).type, "onUpdate:value": ($event) => unref(form).type = $event, placeholder: "请选择咨询类型", size: "large" }, { default: withCtx((_7, _push8, _parent8, _scopeId7) => { if (_push8) { _push8(ssrRenderComponent(_component_a_select_option, { value: "consult" }, { default: withCtx((_8, _push9, _parent9, _scopeId8) => { if (_push9) { _push9(`咨询服务`); } else { return [ createTextVNode("咨询服务") ]; } }), _: 1 }, _parent8, _scopeId7)); _push8(ssrRenderComponent(_component_a_select_option, { value: "expert" }, { default: withCtx((_8, _push9, _parent9, _scopeId8) => { if (_push9) { _push9(`专家申请`); } else { return [ createTextVNode("专家申请") ]; } }), _: 1 }, _parent8, _scopeId7)); _push8(ssrRenderComponent(_component_a_select_option, { value: "member" }, { default: withCtx((_8, _push9, _parent9, _scopeId8) => { if (_push9) { _push9(`会员申请`); } else { return [ createTextVNode("会员申请") ]; } }), _: 1 }, _parent8, _scopeId7)); _push8(ssrRenderComponent(_component_a_select_option, { value: "cooperation" }, { default: withCtx((_8, _push9, _parent9, _scopeId8) => { if (_push9) { _push9(`商务合作`); } else { return [ createTextVNode("商务合作") ]; } }), _: 1 }, _parent8, _scopeId7)); _push8(ssrRenderComponent(_component_a_select_option, { value: "other" }, { default: withCtx((_8, _push9, _parent9, _scopeId8) => { if (_push9) { _push9(`其他`); } else { return [ createTextVNode("其他") ]; } }), _: 1 }, _parent8, _scopeId7)); } else { return [ createVNode(_component_a_select_option, { value: "consult" }, { default: withCtx(() => [ createTextVNode("咨询服务") ]), _: 1 }), createVNode(_component_a_select_option, { value: "expert" }, { default: withCtx(() => [ createTextVNode("专家申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "member" }, { default: withCtx(() => [ createTextVNode("会员申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "cooperation" }, { default: withCtx(() => [ createTextVNode("商务合作") ]), _: 1 }), createVNode(_component_a_select_option, { value: "other" }, { default: withCtx(() => [ createTextVNode("其他") ]), _: 1 }) ]; } }), _: 1 }, _parent7, _scopeId6)); } else { return [ createVNode(_component_a_select, { value: unref(form).type, "onUpdate:value": ($event) => unref(form).type = $event, placeholder: "请选择咨询类型", size: "large" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: "consult" }, { default: withCtx(() => [ createTextVNode("咨询服务") ]), _: 1 }), createVNode(_component_a_select_option, { value: "expert" }, { default: withCtx(() => [ createTextVNode("专家申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "member" }, { default: withCtx(() => [ createTextVNode("会员申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "cooperation" }, { default: withCtx(() => [ createTextVNode("商务合作") ]), _: 1 }), createVNode(_component_a_select_option, { value: "other" }, { default: withCtx(() => [ createTextVNode("其他") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent6, _scopeId5)); } else { return [ createVNode(_component_a_form_item, { label: "咨询类型", name: "type" }, { default: withCtx(() => [ createVNode(_component_a_select, { value: unref(form).type, "onUpdate:value": ($event) => unref(form).type = $event, placeholder: "请选择咨询类型", size: "large" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: "consult" }, { default: withCtx(() => [ createTextVNode("咨询服务") ]), _: 1 }), createVNode(_component_a_select_option, { value: "expert" }, { default: withCtx(() => [ createTextVNode("专家申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "member" }, { default: withCtx(() => [ createTextVNode("会员申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "cooperation" }, { default: withCtx(() => [ createTextVNode("商务合作") ]), _: 1 }), createVNode(_component_a_select_option, { value: "other" }, { default: withCtx(() => [ createTextVNode("其他") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]; } }), _: 1 }, _parent5, _scopeId4)); } else { return [ createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "单位/组织", name: "organization" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).organization, "onUpdate:value": ($event) => unref(form).organization = $event, placeholder: "请输入单位或组织名称", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }), createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "咨询类型", name: "type" }, { default: withCtx(() => [ createVNode(_component_a_select, { value: unref(form).type, "onUpdate:value": ($event) => unref(form).type = $event, placeholder: "请选择咨询类型", size: "large" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: "consult" }, { default: withCtx(() => [ createTextVNode("咨询服务") ]), _: 1 }), createVNode(_component_a_select_option, { value: "expert" }, { default: withCtx(() => [ createTextVNode("专家申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "member" }, { default: withCtx(() => [ createTextVNode("会员申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "cooperation" }, { default: withCtx(() => [ createTextVNode("商务合作") ]), _: 1 }), createVNode(_component_a_select_option, { value: "other" }, { default: withCtx(() => [ createTextVNode("其他") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }) ]; } }), _: 1 }, _parent4, _scopeId3)); _push4(ssrRenderComponent(_component_a_form_item, { label: "咨询内容", name: "content" }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(ssrRenderComponent(_component_a_textarea, { value: unref(form).content, "onUpdate:value": ($event) => unref(form).content = $event, rows: 5, placeholder: "请详细描述您的咨询内容...", maxlength: 1e3, "show-count": "", size: "large" }, null, _parent5, _scopeId4)); } else { return [ createVNode(_component_a_textarea, { value: unref(form).content, "onUpdate:value": ($event) => unref(form).content = $event, rows: 5, placeholder: "请详细描述您的咨询内容...", maxlength: 1e3, "show-count": "", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent4, _scopeId3)); _push4(ssrRenderComponent(_component_a_form_item, null, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(ssrRenderComponent(_component_a_space, null, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(ssrRenderComponent(_component_a_button, { type: "primary", size: "large", onClick: handleSubmit, loading: unref(submitting) }, { default: withCtx((_6, _push7, _parent7, _scopeId6) => { if (_push7) { _push7(` 提交咨询 `); } else { return [ createTextVNode(" 提交咨询 ") ]; } }), _: 1 }, _parent6, _scopeId5)); _push6(ssrRenderComponent(_component_a_button, { size: "large", onClick: handleReset }, { default: withCtx((_6, _push7, _parent7, _scopeId6) => { if (_push7) { _push7(` 重置 `); } else { return [ createTextVNode(" 重置 ") ]; } }), _: 1 }, _parent6, _scopeId5)); } else { return [ createVNode(_component_a_button, { type: "primary", size: "large", onClick: handleSubmit, loading: unref(submitting) }, { default: withCtx(() => [ createTextVNode(" 提交咨询 ") ]), _: 1 }, 8, ["loading"]), createVNode(_component_a_button, { size: "large", onClick: handleReset }, { default: withCtx(() => [ createTextVNode(" 重置 ") ]), _: 1 }) ]; } }), _: 1 }, _parent5, _scopeId4)); } else { return [ createVNode(_component_a_space, null, { default: withCtx(() => [ createVNode(_component_a_button, { type: "primary", size: "large", onClick: handleSubmit, loading: unref(submitting) }, { default: withCtx(() => [ createTextVNode(" 提交咨询 ") ]), _: 1 }, 8, ["loading"]), createVNode(_component_a_button, { size: "large", onClick: handleReset }, { default: withCtx(() => [ createTextVNode(" 重置 ") ]), _: 1 }) ]), _: 1 }) ]; } }), _: 1 }, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_row, { gutter: 16 }, { default: withCtx(() => [ createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "姓名", name: "name" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).name, "onUpdate:value": ($event) => unref(form).name = $event, placeholder: "请输入您的姓名", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }), createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "联系电话", name: "phone" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).phone, "onUpdate:value": ($event) => unref(form).phone = $event, placeholder: "请输入联系电话", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }), createVNode(_component_a_row, { gutter: 16 }, { default: withCtx(() => [ createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "单位/组织", name: "organization" }, { default: withCtx(() => [ createVNode(_component_a_input, { value: unref(form).organization, "onUpdate:value": ($event) => unref(form).organization = $event, placeholder: "请输入单位或组织名称", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }), createVNode(_component_a_col, { xs: 24, md: 12 }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "咨询类型", name: "type" }, { default: withCtx(() => [ createVNode(_component_a_select, { value: unref(form).type, "onUpdate:value": ($event) => unref(form).type = $event, placeholder: "请选择咨询类型", size: "large" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: "consult" }, { default: withCtx(() => [ createTextVNode("咨询服务") ]), _: 1 }), createVNode(_component_a_select_option, { value: "expert" }, { default: withCtx(() => [ createTextVNode("专家申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "member" }, { default: withCtx(() => [ createTextVNode("会员申请") ]), _: 1 }), createVNode(_component_a_select_option, { value: "cooperation" }, { default: withCtx(() => [ createTextVNode("商务合作") ]), _: 1 }), createVNode(_component_a_select_option, { value: "other" }, { default: withCtx(() => [ createTextVNode("其他") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }), createVNode(_component_a_form_item, { label: "咨询内容", name: "content" }, { default: withCtx(() => [ createVNode(_component_a_textarea, { value: unref(form).content, "onUpdate:value": ($event) => unref(form).content = $event, rows: 5, placeholder: "请详细描述您的咨询内容...", maxlength: 1e3, "show-count": "", size: "large" }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }), createVNode(_component_a_form_item, null, { default: withCtx(() => [ createVNode(_component_a_space, null, { default: withCtx(() => [ createVNode(_component_a_button, { type: "primary", size: "large", onClick: handleSubmit, loading: unref(submitting) }, { default: withCtx(() => [ createTextVNode(" 提交咨询 ") ]), _: 1 }, 8, ["loading"]), createVNode(_component_a_button, { size: "large", onClick: handleReset }, { default: withCtx(() => [ createTextVNode(" 重置 ") ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(`