feat(webDev): add inquiry modal for pricing plans

This commit introduces a 'Contact Sales' modal on the web development page, allowing users to inquire about specific service plans.

- The pricing plan buttons now trigger this modal, pre-filled with the selected plan's details.
- Users can add custom remarks to their inquiry.
- On submission, a pre-formatted message is generated and opened in WhatsApp using a new `useWhatsAppMsgSender` composable.
- Adds `NUXT_PUBLIC_WHATSAPP_NUMBER` to the runtime configuration.
- Refactors content validation by introducing Zod schemas for `PricingPlan` and `Button` props to improve type safety.
- Adds new i18n keys for the modal interface and message templates.
This commit is contained in:
xiaomai
2025-11-07 11:04:14 +08:00
parent 40b3ee147f
commit ccfd268682
14 changed files with 393 additions and 40 deletions

View File

@@ -52,6 +52,11 @@
}
}
}
},
"button": {
"cancel": "Cancel",
"submit": "Submit",
"saving": "Saving..."
}
}
}

View File

@@ -4,5 +4,15 @@
"featuredProjects": {
"viewDemo": "Visit Site"
}
},
"webDev": {
"know_more_description": "I need to know more about the pricing and service about {plan} plan.",
"know_more_title": "Know more {plan} plan",
"contact_intro": "Hi — I'd like to learn more about {service} {plan} plan.",
"which_provides": "Which provides:",
"extra_remarks_title": "Besides that, I'd like to add:",
"remarks_placeholder": "Enter your remarks or requirements, one per line",
"loading_plan": "Loading plan...",
"whatsapp_message": "Hello! Im interested in the **{plan}** plan under your **{service}** service.\n\nHere are the plan details:\n💰 Price: {price}\n✨ Key Features:\n{featureList}\nAdditionally, I would like to request:\n{remarkList}\nPlease provide more detailed information. Thank you!"
}
}

View File

@@ -52,6 +52,11 @@
}
}
}
},
"button": {
"cancel": "取消",
"submit": "提交",
"saving": "保存..."
}
}
}

View File

@@ -4,5 +4,15 @@
"featuredProjects": {
"viewDemo": "访问页面"
}
},
"webDev": {
"know_more_description": "我需要了解有关 {plan} 的定价和服务的更多信息。",
"know_more_title": "了解更多{plan}",
"contact_intro": "你好——我想了解更多关于 {service} {plan}",
"which_provides": "其中包含:",
"extra_remarks_title": "除此之外,我还想补充:",
"remarks_placeholder": "输入您的备注或要求,每行一个",
"loading_plan": "配套加载中。。。",
"whatsapp_message": "您好!我对您的【{service}】服务中的【{plan}】方案感兴趣。\n\n方案详情\n💰 价格:{price}\n✨ 主要功能:\n{featureList}\n另外我还需要\n{remarkList}\n请提供更多详细信息谢谢"
}
}