实现用户咨询接口
This commit is contained in:
@@ -12,5 +12,10 @@ export async function submitInquiry(data: {
|
|||||||
usage: string
|
usage: string
|
||||||
purpose: string
|
purpose: string
|
||||||
}) {
|
}) {
|
||||||
return await callByDevice('/api/customization/submit', data)
|
return await callByDevice('/api/inquiry/create', {
|
||||||
|
company: data.company,
|
||||||
|
name: data.name,
|
||||||
|
phone: data.phone,
|
||||||
|
content: `[${data.usage}] ${data.purpose}`,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default function CustomPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scrollToForm = () => {
|
const scrollToForm = () => {
|
||||||
const formElement = document.getElementById('inquery-form')
|
const formElement = document.getElementById('inquiry-form')
|
||||||
if (formElement) {
|
if (formElement) {
|
||||||
formElement.scrollIntoView({behavior: 'smooth', block: 'start'})
|
formElement.scrollIntoView({behavior: 'smooth', block: 'start'})
|
||||||
}
|
}
|
||||||
@@ -78,11 +78,11 @@ export default function CustomPage() {
|
|||||||
<Wrap className="flex flex-col gap-16">
|
<Wrap className="flex flex-col gap-16">
|
||||||
{/* 1. 顶部介绍区 */}
|
{/* 1. 顶部介绍区 */}
|
||||||
<SelfDesc onInquiry={() => {
|
<SelfDesc onInquiry={() => {
|
||||||
document.getElementById('inquery-form')?.scrollIntoView({behavior: 'smooth', block: 'start'})
|
document.getElementById('inquiry-form')?.scrollIntoView({behavior: 'smooth', block: 'start'})
|
||||||
}}/>
|
}}/>
|
||||||
|
|
||||||
{/* 2. 表单区 */}
|
{/* 2. 表单区 */}
|
||||||
<section id="inquery-form" className="bg-white rounded-lg p-6 lg:p-12">
|
<section id="inquiry-form" className="bg-white rounded-lg p-6 lg:p-12">
|
||||||
<div className="text-center mb-8 lg:mb-12">
|
<div className="text-center mb-8 lg:mb-12">
|
||||||
<h2 className="text-2xl lg:text-3xl font-semibold">业务定制</h2>
|
<h2 className="text-2xl lg:text-3xl font-semibold">业务定制</h2>
|
||||||
<p className="text-gray-500 mt-2 text-sm lg:text-base">
|
<p className="text-gray-500 mt-2 text-sm lg:text-base">
|
||||||
|
|||||||
Reference in New Issue
Block a user