-
-
-
- IDE ·
-
-
- {{
- shortTitle ? copy.titleRestShort : copy.titleRest
- }}
-
-
-
+
+
+
+ IDE ·
+
+
+ {{
+ shortTitle ? copy.titleRestShort : copy.titleRest
+ }}
+
-
-
-
{{ copy.groupFulfill }}
-
-
@@ -273,9 +234,14 @@
import SiteMessageCard from './SiteMessageCard.vue';
import SiteIllusIcon from './SiteIllusIcon.vue';
import TextType from './TextType.vue';
- import { HOME_DOORS, HERO_STATS, SITE_FOLLOWUP_INTENTS, WELCOME_COPY } from './lib/site-welcome';
+ import {
+ FULFILL_DOOR_IDS,
+ GROWTH_DOOR_IDS,
+ HOME_DOORS,
+ SITE_FOLLOWUP_INTENTS,
+ WELCOME_COPY,
+ } from './lib/site-welcome';
import { ROUTE_DEST_PRESETS } from './lib/portal-catalog';
- import { SITE_GLASS_PANEL_OPTS, useSiteLiquidGlass } from './lib/site-liquid-glass';
export type SiteChatMessage = {
role: 'user' | 'assistant';
@@ -321,34 +287,24 @@
choice: [payload: { id: string; label: string; flowId: string }];
}>();
- const siteGlass = useSiteLiquidGlass();
- const glassReady = computed(() => !!siteGlass?.ready.value);
- const glassFallback = computed(() => !!siteGlass?.fallback.value);
- let removeGlassSurfaces: Array<() => void> = [];
-
- function teardownLiquidGlass() {
- removeGlassSurfaces.forEach((remove) => remove());
- removeGlassSurfaces = [];
- }
-
- async function setupLiquidGlass() {
- await nextTick();
- if (!siteGlass || props.chatting) return;
- teardownLiquidGlass();
- const doorSurfaces = Array.from(
- document.querySelectorAll
(
- '#ai-advisor-shell .ai-welcome__command .ai-intent-door.lg-surface',
- ),
- );
- removeGlassSurfaces = doorSurfaces.map((el) =>
- siteGlass.registerSurface(el, SITE_GLASS_PANEL_OPTS),
- );
- }
-
const copy = computed(() => (props.isZh ? WELCOME_COPY.zh : WELCOME_COPY.en));
const homeDests = ROUTE_DEST_PRESETS.filter((item) => item.id !== 'all');
- const primaryDoors = HOME_DOORS.filter((d) => d.primary);
- const growthDoors = HOME_DOORS.filter((d) => !d.primary);
+
+ function doorById(id: string) {
+ return HOME_DOORS.find((d) => d.id === id);
+ }
+
+ const fulfillDoors = FULFILL_DOOR_IDS.map(doorById).filter(
+ (d): d is (typeof HOME_DOORS)[number] => !!d,
+ );
+ const growthDoors = GROWTH_DOOR_IDS.map(doorById).filter(
+ (d): d is (typeof HOME_DOORS)[number] => !!d,
+ );
+ const featuredDoor = HOME_DOORS.find((d) => d.id === 'agent') ?? null;
+ const ribbonDoors = [...fulfillDoors, featuredDoor, ...growthDoors].filter(
+ (d): d is (typeof HOME_DOORS)[number] => !!d,
+ );
+
// 首屏即按视口决定短标题,避免挂载后再切导致 TextType 卡住只剩品牌前缀
const shortTitle = ref(
typeof window !== 'undefined' && window.matchMedia('(max-width: 640px)').matches,
@@ -356,6 +312,7 @@
const titleAnimate = ref(
typeof window === 'undefined' || !window.matchMedia('(prefers-reduced-motion: reduce)').matches,
);
+
const draft = computed({
get: () => props.modelValue,
set: (value) => emit('update:modelValue', value),
@@ -400,30 +357,16 @@
titleAnimate.value = !mqReduce?.matches;
}
- watch(
- () => props.chatting,
- async (chatting) => {
- if (chatting) {
- teardownLiquidGlass();
- return;
- }
- await nextTick();
- void setupLiquidGlass();
- },
- );
-
onMounted(() => {
mqNarrow = window.matchMedia('(max-width: 640px)');
mqReduce = window.matchMedia('(prefers-reduced-motion: reduce)');
syncMediaPrefs();
mqNarrow.addEventListener('change', syncMediaPrefs);
mqReduce.addEventListener('change', syncMediaPrefs);
- void setupLiquidGlass();
});
onBeforeUnmount(() => {
mqNarrow?.removeEventListener('change', syncMediaPrefs);
mqReduce?.removeEventListener('change', syncMediaPrefs);
- teardownLiquidGlass();
});
diff --git a/src/views/site/SiteHeader.vue b/src/views/site/SiteHeader.vue
index 18f8aea..6e0926a 100644
--- a/src/views/site/SiteHeader.vue
+++ b/src/views/site/SiteHeader.vue
@@ -27,15 +27,30 @@
@@ -152,7 +147,6 @@
const contact = SITE_CONTACT;
const loginUrl = officialLoginUrl();
const qrFailed = ref(false);
- const copied = ref(false);
const lang = computed(() => (props.isZh ? 'zh' : 'en') as const);
const copy = computed(() => SITE_TOPIC_COPY[props.topic][lang.value]);
const facts = computed(() => {
@@ -168,16 +162,4 @@
const pack = SITE_TOPIC_COPY.pricing[lang.value];
emit('ask', { text: pack.askText, intentId: 'pricing' });
}
-
- async function copyWechat() {
- try {
- await navigator.clipboard.writeText(contact.wechat);
- copied.value = true;
- window.setTimeout(() => {
- copied.value = false;
- }, 1600);
- } catch {
- copied.value = false;
- }
- }
diff --git a/src/views/site/index.vue b/src/views/site/index.vue
index 26e66ea..bc5994e 100644
--- a/src/views/site/index.vue
+++ b/src/views/site/index.vue
@@ -36,22 +36,24 @@
:tilt="1.08"
:zoom="0.92"
:height="4.8"
- :fog-depth="22"
+ :fog-depth="28"
detail="low"
- :brightness="1.08"
- :opacity="1.0"
+ :brightness="1.06"
+ :opacity="0.86"
:mouse-interaction="true"
- :parallax-strength="0.4"
+ :parallax-strength="0.35"
:grain="false"
:fps="30"
:render-scale="0.72"
:max-dpr="1.25"
+ :paused="wavesPaused"
/>