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

@@ -19,6 +19,11 @@ export default defineNuxtConfig({
"@nuxtjs/i18n",
"@nuxtjs/seo",
],
runtimeConfig: {
public: {
whatsappNumber: "+601234567890",
},
},
css: ["@/assets/css/main.css"],
app: {
head: {
@@ -36,7 +41,7 @@ export default defineNuxtConfig({
code: "en",
iso: "en-US",
name: "English",
files: ["en-US/common.json", "zh-CN/index.json"],
files: ["en-US/common.json", "en-US/index.json"],
},
{
code: "zh-CN",
@@ -45,7 +50,7 @@ export default defineNuxtConfig({
files: ["zh-CN/common.json", "zh-CN/index.json"],
},
],
strategy: "no_prefix"
strategy: "no_prefix",
},
seo: {
meta: {