feat: 官网比例对齐、登录同壳切换与关怀条体验
All checks were successful
Build and Deploy Front / deploy (push) Successful in 3m45s

统一飞机/标题矮屏缩放;登录互切免虹膜重挂;角色占位淡入;关怀条日出日落风格并加客户欢迎文案。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zzh 2026-12-03 16:09:52 +08:00
parent 44d39ffa26
commit 1d168d0943
12 changed files with 653 additions and 215 deletions

View File

@ -70,6 +70,10 @@
*/ */
function portalViewKey(r: RouteLocationNormalizedLoaded) { function portalViewKey(r: RouteLocationNormalizedLoaded) {
const path = String(r.path || ''); const path = String(r.path || '');
// PC 登录互切同壳复用,避免虹膜整页 remount(角色/gsap 反复装卸最忙)
if (path === '/login' || path === '/admin' || path === '/agent') {
return 'oms-pc-login';
}
if (isStandalonePortalPath(path) || isLoginPath(path)) { if (isStandalonePortalPath(path) || isLoginPath(path)) {
const top = r.matched[0]; const top = r.matched[0];
return String(top?.name || r.name || path); return String(top?.name || r.name || path);

View File

@ -59,15 +59,23 @@ function portalRouteName(name: PortalRouteLike['name']) {
return name ? String(name) : ''; return name ? String(name) : '';
} }
const isPcLoginName = (name: string) =>
name === 'login' || name === 'adminLogin' || name === 'agentLogin';
/** /**
* 是否走中心展开:已武装的翻页、官网进登录、客户登录与管理登录互切。 * 是否走中心展开:已武装的翻页、官网进登录、登录回官网。
* 客户/管理/代理登录互切改为同壳更新(见 App portalViewKey=oms-pc-login),不走虹膜重挂。
* 只读标记,不消费;真正消费仍在 App 的导航守卫里。 * 只读标记,不消费;真正消费仍在 App 的导航守卫里。
*/ */
export function shouldPortalIris(to: PortalRouteLike, from: PortalRouteLike): boolean { export function shouldPortalIris(to: PortalRouteLike, from: PortalRouteLike): boolean {
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return false; if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return false;
if (pageFlipOnce) return true;
const fromName = portalRouteName(from.name); const fromName = portalRouteName(from.name);
const toName = portalRouteName(to.name); const toName = portalRouteName(to.name);
// 登录互切优先:即使 click 武装了 flip 也不虹膜,避免整页卸载再挂显得很忙
if (isPcLoginName(fromName) && isPcLoginName(toName) && fromName !== toName) {
return false;
}
if (pageFlipOnce) return true;
if ( if (
fromName === 'siteRoot' && fromName === 'siteRoot' &&
(toName === 'login' || toName === 'H5Login') && (toName === 'login' || toName === 'H5Login') &&
@ -75,13 +83,8 @@ export function shouldPortalIris(to: PortalRouteLike, from: PortalRouteLike): bo
) { ) {
return true; return true;
} }
const isPcLogin = (name: string) => name === 'login' || name === 'adminLogin';
// 客户/管理登录互切
if (isPcLogin(fromName) && isPcLogin(toName) && fromName !== toName) {
return true;
}
// 登录页回官网(与门户切换同一套中心虹膜) // 登录页回官网(与门户切换同一套中心虹膜)
if (isPcLogin(fromName) && toName === 'siteRoot') { if (isPcLoginName(fromName) && toName === 'siteRoot') {
return true; return true;
} }
return false; return false;

View File

@ -1,25 +1,69 @@
<template> <template>
<div <div
class="login-care-banner" class="login-care-banner"
:class="{ 'is-visible': visible && settingsEnabled }" :class="[
`is-${sky}`,
{
'is-visible': visible && settingsEnabled,
'is-after-hours': afterHours && !holidayId,
'is-holiday': !!holidayId,
},
]"
aria-live="polite" aria-live="polite"
> >
<div class="login-care-banner__body"> <!-- 角落天空:日出 / 午后 / 日落 / 夜间 -->
<p class="login-care-banner__greeting">{{ greeting }}</p> <div class="login-care-banner__sky" aria-hidden="true">
<p class="login-care-banner__note">{{ note }}</p> <span class="login-care-banner__sky-glow" />
<span class="login-care-banner__sky-band" />
<span class="login-care-banner__sky-core" />
</div>
<div class="login-care-banner__layout">
<div class="login-care-banner__mark" aria-hidden="true">
<icon-sun-fill
v-if="sky === 'sunrise' || sky === 'day'"
class="login-care-banner__icon"
:size="15"
/>
<icon-moon-fill
v-else
class="login-care-banner__icon"
:size="15"
/>
</div>
<div class="login-care-banner__body">
<div class="login-care-banner__meta">
<time class="login-care-banner__time" :datetime="clockIso">{{ clockLabel }}</time>
<span v-if="eyebrow" class="login-care-banner__chip">{{ eyebrow }}</span>
</div>
<p class="login-care-banner__greeting">{{ greeting }}</p>
<p class="login-care-banner__note">{{ note }}</p>
</div>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'; import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { IconMoonFill, IconSunFill } from '@arco-design/web-vue/es/icon';
import { getCarePeriod, getHolidayId, isAfterWorkHours } from '@/utils/admin-login-care'; import { getCarePeriod, getHolidayId, isAfterWorkHours } from '@/utils/admin-login-care';
import { getAdminCareSettings } from '@/utils/admin-care-settings'; import { getAdminCareSettings } from '@/utils/admin-care-settings';
import { isPortalIrisActive } from '@/utils/page-transition-flag'; import { isPortalIrisActive } from '@/utils/page-transition-flag';
defineOptions({ name: 'LoginCareBanner' }); defineOptions({ name: 'LoginCareBanner' });
const props = withDefaults(
defineProps<{
/** admin=运营侧;customer=客户门户,文案与开关分开 */
audience?: 'admin' | 'customer';
}>(),
{ audience: 'admin' },
);
type SkyMood = 'sunrise' | 'day' | 'sunset' | 'night';
const { t } = useI18n(); const { t } = useI18n();
const tick = ref(0); const tick = ref(0);
const visible = ref(false); const visible = ref(false);
@ -27,38 +71,67 @@ const settingsEnabled = ref(true);
let timer: ReturnType<typeof window.setInterval> | null = null; let timer: ReturnType<typeof window.setInterval> | null = null;
let enterTimer: ReturnType<typeof window.setTimeout> | null = null; let enterTimer: ReturnType<typeof window.setTimeout> | null = null;
const period = computed(() => { const isCustomer = computed(() => props.audience === 'customer');
const careNs = computed(() => (isCustomer.value ? 'login.care.customer' : 'login.care'));
const now = computed(() => {
void tick.value; void tick.value;
return getCarePeriod(); return new Date();
}); });
const afterHours = computed(() => { const period = computed(() => getCarePeriod(now.value));
void tick.value; const afterHours = computed(() => isAfterWorkHours(now.value));
return isAfterWorkHours(); const holidayId = computed(() => getHolidayId(now.value));
/** 天空情绪:图标与角落光晕共用 */
const sky = computed<SkyMood>(() => {
if (holidayId.value) return 'night';
if (afterHours.value || period.value === 'lateNight') return 'night';
if (period.value === 'morning') return 'sunrise';
if (period.value === 'evening') return 'sunset';
return 'day';
}); });
const holidayId = computed(() => { const clockLabel = computed(() => {
void tick.value; const d = now.value;
return getHolidayId(); return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;
});
const clockIso = computed(() => now.value.toISOString());
const eyebrow = computed(() => {
if (holidayId.value) return t(`${careNs.value}.eyebrow.holiday`);
if (afterHours.value) return t(`${careNs.value}.eyebrow.afterHours`);
return '';
}); });
const greeting = computed(() => { const greeting = computed(() => {
if (holidayId.value) return t(`login.care.holiday.${holidayId.value}`); if (holidayId.value) return t(`${careNs.value}.holiday.${holidayId.value}`);
if (afterHours.value) return t('login.care.afterHoursGreeting'); if (afterHours.value) return t(`${careNs.value}.afterHoursGreeting`);
return t(`login.care.period.${period.value}`); return t(`${careNs.value}.period.${period.value}`);
}); });
const note = computed(() => { const note = computed(() => {
if (holidayId.value) return t(`login.care.holidayNote.${holidayId.value}`); if (holidayId.value) return t(`${careNs.value}.holidayNote.${holidayId.value}`);
if (afterHours.value) return t('login.care.afterHoursNote'); if (afterHours.value) return t(`${careNs.value}.afterHoursNote`);
return t(`login.care.periodNote.${period.value}`); return t(`${careNs.value}.periodNote.${period.value}`);
}); });
onMounted(async () => { function syncSettingsEnabled() {
if (isCustomer.value) {
// 客户侧默认开启,不吃运营本机开关
settingsEnabled.value = true;
return;
}
const s = getAdminCareSettings(); const s = getAdminCareSettings();
settingsEnabled.value = s.careEnabled && s.loginBannerEnabled; settingsEnabled.value = s.careEnabled && s.loginBannerEnabled;
if (!settingsEnabled.value) return; }
await nextTick();
function revealBanner() {
if (enterTimer) {
window.clearTimeout(enterTimer);
enterTimer = null;
}
const reveal = () => { const reveal = () => {
if (isPortalIrisActive()) { if (isPortalIrisActive()) {
enterTimer = window.setTimeout(reveal, 80); enterTimer = window.setTimeout(reveal, 80);
@ -66,10 +139,27 @@ onMounted(async () => {
} }
visible.value = true; visible.value = true;
}; };
enterTimer = window.setTimeout(reveal, 180); enterTimer = window.setTimeout(reveal, 120);
}
watch(
() => props.audience,
() => {
syncSettingsEnabled();
if (settingsEnabled.value && !visible.value) {
revealBanner();
}
},
);
onMounted(async () => {
syncSettingsEnabled();
if (!settingsEnabled.value) return;
await nextTick();
revealBanner();
timer = window.setInterval(() => { timer = window.setInterval(() => {
tick.value += 1; tick.value += 1;
}, 60_000); }, 30_000);
}); });
onBeforeUnmount(() => { onBeforeUnmount(() => {
@ -86,62 +176,289 @@ onBeforeUnmount(() => {
<style lang="less" scoped> <style lang="less" scoped>
.login-care-banner { .login-care-banner {
/* 与登录卡片同系:贴合页底 + 单层 inset,无彩斑 */ --care-ink: rgba(15, 23, 42, 0.78);
--care-ink: #1e293b; --care-muted: rgba(100, 116, 139, 0.82);
--care-muted: rgba(71, 85, 105, 0.88); --care-meta: rgba(100, 116, 139, 0.72);
--care-bg: var(--app-page-bg, #f0f3f4); --care-icon: #64748b;
--care-shadow: inset 0 3px 12px rgba(15, 23, 42, 0.1); --care-mark-bg: rgba(255, 255, 255, 0.55);
--care-bg: rgba(255, 255, 255, 0.52);
--care-border: rgba(15, 23, 42, 0.055);
--care-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
/* 天空层变量:各时段覆盖 */
--sky-glow: transparent;
--sky-band: transparent;
--sky-core: transparent;
--sky-glow-pos: 108% -18%;
--sky-band-pos: 92% 8%;
--sky-core-pos: 100% 0%;
position: absolute; position: absolute;
top: calc(16px + env(safe-area-inset-top, 0px)); top: calc(14px + env(safe-area-inset-top, 0px));
right: 20px; right: 16px;
z-index: 40; z-index: 40;
width: min(360px, calc(100vw - 40px)); width: min(288px, calc(100vw - 36px));
padding: 16px 18px; padding: 12px 13px;
border-radius: 20px; border-radius: 12px;
text-align: left; text-align: left;
pointer-events: none; pointer-events: none;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
isolation: isolate; isolation: isolate;
border: none; border: 1px solid var(--care-border);
background: var(--care-bg); background: var(--care-bg);
backdrop-filter: none; backdrop-filter: blur(12px) saturate(125%);
-webkit-backdrop-filter: none; -webkit-backdrop-filter: blur(12px) saturate(125%);
box-shadow: var(--care-shadow); box-shadow: var(--care-shadow);
opacity: 0; opacity: 0;
transform: translate3d(12px, -8px, 0); transform: translate3d(0, -4px, 0);
transform-origin: top right; transform-origin: top right;
transition: transition:
opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow 0.3s ease;
&.is-visible { &.is-visible {
opacity: 1; opacity: 0.92;
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
box-shadow: inset 0 4px 14px rgba(15, 23, 42, 0.12); }
/* 日出:暖橙从右上抬起 */
&.is-sunrise {
--care-icon: #ea580c;
--care-mark-bg: rgba(255, 247, 237, 0.72);
--sky-glow: radial-gradient(
circle at var(--sky-glow-pos),
rgba(253, 186, 116, 0.42) 0%,
rgba(254, 215, 170, 0.18) 38%,
transparent 68%
);
--sky-band: radial-gradient(
ellipse 90% 70% at var(--sky-band-pos),
rgba(251, 146, 60, 0.22) 0%,
rgba(253, 224, 171, 0.1) 42%,
transparent 70%
);
--sky-core: radial-gradient(
circle at var(--sky-core-pos),
rgba(255, 237, 213, 0.55) 0%,
rgba(253, 186, 116, 0.2) 28%,
transparent 55%
);
}
/* 午后:清透天蓝 */
&.is-day {
--care-icon: color-mix(in srgb, var(--app-primary-color, #054f74) 75%, #38bdf8);
--care-mark-bg: rgba(240, 249, 255, 0.7);
--sky-glow: radial-gradient(
circle at var(--sky-glow-pos),
rgba(125, 211, 252, 0.28) 0%,
rgba(186, 230, 253, 0.12) 40%,
transparent 68%
);
--sky-band: radial-gradient(
ellipse 85% 65% at var(--sky-band-pos),
rgba(56, 189, 248, 0.14) 0%,
transparent 72%
);
--sky-core: radial-gradient(
circle at var(--sky-core-pos),
rgba(224, 242, 254, 0.5) 0%,
rgba(125, 211, 252, 0.16) 32%,
transparent 58%
);
}
/* 日落:橙 → 玫紫压在天际 */
&.is-sunset {
--care-icon: #c026d3;
--care-mark-bg: rgba(253, 242, 248, 0.72);
--sky-glow: radial-gradient(
circle at var(--sky-glow-pos),
rgba(251, 113, 133, 0.28) 0%,
rgba(192, 132, 252, 0.16) 36%,
transparent 70%
);
--sky-band: radial-gradient(
ellipse 95% 75% at 86% 18%,
rgba(249, 115, 22, 0.26) 0%,
rgba(244, 114, 182, 0.14) 34%,
rgba(167, 139, 250, 0.1) 58%,
transparent 78%
);
--sky-core: radial-gradient(
circle at 100% 4%,
rgba(254, 215, 170, 0.48) 0%,
rgba(251, 113, 133, 0.18) 30%,
transparent 56%
);
}
/* 夜间:靛紫月光 */
&.is-night,
&.is-after-hours {
--care-icon: #64748b;
--care-mark-bg: rgba(241, 245, 249, 0.65);
--sky-glow: radial-gradient(
circle at var(--sky-glow-pos),
rgba(148, 163, 184, 0.28) 0%,
rgba(99, 102, 241, 0.1) 40%,
transparent 70%
);
--sky-band: radial-gradient(
ellipse 80% 70% at 88% 10%,
rgba(51, 65, 85, 0.12) 0%,
rgba(99, 102, 241, 0.08) 45%,
transparent 72%
);
--sky-core: radial-gradient(
circle at 100% 0%,
rgba(226, 232, 240, 0.42) 0%,
rgba(148, 163, 184, 0.14) 28%,
transparent 52%
);
}
&.is-holiday {
--care-icon: #db2777;
--care-mark-bg: rgba(253, 242, 248, 0.72);
--sky-glow: radial-gradient(
circle at var(--sky-glow-pos),
rgba(244, 114, 182, 0.26) 0%,
rgba(251, 113, 133, 0.1) 42%,
transparent 70%
);
--sky-band: radial-gradient(
ellipse 85% 70% at 90% 12%,
rgba(251, 207, 232, 0.28) 0%,
transparent 72%
);
--sky-core: radial-gradient(
circle at 100% 0%,
rgba(252, 231, 243, 0.5) 0%,
rgba(244, 114, 182, 0.16) 30%,
transparent 55%
);
}
}
.login-care-banner__sky {
position: absolute;
inset: 0;
pointer-events: none;
overflow: hidden;
}
.login-care-banner__sky-glow,
.login-care-banner__sky-band,
.login-care-banner__sky-core {
position: absolute;
inset: -20%;
pointer-events: none;
}
.login-care-banner__sky-glow {
background: var(--sky-glow);
}
.login-care-banner__sky-band {
background: var(--sky-band);
opacity: 0.95;
}
.login-care-banner__sky-core {
background: var(--sky-core);
}
.login-care-banner__layout {
position: relative;
z-index: 1;
display: flex;
align-items: flex-start;
gap: 10px;
min-width: 0;
}
.login-care-banner__mark {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
margin-top: 1px;
border-radius: 9px;
color: var(--care-icon);
background: var(--care-mark-bg);
border: none;
}
.login-care-banner__icon {
display: block;
color: inherit;
/* 只要实心填充,不要描边 */
stroke: none !important;
:deep(svg),
:deep(path),
:deep(circle) {
stroke: none !important;
} }
} }
.login-care-banner__body { .login-care-banner__body {
position: relative; display: flex;
z-index: 1; flex-direction: column;
gap: 3px;
min-width: 0;
flex: 1;
}
.login-care-banner__meta {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.login-care-banner__time {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.06em;
font-variant-numeric: tabular-nums;
line-height: 1.2;
color: var(--care-meta);
}
.login-care-banner__chip {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 1px 6px;
border-radius: 999px;
font-size: 10px;
font-weight: 500;
line-height: 1.35;
color: var(--care-meta);
background: rgba(15, 23, 42, 0.04);
border: 1px solid rgba(15, 23, 42, 0.05);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.login-care-banner__greeting { .login-care-banner__greeting {
margin: 0 0 6px; margin: 0;
font-size: 18px; font-size: 13px;
font-weight: 700; font-weight: 600;
letter-spacing: 0.01em; letter-spacing: -0.01em;
line-height: 1.35; line-height: 1.35;
color: var(--care-ink); color: var(--care-ink);
} }
.login-care-banner__note { .login-care-banner__note {
margin: 0; margin: 0;
font-size: 12px; font-size: 11px;
line-height: 1.55; font-weight: 400;
line-height: 1.45;
color: var(--care-muted); color: var(--care-muted);
} }
@ -154,7 +471,7 @@ onBeforeUnmount(() => {
transform-origin: top center; transform-origin: top center;
&:not(.is-visible) { &:not(.is-visible) {
transform: translate3d(0, -8px, 0); transform: translate3d(0, -6px, 0);
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="login-characters"> <div class="login-characters" :class="{ 'is-appear': appear }">
<div <div
ref="containerRef" ref="containerRef"
class="login-characters__stage" class="login-characters__stage"
@ -72,6 +72,14 @@ import { useLoginCharacters, type LoginCharactersApi } from '../composables/useL
defineOptions({ name: 'LoginCharacters' }); defineOptions({ name: 'LoginCharacters' });
const props = withDefaults(
defineProps<{
/** 父级在 register 后置 true,用于淡入 */
appear?: boolean;
}>(),
{ appear: false },
);
const CHAR_COLORS = { const CHAR_COLORS = {
orange: '#1f6f5f', orange: '#1f6f5f',
purple: '#2fa084', purple: '#2fa084',
@ -132,9 +140,21 @@ onMounted(async () => {
<style lang="less" scoped> <style lang="less" scoped>
.login-characters { .login-characters {
position: relative;
z-index: 2;
pointer-events: auto; pointer-events: auto;
user-select: none; user-select: none;
overflow: visible; overflow: visible;
opacity: 0;
transform: translate3d(0, 10px, 0);
transition:
opacity 0.4s ease,
transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
&.is-appear {
opacity: 1;
transform: translate3d(0, 0, 0);
}
} }
.login-characters__stage { .login-characters__stage {

View File

@ -33,21 +33,6 @@
{{ t('login.hero.track') }} {{ t('login.hero.track') }}
</button> </button>
</form> </form>
<div v-if="showRegisterQuoteCta" class="login-hero__actions">
<a class="login-hero__cta" href="/register" @click.prevent="goRegisterQuote">
{{ t('login.hero.cta.registerQuote') }}
<span class="login-hero__cta-arrow" aria-hidden="true">→</span>
</a>
<a
class="login-hero__cta login-hero__cta--ghost"
href="/"
@click.prevent="goExploreLanes"
>
{{ t('login.hero.cta.exploreLanes') }}
<span class="login-hero__cta-arrow" aria-hidden="true">→</span>
</a>
</div>
</div> </div>
</template> </template>
@ -116,7 +101,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeUnmount, onMounted, ref, type Component } from 'vue'; import { computed, onBeforeUnmount, onMounted, ref, type Component } from 'vue';
import { useRoute, useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { Message } from '@arco-design/web-vue'; import { Message } from '@arco-design/web-vue';
import { brandCopy } from '@/utils/brandCopy'; import { brandCopy } from '@/utils/brandCopy';
@ -197,7 +182,6 @@ const props = withDefaults(
); );
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute();
const router = useRouter(); const router = useRouter();
const trackingNo = ref(''); const trackingNo = ref('');
const activePrinciple = ref(0); const activePrinciple = ref(0);
@ -205,10 +189,6 @@ const hovered = ref(false);
let cycleTimer: ReturnType<typeof window.setInterval> | null = null; let cycleTimer: ReturnType<typeof window.setInterval> | null = null;
const isCustomer = computed(() => props.portal === 'customer'); const isCustomer = computed(() => props.portal === 'customer');
/** 注册页复用同一 Hero,不再展示「去注册看价」 */
const showRegisterQuoteCta = computed(
() => !String(route.path || '').startsWith('/register'),
);
const activePillars = computed(() => const activePillars = computed(() =>
props.portal === 'agent' ? agentPillars : adminPillars, props.portal === 'agent' ? agentPillars : adminPillars,
); );
@ -241,20 +221,6 @@ function onTrackSubmit() {
void router.push({ path: '/track/query', query: { no } }); void router.push({ path: '/track/query', query: { no } });
} }
function goRegisterQuote() {
const query: Record<string, string> = {};
for (const key of ['agent', 'agentCode', 'ref', 'invite', 'advisor', 'redirect'] as const) {
const raw = route.query[key];
const value = typeof raw === 'string' ? raw.trim() : '';
if (value) query[key] = value;
}
void router.push({ path: '/register', query });
}
function goExploreLanes() {
void router.push({ name: 'siteRoot', hash: '#routes' });
}
onMounted(() => { onMounted(() => {
if (!isCustomer.value) startCycle(); if (!isCustomer.value) startCycle();
}); });
@ -404,7 +370,7 @@ onBeforeUnmount(() => {
.login-hero--customer .login-hero__tools { .login-hero--customer .login-hero__tools {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 14px; gap: 0;
padding-top: 4px; padding-top: 4px;
} }
@ -455,49 +421,6 @@ onBeforeUnmount(() => {
opacity: 0.92; opacity: 0.92;
} }
.login-hero__actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 12px 20px;
}
.login-hero__cta {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.02em;
color: rgba(255, 255, 255, 0.88);
text-decoration: none;
transition: color 0.2s, gap 0.2s;
}
.login-hero__cta--ghost {
font-weight: 500;
color: rgba(255, 255, 255, 0.62);
}
.login-hero__cta:hover {
color: #fff;
gap: 10px;
}
.login-hero__cta--ghost:hover {
color: rgba(255, 255, 255, 0.9);
}
.login-hero__cta-arrow {
font-size: 14px;
line-height: 1;
transition: transform 0.2s;
}
.login-hero__cta:hover .login-hero__cta-arrow {
transform: translateX(2px);
}
.login-hero__heading { .login-hero__heading {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -861,19 +784,6 @@ onBeforeUnmount(() => {
color: rgba(26, 45, 74, 0.4); color: rgba(26, 45, 74, 0.4);
} }
.login-hero--light .login-hero__cta {
color: var(--app-primary-color, #007979);
}
.login-hero--light .login-hero__cta--ghost {
color: rgba(26, 45, 74, 0.55);
}
.login-hero--light .login-hero__cta:hover,
.login-hero--light .login-hero__cta--ghost:hover {
color: #006868;
}
.login-hero--light .login-hero__principle { .login-hero--light .login-hero__principle {
&::before { &::before {
background: rgba(26, 45, 74, 0.12); background: rgba(26, 45, 74, 0.12);

View File

@ -8,7 +8,6 @@
:aria-label="label" :aria-label="label"
@pointerenter="preloadTarget" @pointerenter="preloadTarget"
@focus="preloadTarget" @focus="preloadTarget"
@click="onSwitchClick"
> >
<icon-swap :size="14" /> <icon-swap :size="14" />
</router-link> </router-link>
@ -20,7 +19,6 @@ import { computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { IconSwap } from '@arco-design/web-vue/es/icon'; import { IconSwap } from '@arco-design/web-vue/es/icon';
import { ADMIN_LOGIN_PATH, CUSTOMER_LOGIN_PATH } from '@/utils/login-portal'; import { ADMIN_LOGIN_PATH, CUSTOMER_LOGIN_PATH } from '@/utils/login-portal';
import { armPageFlip } from '@/utils/page-transition-flag';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
@ -56,24 +54,13 @@ function preloadTarget() {
targetPreloaded = true; targetPreloaded = true;
const hero = new Image(); const hero = new Image();
hero.src = TARGET_HERO[props.target]; hero.src = TARGET_HERO[props.target];
// 切回客户登录时预拉角色包,避免点进去再等 // 悬停即预热对侧 chunk,点击同壳切换时几乎无等待
if (props.target === 'customer') { if (props.target === 'customer') {
void import('./LoginCharacters.vue'); void import('./LoginCharacters.vue');
} else {
void import('./LoginCareBanner.vue');
} }
} }
function onSwitchClick(e: MouseEvent) {
if (
e.button !== 0 ||
e.metaKey ||
e.ctrlKey ||
e.shiftKey ||
e.altKey
) {
return;
}
armPageFlip();
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -503,17 +503,22 @@ async function handleSubmit() {
.nova-login__header { .nova-login__header {
display: block; display: block;
text-align: center; text-align: center;
margin-bottom: 28px; margin-bottom: 20px;
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
.nova-login__header :deep(.login-brand__img) {
width: 40px;
height: 40px;
}
.nova-login__brand-hint { .nova-login__brand-hint {
margin: 12px 0 0; margin: 8px 0 0;
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
line-height: 1.35; line-height: 1.3;
color: #86868b; color: #86868b;
letter-spacing: -0.01em; letter-spacing: -0.01em;
} }
@ -616,7 +621,7 @@ async function handleSubmit() {
.nova-login__row.is-focused .nova-login__float, .nova-login__row.is-focused .nova-login__float,
.nova-login__row.is-filled .nova-login__float, .nova-login__row.is-filled .nova-login__float,
.nova-login__row:has(input:-webkit-autofill) .nova-login__float { .nova-login__row:has(input:-webkit-autofill) .nova-login__float {
top: 6px; top: 5px;
font-size: 11px; font-size: 11px;
font-weight: 500; font-weight: 500;
color: #6e6e73; color: #6e6e73;
@ -634,8 +639,8 @@ async function handleSubmit() {
.nova-login__form :deep(.arco-input-wrapper), .nova-login__form :deep(.arco-input-wrapper),
.nova-login__form :deep(.arco-input-password) { .nova-login__form :deep(.arco-input-password) {
width: 100%; width: 100%;
min-height: 56px; min-height: 52px;
padding: 22px 12px 8px 14px; padding: 20px 12px 7px 14px;
border: none !important; border: none !important;
border-radius: 0; border-radius: 0;
background: transparent !important; background: transparent !important;
@ -711,13 +716,13 @@ async function handleSubmit() {
} }
.nova-login__captcha { .nova-login__captcha {
margin-top: 12px; margin-top: 10px;
} }
.nova-login__submit { .nova-login__submit {
width: 100%; width: 100%;
height: 44px; height: 42px;
margin-top: 24px; margin-top: 20px;
font-size: 15px; font-size: 15px;
font-weight: 600; font-weight: 600;
border-radius: 12px; border-radius: 12px;
@ -748,7 +753,7 @@ async function handleSubmit() {
} }
.agreement-area { .agreement-area {
margin: 12px 0 0; margin: 10px 0 0;
width: 100%; width: 100%;
min-width: 0; min-width: 0;
container-type: inline-size; container-type: inline-size;
@ -824,8 +829,8 @@ async function handleSubmit() {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
margin-top: 20px; margin-top: 16px;
padding-top: 16px; padding-top: 14px;
border-top: 1px solid #f0f0f2; border-top: 1px solid #f0f0f2;
} }

View File

@ -15,7 +15,8 @@
<div ref="rightSplitRef" class="login-split login-split--right" aria-hidden="true" /> <div ref="rightSplitRef" class="login-split login-split--right" aria-hidden="true" />
<LoginCareBanner <LoginCareBanner
v-if="shellReady && isAdminLogin && careBannerReady" v-if="shellReady && careBannerReady && (isAdminLogin || isCustomerLogin)"
:audience="isCustomerLogin ? 'customer' : 'admin'"
/> />
<div v-if="shellReady" ref="leftPaneRef" class="login-pane login-pane--left"> <div v-if="shellReady" ref="leftPaneRef" class="login-pane login-pane--left">
@ -26,7 +27,22 @@
/> />
</aside> </aside>
<div v-if="isCustomerLogin" class="login-characters-panel"> <div v-if="isCustomerLogin" class="login-characters-panel">
<LoginCharacters v-if="showCharacters" @register="registerLoginCharacters" /> <!-- 壳一出来就占位;勿限制面板高度,真角色布局盒仍是 550×400 -->
<div
class="login-characters-placeholder"
:class="{ 'is-gone': charactersReady }"
aria-hidden="true"
>
<span class="login-characters-placeholder__bar login-characters-placeholder__bar--purple" />
<span class="login-characters-placeholder__bar login-characters-placeholder__bar--black" />
<span class="login-characters-placeholder__bar login-characters-placeholder__bar--orange" />
<span class="login-characters-placeholder__bar login-characters-placeholder__bar--yellow" />
</div>
<LoginCharacters
v-if="showCharacters"
:appear="charactersReady"
@register="registerLoginCharacters"
/>
</div> </div>
</div> </div>
@ -97,6 +113,7 @@
import { import {
ref, ref,
computed, computed,
watch,
onMounted, onMounted,
onBeforeUnmount, onBeforeUnmount,
provide, provide,
@ -140,10 +157,16 @@ const loginType = computed(() => getLoginTypeFromRouteName(route.name as string)
const isCustomerLogin = computed(() => loginType.value === OmsLoginType.Customer); const isCustomerLogin = computed(() => loginType.value === OmsLoginType.Customer);
const isAgentLogin = computed(() => loginType.value === OmsLoginType.Agent); const isAgentLogin = computed(() => loginType.value === OmsLoginType.Agent);
const isAdminLogin = computed(() => loginType.value === OmsLoginType.User); const isAdminLogin = computed(() => loginType.value === OmsLoginType.User);
/** 角色动画偏重,首屏延后空闲再挂 */ /** 角色动画偏重:先占位,chunk 就绪后再挂真组件 */
const showCharacters = ref(false); const showCharacters = ref(false);
/** 真角色已 register,用于淡出剪影 */
const charactersReady = ref(false);
/** 管理端关怀条在翻页结束后再挂,避免展开过程中插入一块新图层 */ /** 管理端关怀条在翻页结束后再挂,避免展开过程中插入一块新图层 */
const careBannerReady = ref(!isPortalIrisActive()); const careBannerReady = ref(!isPortalIrisActive());
/** 客户登录尽早预取角色包(setup 阶段,不等 onMounted) */
if (isCustomerLogin.value) {
void loadLoginCharacters();
}
const activeKey = ref<'pwd' | 'wechat'>('pwd'); const activeKey = ref<'pwd' | 'wechat'>('pwd');
const wechatMounted = ref(false); const wechatMounted = ref(false);
const wechatLoginRef = ref<{ prefetch?: () => void } | null>(null); const wechatLoginRef = ref<{ prefetch?: () => void } | null>(null);
@ -257,6 +280,24 @@ provide(LOGIN_CHARACTERS_KEY, loginCharactersApi);
function registerLoginCharacters(api: LoginCharactersApi) { function registerLoginCharacters(api: LoginCharactersApi) {
loginCharactersApi.value = api; loginCharactersApi.value = api;
// 下一帧再标 ready,保证首屏 paint 后再淡入
requestAnimationFrame(() => {
charactersReady.value = true;
});
}
function mountLoginCharactersSoon() {
if (!isCustomerLogin.value || showCharacters.value) return;
void loadLoginCharacters()
.catch(() => undefined)
.finally(() => {
afterPortalIris(() => {
// 包已在内存时立刻挂;略延一帧让占位先 paint
requestAnimationFrame(() => {
showCharacters.value = true;
});
});
});
} }
function readStoredAppearance(): boolean { function readStoredAppearance(): boolean {
@ -312,22 +353,36 @@ function afterPortalIris(run: () => void) {
window.setTimeout(wait, 80); window.setTimeout(wait, 80);
} }
/** 同壳互切时按门户类型装卸装饰,避免整页 remount */
watch(isCustomerLogin, (customer) => {
if (customer) {
charactersReady.value = false;
showCharacters.value = false;
loginCharactersApi.value = null;
mountLoginCharactersSoon();
return;
}
showCharacters.value = false;
charactersReady.value = false;
loginCharactersApi.value = null;
});
watch([isAdminLogin, isCustomerLogin], ([admin, customer]) => {
if (admin || customer) {
careBannerReady.value = true;
}
});
onMounted(() => { onMounted(() => {
document.documentElement.classList.add(LOGIN_PAGE_SCROLL_LOCK_CLASS); document.documentElement.classList.add(LOGIN_PAGE_SCROLL_LOCK_CLASS);
shellReady.value = true; shellReady.value = true;
if (isCustomerLogin.value) { mountLoginCharactersSoon();
void loadLoginCharacters();
}
const idle = window.requestIdleCallback const idle = window.requestIdleCallback
? (cb: () => void, timeout = 1200) => window.requestIdleCallback(cb, { timeout }) ? (cb: () => void, timeout = 1200) => window.requestIdleCallback(cb, { timeout })
: (cb: () => void, timeout = 1200) => window.setTimeout(cb, Math.min(timeout, 400)); : (cb: () => void, timeout = 1200) => window.setTimeout(cb, Math.min(timeout, 400));
afterPortalIris(() => { afterPortalIris(() => {
careBannerReady.value = true; if (isAdminLogin.value || isCustomerLogin.value) {
// 角色尽早挂上;包已预取时几乎无缝 careBannerReady.value = true;
if (isCustomerLogin.value) {
window.setTimeout(() => {
showCharacters.value = true;
}, 120);
} }
idle(() => { idle(() => {
void import('@/locale').then(({ ensureFullLocaleMessages }) => { void import('@/locale').then(({ ensureFullLocaleMessages }) => {
@ -519,6 +574,82 @@ onBeforeUnmount(() => {
z-index: 6; z-index: 6;
pointer-events: auto; pointer-events: auto;
padding: 0 0 16px 8px; padding: 0 0 16px 8px;
overflow: visible;
}
/* 视觉尺寸约 198×144,叠在真角色同位置;面板本身不能锁死高度 */
.login-characters-placeholder {
position: absolute;
left: 8px;
bottom: 16px;
z-index: 1;
width: 198px;
height: 144px;
pointer-events: none;
opacity: 1;
transition: opacity 0.35s ease;
filter: saturate(0.92);
&.is-gone {
opacity: 0;
visibility: hidden;
}
}
.login-characters-placeholder__bar {
position: absolute;
bottom: 0;
border-radius: 4px 4px 0 0;
transform-origin: bottom center;
animation: login-chars-ph-breathe 1.6s ease-in-out infinite;
&--purple {
left: 25px;
width: 65px;
height: 144px;
background: #2fa084;
animation-delay: 0s;
}
&--black {
left: 86px;
width: 43px;
height: 112px;
background: #6fcf97;
animation-delay: 0.12s;
}
&--orange {
left: 0;
width: 61px;
height: 79px;
background: #1f6f5f;
z-index: 2;
animation-delay: 0.24s;
}
&--yellow {
left: 112px;
width: 72px;
height: 72px;
border-radius: 50%;
background: #eeeeee;
bottom: 0;
z-index: 3;
animation-delay: 0.36s;
}
}
@keyframes login-chars-ph-breathe {
0%,
100% {
opacity: 0.55;
transform: scaleY(0.98);
}
50% {
opacity: 0.85;
transform: scaleY(1);
}
} }
.login-hero-panel--admin { .login-hero-panel--admin {
@ -579,7 +710,7 @@ onBeforeUnmount(() => {
width: 100%; width: 100%;
max-width: 380px; max-width: 380px;
min-height: auto; min-height: auto;
padding: 44px 32px 32px; padding: 36px 30px 28px;
&.login-form--portal-row { &.login-form--portal-row {
padding-bottom: 12px; padding-bottom: 12px;
@ -674,7 +805,7 @@ onBeforeUnmount(() => {
.login-form { .login-form {
max-width: 97% !important; max-width: 97% !important;
padding: 36px 20px 52px; padding: 30px 20px 40px;
border-radius: 14px; border-radius: 14px;
} }
} }

View File

@ -55,6 +55,8 @@
'login.hero.agent.pillar.commission.desc': 'Accruals and payout status at a glance', 'login.hero.agent.pillar.commission.desc': 'Accruals and payout status at a glance',
'login.hero.agent.ai': 'login.hero.agent.ai':
'Focus on customers and commission: accrues on delivery, details stay visible, payouts settle offline.', 'Focus on customers and commission: accrues on delivery, details stay visible, payouts settle offline.',
'login.care.eyebrow.afterHours': 'Off hours',
'login.care.eyebrow.holiday': 'Holiday',
'login.care.period.morning': 'Good morning — a fresh start', 'login.care.period.morning': 'Good morning — a fresh start',
'login.care.period.afternoon': 'Good afternoon — steady wins', 'login.care.period.afternoon': 'Good afternoon — steady wins',
'login.care.period.evening': 'Good evening — thanks for today', 'login.care.period.evening': 'Good evening — thanks for today',
@ -84,6 +86,33 @@
'Systems can stay on duty; people still need care under the full moon.', 'Systems can stay on duty; people still need care under the full moon.',
'login.care.holidayNote.nationalDay': 'login.care.holidayNote.nationalDay':
'If you\'re still on, finish what\'s urgent — the rest can wait.', 'If you\'re still on, finish what\'s urgent — the rest can wait.',
/* Customer login care: welcome back only */
'login.care.customer.eyebrow.afterHours': 'Welcome back',
'login.care.customer.eyebrow.holiday': 'Happy holiday',
'login.care.customer.period.morning': 'Good morning — welcome back',
'login.care.customer.period.afternoon': 'Good afternoon — welcome back',
'login.care.customer.period.evening': 'Good evening — welcome back',
'login.care.customer.period.lateNight': 'It\'s late — welcome back',
'login.care.customer.periodNote.morning': 'Glad to see you again.',
'login.care.customer.periodNote.afternoon': 'Take your time — we\'re here.',
'login.care.customer.periodNote.evening': 'Welcome back. No rush.',
'login.care.customer.periodNote.lateNight': 'Take care of yourself — we\'ll be here.',
'login.care.customer.afterHoursGreeting': 'Welcome back',
'login.care.customer.afterHoursNote': 'Sign in anytime — no hurry.',
'login.care.customer.holiday.newYear': 'Happy New Year — welcome back',
'login.care.customer.holiday.springFestival': 'Happy Spring Festival — welcome back',
'login.care.customer.holiday.qingming': 'Qingming — welcome back',
'login.care.customer.holiday.laborDay': 'Happy Labor Day — welcome back',
'login.care.customer.holiday.dragonBoat': 'Happy Dragon Boat — welcome back',
'login.care.customer.holiday.midAutumn': 'Happy Mid-Autumn — welcome back',
'login.care.customer.holiday.nationalDay': 'Happy National Day — welcome back',
'login.care.customer.holidayNote.newYear': 'Wishing you well — come by anytime.',
'login.care.customer.holidayNote.springFestival': 'Happy holidays. Just glad you\'re here.',
'login.care.customer.holidayNote.qingming': 'Take care — welcome back anytime.',
'login.care.customer.holidayNote.laborDay': 'Enjoy the break — welcome back.',
'login.care.customer.holidayNote.dragonBoat': 'Warm wishes — welcome back.',
'login.care.customer.holidayNote.midAutumn': 'Under the full moon — welcome back.',
'login.care.customer.holidayNote.nationalDay': 'Enjoy the holiday — welcome back.',
'login.hero.trackPlaceholder': 'Enter tracking number', 'login.hero.trackPlaceholder': 'Enter tracking number',
'login.hero.track': 'Track', 'login.hero.track': 'Track',
'login.hero.trust.customer': 'US · EU · SEA · Warehousing · AI-assisted', 'login.hero.trust.customer': 'US · EU · SEA · Warehousing · AI-assisted',

View File

@ -53,6 +53,8 @@
'login.hero.agent.pillar.commission.title': '返佣明细', 'login.hero.agent.pillar.commission.title': '返佣明细',
'login.hero.agent.pillar.commission.desc': '计提与打款进度一目了然', 'login.hero.agent.pillar.commission.desc': '计提与打款进度一目了然',
'login.hero.agent.ai': '专注客户与返佣:订单签收计提、明细可查,结算由运营线下完成。', 'login.hero.agent.ai': '专注客户与返佣:订单签收计提、明细可查,结算由运营线下完成。',
'login.care.eyebrow.afterHours': '非工作时间',
'login.care.eyebrow.holiday': '节日快乐',
'login.care.period.morning': '早上好,新的一天开始了', 'login.care.period.morning': '早上好,新的一天开始了',
'login.care.period.afternoon': '下午好,稳稳推进就好', 'login.care.period.afternoon': '下午好,稳稳推进就好',
'login.care.period.evening': '傍晚好,今天也辛苦了', 'login.care.period.evening': '傍晚好,今天也辛苦了',
@ -77,6 +79,33 @@
'login.care.holidayNote.dragonBoat': '粽香里也别忘了喝水,稳稳推进就好。', 'login.care.holidayNote.dragonBoat': '粽香里也别忘了喝水,稳稳推进就好。',
'login.care.holidayNote.midAutumn': '月圆人圆,系统可以值守,你也要照顾好自己。', 'login.care.holidayNote.midAutumn': '月圆人圆,系统可以值守,你也要照顾好自己。',
'login.care.holidayNote.nationalDay': '假期里若仍在岗,先把最急的办好,其余明天再说。', 'login.care.holidayNote.nationalDay': '假期里若仍在岗,先把最急的办好,其余明天再说。',
/* 客户登录人文关怀:只欢迎回来,不说运营口吻 */
'login.care.customer.eyebrow.afterHours': '欢迎回来',
'login.care.customer.eyebrow.holiday': '节日快乐',
'login.care.customer.period.morning': '早上好,欢迎回来',
'login.care.customer.period.afternoon': '下午好,欢迎回来',
'login.care.customer.period.evening': '傍晚好,欢迎回来',
'login.care.customer.period.lateNight': '夜深了,欢迎回来',
'login.care.customer.periodNote.morning': '很高兴又见到你。',
'login.care.customer.periodNote.afternoon': '继续你的行程,我们在这儿。',
'login.care.customer.periodNote.evening': '回来就好,慢慢来就行。',
'login.care.customer.periodNote.lateNight': '先照顾好自己,我们一直在。',
'login.care.customer.afterHoursGreeting': '欢迎回来',
'login.care.customer.afterHoursNote': '随时登录都欢迎,不着急。',
'login.care.customer.holiday.newYear': '元旦快乐,欢迎回来',
'login.care.customer.holiday.springFestival': '新春快乐,欢迎回来',
'login.care.customer.holiday.qingming': '清明时节,欢迎回来',
'login.care.customer.holiday.laborDay': '劳动节快乐,欢迎回来',
'login.care.customer.holiday.dragonBoat': '端午安康,欢迎回来',
'login.care.customer.holiday.midAutumn': '中秋快乐,欢迎回来',
'login.care.customer.holiday.nationalDay': '国庆快乐,欢迎回来',
'login.care.customer.holidayNote.newYear': '新的一年,仍欢迎你常来。',
'login.care.customer.holidayNote.springFestival': '过年好。回来坐坐就好。',
'login.care.customer.holidayNote.qingming': '愿你安好,欢迎随时回来。',
'login.care.customer.holidayNote.laborDay': '假期愉快,欢迎回来。',
'login.care.customer.holidayNote.dragonBoat': '端午安康,欢迎回来。',
'login.care.customer.holidayNote.midAutumn': '月圆人圆,欢迎回来。',
'login.care.customer.holidayNote.nationalDay': '假期愉快,欢迎回来。',
'login.hero.trackPlaceholder': '请输入跟踪单号', 'login.hero.trackPlaceholder': '请输入跟踪单号',
'login.hero.track': '查询物流', 'login.hero.track': '查询物流',
'login.hero.trust.customer': '美欧东南亚 · 仓配一体 · AI 陪跑', 'login.hero.trust.customer': '美欧东南亚 · 仓配一体 · AI 陪跑',

View File

@ -33,7 +33,8 @@
const isNarrow = window.matchMedia('(max-width: 640px)').matches; const isNarrow = window.matchMedia('(max-width: 640px)').matches;
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const dprCap = 1.5; /* Retina 提到 2,避免 Mac 标题比 Win 更糊;尺寸仍由 --ai-title-h 统一 */
const dprCap = 2;
const ENTER_DELAY = 80; const ENTER_DELAY = 80;
const TEXT_AT = 120; const TEXT_AT = 120;
@ -290,10 +291,10 @@
.ai-runway { .ai-runway {
position: relative; position: relative;
z-index: 2; z-index: 2;
/* 宽度由脚本按文字实测写入;这里只定高度兜底 */ /* 宽度由脚本按文字实测写入;高度与官网 --ai-title-h 对齐,勿再按矮屏砍到 42px */
width: auto; width: auto;
max-width: 100%; max-width: 100%;
height: clamp(44px, 5.5vw, 64px); height: var(--ai-title-h, clamp(48px, min(5.5vw, 7vh), 64px));
margin: 0 auto; margin: 0 auto;
pointer-events: none; pointer-events: none;
} }
@ -304,15 +305,9 @@
height: 100%; height: 100%;
} }
@media (max-height: 900px) {
.ai-runway {
height: 42px;
}
}
@media (max-width: 640px) { @media (max-width: 640px) {
.ai-runway { .ai-runway {
height: 46px; height: var(--ai-title-h, clamp(44px, min(8vw, 6vh), 52px));
} }
} }
</style> </style>

View File

@ -124,6 +124,9 @@ body.command-home {
--ai-action-hover: #e25557; --ai-action-hover: #e25557;
--ai-action-rgb: 245, 102, 104; --ai-action-rgb: 245, 102, 104;
--ai-accent-rgb: 245, 102, 104; --ai-accent-rgb: 245, 102, 104;
/* 欢迎区飞机/标题:Mac/Win 共用流体尺寸,勿再按 max-height 砍半 */
--ai-plane-w: clamp(280px, min(40vw, 48vh), 448px);
--ai-title-h: clamp(48px, min(5.5vw, 7vh), 64px);
--ai-text: #121820; --ai-text: #121820;
--ai-text-2: #3d4754; --ai-text-2: #3d4754;
--ai-text-3: #6a7380; --ai-text-3: #6a7380;
@ -2472,7 +2475,7 @@ body.command-home #navbar .site-nav-avatar:hover {
justify-content: center; justify-content: center;
width: 100%; width: 100%;
margin: 2px auto 0; margin: 2px auto 0;
min-height: 64px; min-height: var(--ai-title-h, 64px);
box-sizing: border-box; box-sizing: border-box;
} }
@ -3957,7 +3960,11 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
.ai-welcome-plane img { .ai-welcome-plane img {
position: relative; position: relative;
z-index: 2; z-index: 2;
width: min(448px, 40vw); /*
* 统一视觉比例:用 vw+vh 流体尺寸,避免「高度 <900 直接砍半」
* (MacBook 逻辑高度常 800–880,旧规则会变成 180px,Win 外接屏却仍 448px)
*/
width: var(--ai-plane-w, clamp(280px, min(40vw, 48vh), 448px));
height: auto; height: auto;
display: block; display: block;
/* 去掉常驻 drop-shadow / 无限呼吸,减少首页持续合成开销 */ /* 去掉常驻 drop-shadow / 无限呼吸,减少首页持续合成开销 */
@ -4033,8 +4040,10 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
body.command-home .ai-welcome-plane { body.command-home .ai-welcome-plane {
margin-bottom: -18px; margin-bottom: -18px;
} }
body.command-home .ai-welcome-plane img { /* 矮屏只略收,不再砍飞机/标题(与桌面同一套流体变量) */
width: min(180px, 20vw); body.command-home {
--ai-plane-w: clamp(260px, min(38vw, 42vh), 400px);
--ai-title-h: clamp(46px, min(5.2vw, 6.5vh), 58px);
} }
} }
@ -5165,8 +5174,8 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
width: 13px; width: 13px;
height: 13px; height: 13px;
} }
.ai-welcome-plane img { body.command-home {
width: min(280px, 42vw); --ai-plane-w: clamp(240px, min(42vw, 40vh), 320px);
} }
} }
@ -5174,6 +5183,8 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
/* 仅官网:勿写裸 :root / .ai-advisor-layout,避免串到 H5 EdiAssistant */ /* 仅官网:勿写裸 :root / .ai-advisor-layout,避免串到 H5 EdiAssistant */
body.command-home { body.command-home {
--ai-header-h: 64px; --ai-header-h: 64px;
--ai-plane-w: clamp(180px, min(62vw, 36vh), 260px);
--ai-title-h: clamp(44px, min(8vw, 6vh), 52px);
} }
body.command-home #header { body.command-home #header {
padding-top: env(safe-area-inset-top, 0px); padding-top: env(safe-area-inset-top, 0px);
@ -5216,12 +5227,9 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
display: flex; display: flex;
margin: 0 0 -14px; margin: 0 0 -14px;
} }
body.command-home .ai-welcome-plane img {
width: min(220px, 62vw);
}
.ai-welcome-title-wrap { .ai-welcome-title-wrap {
margin-top: 4px; margin-top: 4px;
min-height: 56px; min-height: var(--ai-title-h, 52px);
} }
.ai-welcome-cta { .ai-welcome-cta {
min-height: 32px; min-height: 32px;