- Spring Boot 后端服务 (hss-home-service) - delivery-miniapp 配送小程序 - website 官网 (Nuxt) - docs 架构设计文档 - Docker 容器化部署配置 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
36 lines
2.7 KiB
JavaScript
36 lines
2.7 KiB
JavaScript
import { defineComponent, mergeProps, unref, useSSRContext } from "vue";
|
|
import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrIncludeBooleanAttr } from "vue/server-renderer";
|
|
import { u as useLeadForm } from "./useLeadForm-hNHTDEhY.js";
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "DownloadForm",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const { form, loading, success, error } = useLeadForm("download");
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "max-w-sm mx-auto" }, _attrs))}>`);
|
|
if (!unref(success)) {
|
|
_push(`<form class="space-y-4"><div><label class="block text-sm font-medium mb-1 text-left">姓名 <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).name)} class="w-full px-4 py-3 rounded-xl border border-gray-200 focus:border-primary focus:ring-2 focus:ring-primary-50 outline-none" placeholder="您的姓名"></div><div><label class="block text-sm font-medium mb-1 text-left">单位名称 <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).orgName)} class="w-full px-4 py-3 rounded-xl border border-gray-200 focus:border-primary focus:ring-2 focus:ring-primary-50 outline-none" placeholder="您所在的单位"></div><div><label class="block text-sm font-medium mb-1 text-left">手机号 <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).phone)} type="tel" class="w-full px-4 py-3 rounded-xl border border-gray-200 focus:border-primary focus:ring-2 focus:ring-primary-50 outline-none" placeholder="您的手机号"></div>`);
|
|
if (unref(error)) {
|
|
_push(`<p class="text-red-500 text-sm">${ssrInterpolate(unref(error))}</p>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`<button type="submit"${ssrIncludeBooleanAttr(unref(loading)) ? " disabled" : ""} class="w-full px-6 py-3 bg-primary text-white rounded-xl font-semibold hover:bg-primary-700 transition-colors disabled:opacity-50">${ssrInterpolate(unref(loading) ? "提交中..." : "获取方案资料")}</button></form>`);
|
|
} else {
|
|
_push(`<div class="text-center py-8"><p class="text-xl font-bold mb-2">📥 资料已提交获取申请</p><p class="text-sm text-text-secondary">我们将尽快将方案资料发送给您。</p></div>`);
|
|
}
|
|
_push(`</div>`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/DownloadForm.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
export {
|
|
_sfc_main as _
|
|
};
|
|
//# sourceMappingURL=DownloadForm-DWoM9wYa.js.map
|