diff --git a/.gitignore b/.gitignore index 3d379e0..2b3446a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules/ dist/ +docs/ apps/*/dist/ .env .env.local diff --git a/AGENTS.md b/AGENTS.md index 1dfc082..e7348ab 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -271,6 +271,8 @@ yarn dev:mp-weixin - `WonderQ-MiniAPP` 使用 Vue 3 SFC、` - - diff --git a/WonderQ-MiniAPP/src/components/TopHeader.vue b/WonderQ-MiniAPP/src/components/TopHeader.vue index b0b6c1e..5facdc4 100644 --- a/WonderQ-MiniAPP/src/components/TopHeader.vue +++ b/WonderQ-MiniAPP/src/components/TopHeader.vue @@ -9,7 +9,7 @@ + :class="search ? 'w-[calc(100%-136px)]' : 'w-[calc(100%-88px)]'"> {{ title }} {{ subtitle }} @@ -20,11 +20,6 @@ aria-label="搜索" @click="$emit('search')"> - - - @@ -40,7 +35,6 @@ defineProps<{ defineEmits<{ back: []; search: []; - support: []; }>(); diff --git a/WonderQ-MiniAPP/src/lib/support.ts b/WonderQ-MiniAPP/src/lib/support.ts deleted file mode 100644 index 4c0f569..0000000 --- a/WonderQ-MiniAPP/src/lib/support.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { SUPPORT_PHONE } from "./types"; - -const WECOM_CUSTOMER_SERVICE_URL = String(import.meta.env.VITE_WECOM_CUSTOMER_SERVICE_URL ?? ""); -const WECOM_CORP_ID = String(import.meta.env.VITE_WECOM_CORP_ID ?? ""); - -type CustomerServiceOptions = { - extInfo: { url: string }; - corpId: string; - success?: (result: unknown) => void; - fail?: (error: unknown) => void; - complete?: (result: unknown) => void; -}; - -type WechatRuntime = { - openCustomerServiceChat?: (options: CustomerServiceOptions) => void; -}; - -export function openOnlineSupport() { - const runtime = (uni as unknown as WechatRuntime).openCustomerServiceChat - ? (uni as unknown as WechatRuntime) - : ((globalThis as { wx?: WechatRuntime }).wx ?? {}); - - if (!runtime.openCustomerServiceChat) { - uni.showToast({ title: "请在微信内联系服务管家", icon: "none" }); - return false; - } - - if (!WECOM_CUSTOMER_SERVICE_URL || !WECOM_CORP_ID) { - console.info("Missing WeCom customer service env: VITE_WECOM_CUSTOMER_SERVICE_URL or VITE_WECOM_CORP_ID."); - uni.showToast({ title: "客服配置待完善", icon: "none" }); - return false; - } - - runtime.openCustomerServiceChat({ - extInfo: { url: WECOM_CUSTOMER_SERVICE_URL }, - corpId: WECOM_CORP_ID, - fail(error) { - console.warn("Failed to open WeCom customer service.", error); - uni.showToast({ title: "暂未打开客服", icon: "none" }); - }, - }); - return true; -} - -export function callSupport() { - uni.makePhoneCall({ - phoneNumber: SUPPORT_PHONE, - fail() { - uni.showToast({ title: `可拨打 ${SUPPORT_PHONE}`, icon: "none" }); - }, - }); -} diff --git a/WonderQ-MiniAPP/src/pages.json b/WonderQ-MiniAPP/src/pages.json index c5d7164..1745d97 100644 --- a/WonderQ-MiniAPP/src/pages.json +++ b/WonderQ-MiniAPP/src/pages.json @@ -8,51 +8,16 @@ } }, { - "path": "pages/destination/index", + "path": "pages/play/index", "style": { - "navigationBarTitleText": "目的地", + "navigationBarTitleText": "玩法", "navigationStyle": "custom" } }, { - "path": "pages/destination-picker/index", + "path": "pages/concierge/index", "style": { - "navigationBarTitleText": "选择目的地", - "navigationStyle": "custom" - } - }, - { - "path": "pages/search/index", - "style": { - "navigationBarTitleText": "搜索结果", - "navigationStyle": "custom" - } - }, - { - "path": "pages/campaign/index", - "style": { - "navigationBarTitleText": "活动", - "navigationStyle": "custom" - } - }, - { - "path": "pages/demand/index", - "style": { - "navigationBarTitleText": "提交需求", - "navigationStyle": "custom" - } - }, - { - "path": "pages/benefits/index", - "style": { - "navigationBarTitleText": "万趣权益", - "navigationStyle": "custom" - } - }, - { - "path": "pages/booking/index", - "style": { - "navigationBarTitleText": "预订咨询", + "navigationBarTitleText": "管家", "navigationStyle": "custom" } }, diff --git a/WonderQ-MiniAPP/src/pages/benefits/index.vue b/WonderQ-MiniAPP/src/pages/benefits/index.vue deleted file mode 100644 index 3fc5166..0000000 --- a/WonderQ-MiniAPP/src/pages/benefits/index.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - diff --git a/WonderQ-MiniAPP/src/pages/booking/index.vue b/WonderQ-MiniAPP/src/pages/booking/index.vue deleted file mode 100644 index 231b5ba..0000000 --- a/WonderQ-MiniAPP/src/pages/booking/index.vue +++ /dev/null @@ -1,195 +0,0 @@ -