feat: 客户登录品牌布局与官网登录体验优化
All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m0s

收紧客户登录左区品牌层次,补查单/看价入口,并顺带优化验证码、注册与官网跑道表现。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zzh 2026-11-14 22:31:17 +08:00
parent 5010213539
commit f511c3b8d8
23 changed files with 1058 additions and 611 deletions

View File

@ -50,17 +50,15 @@
const isPageIris = computed(() => portalTransition.value === 'oms-iris');
/**
* 圆半径用百分比时,约 71% 就盖住视口四角。
* 收到 80% 为止,整段时间都在铺画面,不再扩到 150% 后空转。
* 曲线前段就有位移、后段轻轻收住,避免猛地撑开或开头发呆。
* 圆半径约 71% 盖住四角;收到 78% 留余量。
* 时长略收、缓动更匀,减少「点了发呆再猛撑开」的感觉。
*/
const IRIS_MS = 920;
const IRIS_EASE = 'cubic-bezier(0.33, 0.5, 0.22, 1)';
/** 新页图片解码最多等这么久,超时也开动画,避免点击发僵 */
const IRIS_READY_CAP_MS = 160;
const IRIS_MS = 720;
const IRIS_EASE = 'cubic-bezier(0.22, 0.82, 0.28, 1)';
/** 新页最多等一帧解码窗口;超时也开裁剪,优先跟手 */
const IRIS_READY_CAP_MS = 64;
const IRIS_AT = '50% 50%';
/** 约 71% 盖住四角,收到 80% 留一点余量 */
const IRIS_END = '80%';
const IRIS_END = '78%';
function clearPortalTransition() {
portalTransition.value = '';
@ -161,6 +159,7 @@
async function playIrisEnter(node: HTMLElement, done: () => void) {
prepareSheet(node, 1);
node.style.willChange = 'clip-path';
node.style.transform = 'translateZ(0)';
node.style.pointerEvents = 'none';
node.style.clipPath = 'none';
node.style.setProperty('-webkit-clip-path', 'none');
@ -193,22 +192,24 @@
const at = IRIS_AT;
const end = IRIS_END;
const startClip = `circle(0% at ${at})`;
const endClip = `circle(${end} at ${at})`;
// 先收到 0 再抬到上层,避免动画首帧还没写上时整页闪一下
node.style.clipPath = `circle(0% at ${at})`;
node.style.setProperty('-webkit-clip-path', `circle(0% at ${at})`);
node.style.clipPath = startClip;
node.style.setProperty('-webkit-clip-path', startClip);
node.style.zIndex = '3';
// 强制一次合成同步,减少首帧卡顿
void node.offsetWidth;
try {
anim = node.animate(
[
{ clipPath: `circle(0% at ${at})` },
{ clipPath: `circle(${end} at ${at})` },
],
{
duration: IRIS_MS,
easing: IRIS_EASE,
fill: 'forwards',
},
);
const frames = [
{ clipPath: startClip, webkitClipPath: startClip },
{ clipPath: endClip, webkitClipPath: endClip },
] as Keyframe[];
anim = node.animate(frames, {
duration: IRIS_MS,
easing: IRIS_EASE,
fill: 'forwards',
});
} catch {
finish();
return;

View File

@ -588,7 +588,6 @@ declare module 'vue' {
readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']>
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
readonly useLocalStorage: UnwrapRef<typeof import('@vueuse/core')['useLocalStorage']>
readonly useLoginCaptchaGate: UnwrapRef<typeof import('./composables/useLoginCaptchaGate')['useLoginCaptchaGate']>
readonly useMagicKeys: UnwrapRef<typeof import('@vueuse/core')['useMagicKeys']>
readonly useManualRefHistory: UnwrapRef<typeof import('@vueuse/core')['useManualRefHistory']>
readonly useMediaControls: UnwrapRef<typeof import('@vueuse/core')['useMediaControls']>

View File

@ -1,13 +1,20 @@
<template>
<div v-if="visible" class="login-captcha">
<label class="login-captcha__field" :class="{ 'is-focused': focused, 'is-filled': !!modelValue }">
<div
v-if="visible"
class="login-captcha"
:class="{ 'is-focused': focused, 'is-loading': loading }"
>
<label class="login-captcha__field" :class="{ 'is-filled': !!modelValue }">
<span v-if="floatLabel" class="login-captcha__float">{{ floatLabel }}</span>
<input
ref="inputRef"
:value="modelValue"
class="login-captcha__input"
type="text"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
spellcheck="false"
maxlength="8"
:placeholder="placeholder"
:aria-label="ariaLabel || floatLabel || placeholder"
@ -16,6 +23,7 @@
@input="onInput"
/>
</label>
<button
type="button"
class="login-captcha__image"
@ -24,14 +32,24 @@
:aria-label="refreshTitle"
@click="refresh"
>
<img v-if="imageSrc" :src="imageSrc" alt="" draggable="false" />
<img
v-if="displaySrc"
:src="displaySrc"
alt=""
draggable="false"
:class="{ 'is-dimmed': loading }"
/>
<span v-else class="login-captcha__loading">{{ loadingText }}</span>
<span class="login-captcha__refresh" aria-hidden="true">
<icon-refresh :size="16" :class="{ 'is-spinning': loading }" />
</span>
</button>
</div>
</template>
<script lang="ts" setup>
import { computed, onMounted, ref, watch } from 'vue';
import { computed, nextTick, onMounted, ref, watch } from 'vue';
import { IconRefresh } from '@arco-design/web-vue/es/icon';
import { fetchLoginCaptcha } from '@/api/rbac/login-guard';
defineOptions({ name: 'LoginCaptchaField' });
@ -45,6 +63,7 @@ const props = withDefaults(
ariaLabel?: string;
refreshTitle?: string;
loadingText?: string;
autofocus?: boolean;
}>(),
{
visible: true,
@ -54,6 +73,7 @@ const props = withDefaults(
ariaLabel: '',
refreshTitle: '点击刷新验证码',
loadingText: '加载中',
autofocus: true,
},
);
@ -63,18 +83,32 @@ const emit = defineEmits<{
refreshed: [];
}>();
const inputRef = ref<HTMLInputElement | null>(null);
const focused = ref(false);
const loading = ref(false);
const captchaId = ref('');
const imageBase64 = ref('');
/** 刷新时保留上一张图,避免闪空白 */
const displayBase64 = ref('');
const imageSrc = computed(() =>
imageBase64.value ? `data:image/png;base64,${imageBase64.value}` : '',
);
const displaySrc = computed(() =>
displayBase64.value ? `data:image/png;base64,${displayBase64.value}` : imageSrc.value,
);
function onInput(e: Event) {
const el = e.target as HTMLInputElement;
emit('update:modelValue', (el.value || '').trim().toUpperCase());
const next = (el.value || '').replace(/\s+/g, '').toUpperCase();
if (el.value !== next) el.value = next;
emit('update:modelValue', next);
}
async function focusInput() {
if (!props.autofocus) return;
await nextTick();
inputRef.value?.focus();
}
async function refresh() {
@ -84,19 +118,22 @@ async function refresh() {
const res = await fetchLoginCaptcha();
captchaId.value = res.captchaId;
imageBase64.value = res.imageBase64;
displayBase64.value = res.imageBase64;
emit('update:captchaId', res.captchaId);
emit('update:modelValue', '');
emit('refreshed');
await focusInput();
} catch {
captchaId.value = '';
imageBase64.value = '';
displayBase64.value = '';
emit('update:captchaId', '');
} finally {
loading.value = false;
}
}
defineExpose({ refresh, captchaId });
defineExpose({ refresh, captchaId, focus: focusInput });
watch(
() => props.visible,
@ -105,6 +142,7 @@ watch(
else {
captchaId.value = '';
imageBase64.value = '';
displayBase64.value = '';
emit('update:captchaId', '');
emit('update:modelValue', '');
}
@ -118,95 +156,199 @@ onMounted(() => {
<style lang="less" scoped>
.login-captcha {
box-sizing: border-box;
display: flex;
align-items: stretch;
gap: 8px;
width: 100%;
height: 56px;
border: 1px solid #d2d2d7;
border-radius: 12px;
background: #fff;
overflow: hidden;
transition:
border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
background 0.2s cubic-bezier(0.22, 1, 0.36, 1);
&:hover:not(.is-focused) {
border-color: #c7c7cc;
}
&.is-focused {
border-color: color-mix(in srgb, var(--app-primary-color, #1d7281) 72%, #d2d2d7);
box-shadow:
0 0 0 3px color-mix(in srgb, var(--app-primary-color, #1d7281) 16%, transparent),
0 1px 2px color-mix(in srgb, var(--app-primary-color, #1d7281) 8%, transparent);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 5%, #fff);
}
}
.login-captcha__field {
position: relative;
flex: 1;
min-width: 0;
position: relative;
display: flex;
align-items: center;
height: 40px;
padding: 0 12px;
border: 1px solid #e5e6eb;
border-radius: 8px;
background: #fff;
transition: border-color 0.15s ease;
&.is-focused {
border-color: var(--app-primary-color, #1d7281);
}
display: block;
margin: 0;
padding: 0;
cursor: text;
}
.login-captcha__float {
position: absolute;
left: 12px;
left: 14px;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
color: #86909c;
z-index: 2;
max-width: calc(100% - 28px);
margin: 0;
padding: 0;
font-size: 15px;
font-weight: 400;
line-height: 1.2;
color: #86868b;
pointer-events: none;
transition: all 0.15s ease;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transform: translateY(-50%);
transform-origin: left center;
transition:
top 0.22s cubic-bezier(0.22, 1, 0.36, 1),
transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
font-size 0.22s cubic-bezier(0.22, 1, 0.36, 1),
color 0.18s ease;
}
.login-captcha__field.is-focused .login-captcha__float,
.login-captcha.is-focused .login-captcha__float,
.login-captcha__field.is-filled .login-captcha__float {
top: 8px;
transform: none;
top: 6px;
font-size: 11px;
font-weight: 500;
color: #6e6e73;
transform: translateY(0);
}
.login-captcha.is-focused .login-captcha__float {
color: var(--app-primary-color, #1d7281);
}
.login-captcha__input {
box-sizing: border-box;
display: block;
width: 100%;
height: 100%;
height: 54px;
margin: 0;
padding: 22px 12px 8px 14px;
border: none;
outline: none;
background: transparent;
font-size: 15px;
font-weight: 600;
letter-spacing: 0.12em;
color: #1d2129;
padding-top: 10px;
line-height: 26px;
letter-spacing: 0.14em;
color: #1d1d1f;
caret-color: var(--app-primary-color, #1d7281);
}
.login-captcha__field:not(.is-focused):not(.is-filled) .login-captcha__input {
padding-top: 0;
.login-captcha:not(.is-focused) .login-captcha__field:not(.is-filled) .login-captcha__input {
padding: 0 14px;
line-height: 54px;
}
.login-captcha__image {
flex: 0 0 120px;
width: 120px;
height: 40px;
position: relative;
box-sizing: border-box;
flex: 0 0 128px;
width: 128px;
height: 54px;
margin: 0;
padding: 0;
border: 1px solid #e5e6eb;
border-radius: 8px;
border: none;
border-left: 1px solid #e8e8ed;
background: #f7f8fa;
overflow: hidden;
cursor: pointer;
transition: background 0.18s ease;
&:hover:not(:disabled) {
background: #f0f1f4;
.login-captcha__refresh {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
img:not(.is-dimmed) {
opacity: 0.55;
}
}
&:focus-visible {
outline: 2px solid color-mix(in srgb, var(--app-primary-color, #1d7281) 55%, transparent);
outline-offset: -2px;
}
img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-fit: contain;
object-position: center;
transition: opacity 0.2s ease;
user-select: none;
&.is-dimmed {
opacity: 0.35;
}
}
&:disabled {
opacity: 0.7;
cursor: wait;
}
}
.login-captcha__refresh {
position: absolute;
top: 50%;
left: 50%;
z-index: 1;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 999px;
color: #fff;
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 88%, #000);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
opacity: 0;
transform: translate(-50%, -50%) scale(0.86);
pointer-events: none;
transition:
opacity 0.18s ease,
transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.login-captcha.is-loading .login-captcha__refresh {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
.login-captcha__refresh :deep(.is-spinning) {
animation: login-captcha-spin 0.7s linear infinite;
}
@keyframes login-captcha-spin {
to {
transform: rotate(360deg);
}
}
.login-captcha__loading {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 12px;
color: #86909c;
color: #86868b;
}
</style>

View File

@ -521,10 +521,12 @@ export default {
'marketing.register.brandHint': 'Welcome to BCD customer portal',
'marketing.register.brandHint.web': 'Register with email & phone',
'marketing.register.brandHint.wechat': 'Register with WeChat',
'marketing.register.choose.group': 'Choose how to register',
'marketing.register.choose.web': 'Web register',
'marketing.register.choose.webDesc': 'Fill in details and open your portal',
'marketing.register.choose.wechat': 'WeChat register',
'marketing.register.choose.wechatDesc': 'Scan to authorize and finish quickly',
'marketing.register.choose.recommended': 'Recommended',
'marketing.register.backToChoose': '← Back to options',
'marketing.register.referrerHint': 'Invited by {name} ({code})',

View File

@ -518,10 +518,12 @@ export default {
'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
'marketing.register.choose.group': '选择注册方式',
'marketing.register.choose.web': '网页注册',
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
'marketing.register.choose.wechat': '微信注册',
'marketing.register.choose.wechatDesc': '扫码授权,快捷完成注册',
'marketing.register.choose.recommended': '推荐',
'marketing.register.backToChoose': '← 返回选择注册方式',
'marketing.register.referrerHint': '您正通过 {name}({code})的邀请注册',

View File

@ -282,7 +282,8 @@ onMounted(() => {
width: 100%;
max-width: 420px;
margin: 0 auto;
padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px));
/* 底留白避开固定门户切换钮 */
padding: 24px 16px calc(64px + env(safe-area-inset-bottom, 0px));
box-sizing: border-box;
display: flex;
flex-direction: column;
@ -293,13 +294,13 @@ onMounted(() => {
background: #ffffff;
border: 1px solid #e8e8ed;
border-radius: 16px;
padding: 28px 20px 22px;
padding: 32px 20px 28px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.05);
}
.h5-login-card__brand {
text-align: center;
margin: 0 0 24px;
margin: 0 0 28px;
}
.h5-login-card__brand-row {
@ -411,7 +412,7 @@ onMounted(() => {
.h5-login-row.is-focused .h5-login-float,
.h5-login-row.is-filled .h5-login-float,
.h5-login-row:has(input:-webkit-autofill) .h5-login-float {
top: 9px;
top: 6px;
font-size: 11px;
font-weight: 500;
color: #6e6e73;
@ -429,8 +430,8 @@ onMounted(() => {
.h5-login-form :deep(.arco-input-wrapper),
.h5-login-form :deep(.arco-input-password) {
width: 100%;
min-height: 52px;
padding: 16px 12px 6px 14px;
min-height: 56px;
padding: 22px 12px 8px 14px;
border: none !important;
border-radius: 0;
background: transparent !important;
@ -496,7 +497,7 @@ onMounted(() => {
}
.h5-login-submit {
margin-top: 20px;
margin-top: 24px;
height: 44px !important;
border-radius: 980px !important;
font-size: 15px !important;

View File

@ -5,8 +5,9 @@
replace
:title="label"
:aria-label="label"
@click="onSwitchClick"
>
<icon-swap :size="18" />
<icon-swap :size="16" />
</router-link>
</template>
@ -14,6 +15,7 @@
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { IconSwap } from '@arco-design/web-vue/es/icon';
import { armPageFlip } from '@/utils/page-transition-flag';
const props = defineProps<{
/** 当前页面对侧:admin=去管理登录;customer=去客户登录 */
@ -31,31 +33,46 @@ const label = computed(() =>
? t('h5.login.switchToAdmin')
: t('h5.login.switchToCustomer'),
);
function onSwitchClick(e: MouseEvent) {
if (
e.button !== 0 ||
e.metaKey ||
e.ctrlKey ||
e.shiftKey ||
e.altKey
) {
return;
}
armPageFlip();
}
</script>
<style lang="less" scoped>
.h5-login-portal-switch {
position: fixed;
right: 14px;
bottom: calc(14px + env(safe-area-inset-bottom, 0px));
right: max(16px, env(safe-area-inset-right, 0px));
bottom: calc(18px + env(safe-area-inset-bottom, 0px));
z-index: 30;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
width: 36px;
height: 36px;
border-radius: 50%;
color: #c9cdd4;
color: #c7c7cc;
text-decoration: none;
background: transparent;
border: none;
opacity: 0.28;
background: rgba(255, 255, 255, 0.72);
border: 1px solid #e8e8ed;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
opacity: 1;
-webkit-tap-highlight-color: transparent;
transition: opacity 0.15s ease, color 0.15s ease;
transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
&:active {
opacity: 0.55;
color: #c9cdd4;
color: #86868b;
background: #f5f5f7;
border-color: #d2d2d7;
}
}
</style>

View File

@ -547,7 +547,8 @@ onMounted(async () => {
width: 100%;
max-width: 420px;
margin: 0 auto;
padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px));
/* 底留白避开固定门户切换钮 */
padding: 24px 16px calc(64px + env(safe-area-inset-bottom, 0px));
box-sizing: border-box;
display: flex;
flex-direction: column;
@ -558,13 +559,13 @@ onMounted(async () => {
background: #ffffff;
border: 1px solid #e8e8ed;
border-radius: 16px;
padding: 28px 20px 22px;
padding: 32px 20px 28px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.05);
}
.h5-login-card__brand {
text-align: center;
margin: 0 0 24px;
margin: 0 0 28px;
}
.h5-login-card__brand-row {
@ -682,7 +683,7 @@ onMounted(async () => {
.h5-login-row.is-focused .h5-login-float,
.h5-login-row.is-filled .h5-login-float,
.h5-login-row:has(input:-webkit-autofill) .h5-login-float {
top: 9px;
top: 6px;
font-size: 11px;
font-weight: 500;
color: #6e6e73;
@ -700,8 +701,8 @@ onMounted(async () => {
.h5-login-form :deep(.arco-input-wrapper),
.h5-login-form :deep(.arco-input-password) {
width: 100%;
min-height: 52px;
padding: 16px 12px 6px 14px;
min-height: 56px;
padding: 22px 12px 8px 14px;
border: none !important;
border-radius: 0;
background: transparent !important;
@ -799,7 +800,7 @@ onMounted(async () => {
}
.h5-login-submit {
margin-top: 20px;
margin-top: 24px;
height: 44px !important;
border-radius: 980px !important;
font-size: 15px;
@ -813,7 +814,7 @@ onMounted(async () => {
}
.h5-login-alt {
margin-top: 20px;
margin-top: 22px;
padding-top: 16px;
border-top: 1px solid #f0f0f2;
display: flex;

View File

@ -1,27 +1,74 @@
<template>
<div :class="['login-hero', { 'login-hero--light': light, 'login-hero--admin': !isCustomer }]">
<div
:class="[
'login-hero',
{
'login-hero--light': light,
'login-hero--customer': isCustomer,
'login-hero--admin': !isCustomer,
},
]"
>
<div v-if="isCustomer" class="login-hero__ambient" aria-hidden="true">
<span class="login-hero__watermark">{{ t('brand.name') }}</span>
</div>
<div class="login-hero__inner">
<picture
v-if="isCustomer"
class="login-hero__silhouette"
aria-hidden="true"
>
<source srcset="/login-assets/hero-plane.webp" type="image/webp" />
<img
src="/login-assets/hero-plane.png"
alt=""
draggable="false"
decoding="async"
/>
</picture>
<div class="login-hero__content">
<div v-if="isCustomer" class="login-hero__heading">
<h1 class="login-hero__title">{{ t('brand.name') }}</h1>
<span class="login-hero__sep" aria-hidden="true">I</span>
<span class="login-hero__tagline">{{ t('login.hero.tagline') }}</span>
<h1 class="login-hero__tagline">{{ t('brand.fullName') }}</h1>
<span class="login-hero__rule" aria-hidden="true" />
<p class="login-hero__trust">{{ t('login.hero.trust.customer') }}</p>
</div>
<template v-if="isCustomer">
<p class="login-hero__desc">{{ t('login.hero.desc.customer') }}</p>
<form class="login-hero__search" @submit.prevent="onTrackSubmit">
<input
v-model="trackingNo"
type="text"
class="login-hero__search-input"
:placeholder="t('login.hero.trackPlaceholder')"
autocomplete="off"
/>
<button type="submit" class="login-hero__search-btn">
{{ t('login.hero.track') }}
</button>
</form>
<p class="login-hero__desc">
{{ t('login.hero.desc.customer') }}
</p>
<div class="login-hero__tools">
<form class="login-hero__search" @submit.prevent="onTrackSubmit">
<input
v-model="trackingNo"
type="text"
class="login-hero__search-input"
:placeholder="t('login.hero.trackPlaceholder')"
autocomplete="off"
/>
<button type="submit" class="login-hero__search-btn">
{{ t('login.hero.track') }}
</button>
</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>
</template>
<template v-else>
@ -74,19 +121,8 @@
</template>
</div>
<div class="login-hero__visual">
<picture v-if="isCustomer">
<source srcset="/login-assets/hero-plane.webp" type="image/webp" />
<img
class="login-hero__plane"
src="/login-assets/hero-plane.png"
alt=""
draggable="false"
decoding="async"
/>
</picture>
<div v-if="!isCustomer" class="login-hero__visual">
<img
v-else
class="login-hero__truck"
src="/login-assets/hero-truck.png"
alt=""
@ -100,7 +136,7 @@
<script lang="ts" setup>
import { computed, onBeforeUnmount, onMounted, ref, type Component } from 'vue';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { Message } from '@arco-design/web-vue';
import {
@ -109,7 +145,6 @@ import {
IconMindMapping,
IconRobot,
} from '@arco-design/web-vue/es/icon';
defineOptions({ name: 'LoginHero' });
interface HeroPillar {
@ -180,6 +215,7 @@ const props = withDefaults(
);
const { t } = useI18n();
const route = useRoute();
const router = useRouter();
const trackingNo = ref('');
const activePrinciple = ref(0);
@ -187,6 +223,10 @@ const hovered = ref(false);
let cycleTimer: ReturnType<typeof window.setInterval> | null = null;
const isCustomer = computed(() => props.portal === 'customer');
/** 注册页复用同一 Hero,不再展示「去注册看价」 */
const showRegisterQuoteCta = computed(
() => !String(route.path || '').startsWith('/register'),
);
const activePillars = computed(() =>
props.portal === 'agent' ? agentPillars : adminPillars,
);
@ -216,7 +256,21 @@ function onTrackSubmit() {
Message.info(t('login.hero.trackPlaceholder'));
return;
}
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(() => {
@ -245,6 +299,67 @@ onBeforeUnmount(() => {
padding: 0 8px;
}
.login-hero--customer {
position: relative;
width: 100%;
height: 100%;
min-height: 420px;
overflow: hidden;
}
/* 氛围层:大水印 + 光晕 + 淡剪影,填左区空白但不抢文案 */
.login-hero__ambient {
position: absolute;
inset: 0;
z-index: 0;
pointer-events: none;
overflow: hidden;
}
.login-hero__watermark {
position: absolute;
left: 0;
top: 2%;
font-size: clamp(6rem, 16vw, 12rem);
font-weight: 800;
letter-spacing: 0.06em;
line-height: 0.9;
color: rgba(255, 255, 255, 0.1);
white-space: nowrap;
user-select: none;
}
.login-hero--customer .login-hero__silhouette {
position: absolute;
top: 0;
right: 0;
z-index: 0;
width: min(420px, 52%);
margin: 0;
opacity: 0.2;
pointer-events: none;
filter: saturate(0.7) brightness(1.05);
}
.login-hero__silhouette img {
display: block;
width: 100%;
height: auto;
transform: rotate(4deg);
user-select: none;
}
.login-hero--customer .login-hero__inner {
position: relative;
z-index: 1;
justify-content: flex-start;
align-items: center;
width: 100%;
height: 100%;
/* 顶部留给 BCD 水印,文案避开重叠 */
padding: clamp(96px, 14vh, 160px) 24px 48px 8px;
}
.login-hero__content {
position: relative;
z-index: 2;
@ -253,6 +368,154 @@ onBeforeUnmount(() => {
max-width: 560px;
}
.login-hero--customer .login-hero__content {
display: flex;
flex-direction: column;
max-width: 480px;
gap: 24px;
}
/* 客户:品牌 / 文案 / 工具 三层 */
.login-hero--customer .login-hero__heading {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
margin: 0;
}
.login-hero--customer .login-hero__tagline {
margin: 0;
font-size: clamp(1.05rem, 1.55vw, 1.4rem);
font-weight: 600;
letter-spacing: 0.04em;
line-height: 1.35;
color: rgba(255, 255, 255, 0.9);
}
.login-hero--customer .login-hero__rule {
display: block;
width: 36px;
height: 2px;
margin: 6px 0 2px;
border-radius: 999px;
background: color-mix(in srgb, var(--app-primary-color, #007979) 78%, #fff);
}
.login-hero--customer .login-hero__trust {
margin: 0;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 1.45;
color: rgba(255, 255, 255, 0.5);
}
.login-hero--customer .login-hero__desc {
max-width: 34em;
margin: 0;
font-size: 14px;
line-height: 1.75;
color: rgba(255, 255, 255, 0.7);
}
.login-hero--customer .login-hero__tools {
display: flex;
flex-direction: column;
gap: 14px;
padding-top: 4px;
}
.login-hero__search {
display: flex;
align-items: stretch;
gap: 8px;
max-width: 420px;
margin: 0;
padding: 6px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.16);
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
.login-hero__search-input {
flex: 1;
min-width: 0;
padding: 10px 12px;
border: none;
background: transparent;
font-size: 13px;
color: #fff;
outline: none;
}
.login-hero__search-input::placeholder {
color: rgba(255, 255, 255, 0.42);
}
.login-hero__search-btn {
flex-shrink: 0;
min-width: 88px;
padding: 0 16px;
border: none;
border-radius: 6px;
background: var(--app-primary-color, #007979);
color: #fff;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s, opacity 0.2s;
}
.login-hero__search-btn:hover {
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 {
display: flex;
flex-wrap: wrap;
@ -286,11 +549,11 @@ onBeforeUnmount(() => {
}
.login-hero__desc {
margin: 0 0 32px;
margin: 0;
font-size: 15px;
line-height: 1.7;
color: rgba(255, 255, 255, 0.82);
max-width: 520px;
max-width: 420px;
}
.login-hero--admin {
@ -541,46 +804,6 @@ onBeforeUnmount(() => {
}
}
.login-hero__search {
display: flex;
align-items: stretch;
gap: 10px;
max-width: 480px;
margin-bottom: 28px;
padding: 10px;
background: #fff;
border-radius: 10px;
}
.login-hero__search-input {
flex: 1;
min-width: 0;
padding: 14px 16px;
border: none;
background: transparent;
font-size: 14px;
color: #1a2d4a;
outline: none;
}
.login-hero__search-btn {
flex-shrink: 0;
min-width: 110px;
padding: 0 24px;
border: none;
border-radius: 6px;
background: var(--app-primary-color, #007979);
color: #fff;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.login-hero__search-btn:hover {
background: #006868;
}
.login-hero__visual {
position: relative;
z-index: 1;
@ -589,25 +812,9 @@ onBeforeUnmount(() => {
display: flex;
justify-content: center;
align-items: center;
margin-top: -1000px;
margin-left: -200px;
pointer-events: none;
}
.login-hero__plane {
width: 100%;
max-width: 420px;
height: auto;
margin-top: 200px;
margin-left: -200px;
display: block;
opacity: 1;
transform-origin: 50% 50%;
transform: translate3d(100px, 96px, 0) scale(2.73);
pointer-events: none;
user-select: none;
}
.login-hero--admin .login-hero__truck {
width: 100%;
max-width: none;
@ -629,10 +836,62 @@ onBeforeUnmount(() => {
color: #1a2d4a;
}
.login-hero--light.login-hero--customer .login-hero__tagline {
color: #1a2d4a;
}
.login-hero--light .login-hero__desc {
color: rgba(26, 45, 74, 0.58);
}
.login-hero--light.login-hero--customer .login-hero__desc {
color: rgba(26, 45, 74, 0.52);
}
.login-hero--light.login-hero--customer .login-hero__trust {
color: rgba(26, 45, 74, 0.42);
}
.login-hero--light.login-hero--customer .login-hero__rule {
background: var(--app-primary-color, #007979);
}
.login-hero--light .login-hero__watermark {
color: rgba(26, 45, 74, 0.1);
}
.login-hero--light .login-hero__silhouette,
.login-hero--light.login-hero--customer .login-hero__silhouette {
opacity: 0.12;
filter: saturate(0.55) brightness(0.95);
}
.login-hero--light .login-hero__search {
border-color: rgba(26, 45, 74, 0.12);
background: rgba(255, 255, 255, 0.72);
}
.login-hero--light .login-hero__search-input {
color: #1a2d4a;
}
.login-hero--light .login-hero__search-input::placeholder {
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 {
&::before {
background: rgba(26, 45, 74, 0.12);
@ -684,10 +943,6 @@ onBeforeUnmount(() => {
}
@media screen and (max-width: 1250px) {
.login-hero__visual {
display: none;
}
.login-hero--admin .login-hero__visual {
display: flex;
}

View File

@ -69,8 +69,8 @@ function onSwitchClick(e: MouseEvent) {
<style lang="less" scoped>
.login-portal-switch {
position: absolute;
right: 14px;
bottom: 14px;
right: 16px;
bottom: 16px;
z-index: 2;
display: inline-flex;
align-items: center;

View File

@ -607,7 +607,7 @@ async function handleSubmit() {
.nova-login__row.is-focused .nova-login__float,
.nova-login__row.is-filled .nova-login__float,
.nova-login__row:has(input:-webkit-autofill) .nova-login__float {
top: 9px;
top: 6px;
font-size: 11px;
font-weight: 500;
color: #6e6e73;
@ -625,8 +625,8 @@ async function handleSubmit() {
.nova-login__form :deep(.arco-input-wrapper),
.nova-login__form :deep(.arco-input-password) {
width: 100%;
min-height: 52px;
padding: 16px 12px 6px 14px;
min-height: 56px;
padding: 22px 12px 8px 14px;
border: none !important;
border-radius: 0;
background: transparent !important;
@ -708,7 +708,7 @@ async function handleSubmit() {
.nova-login__submit {
width: 100%;
height: 44px;
margin-top: 20px;
margin-top: 24px;
font-size: 15px;
font-weight: 600;
border-radius: 980px;

View File

@ -3,6 +3,7 @@
:class="[
'login-container',
{
'login-container--customer': isCustomerLogin,
'login-container--light': isLightMode,
'login-container--exit': isExiting,
},
@ -118,7 +119,7 @@ import { isPortalIrisActive } from '@/utils/page-transition-flag';
const WechatLogin = defineAsyncComponent(
() => import('./components/wechat-login.vue'),
);
/** Characters + gsap are decorative; async so /admin first paint stays light */
/** Characters + gsap are decorative; async so first paint stays light */
const LoginCharacters = defineAsyncComponent(
() => import('./components/LoginCharacters.vue'),
);
@ -140,7 +141,7 @@ const isAdminLogin = computed(() => loginType.value === OmsLoginType.User);
const brandCornerSuffix = computed(() =>
isAgentLogin.value ? t('login.brand.suffix.agent') : t('brand.fullName'),
);
/** 角色动画偏重,首屏延后一帧再挂,管理端也挂但异步分包 */
/** 角色动画偏重,首屏延后空闲再挂 */
const showCharacters = ref(false);
/** 管理端关怀条在翻页结束后再挂,避免展开过程中插入一块新图层 */
const careBannerReady = ref(!isPortalIrisActive());
@ -473,6 +474,29 @@ onBeforeUnmount(() => {
pointer-events: auto;
}
/* 客户左区铺满斜切内,给角色留底;氛围层填空、文案居中偏上 */
.login-container--customer .login-hero-panel {
top: 0;
left: 0;
bottom: 0;
transform: none;
width: calc((var(--login-split-top) + var(--login-split-bottom)) / 2);
max-width: none;
padding: 48px 24px 120px 40px;
display: flex;
align-items: center;
}
.login-characters-panel {
position: absolute;
left: 0;
bottom: 0;
right: auto;
z-index: 6;
pointer-events: auto;
padding: 0 0 16px 8px;
}
.login-hero-panel--admin {
inset: 0;
top: 0;
@ -492,16 +516,6 @@ onBeforeUnmount(() => {
height: 100%;
}
.login-characters-panel {
position: absolute;
left: 0;
bottom: 0;
right: auto;
z-index: 6;
pointer-events: auto;
padding: 0 0 16px 8px;
}
.login-form-toolbar {
position: absolute;
top: 14px;
@ -541,7 +555,8 @@ onBeforeUnmount(() => {
width: 100%;
max-width: 380px;
min-height: auto;
padding: 40px 32px 28px;
/* 底留白给门户切换钮,避免管理端短卡把按钮挤进登录键 */
padding: 44px 32px 56px;
background: var(--login-card-bg);
border: 1px solid #e8e8ed;
outline: none;
@ -614,7 +629,7 @@ onBeforeUnmount(() => {
@media screen and (max-width: 600px) {
.login-form {
max-width: 97% !important;
padding: 32px 20px 24px;
padding: 36px 20px 52px;
border-radius: 14px;
}
}

View File

@ -40,7 +40,7 @@
'login.lang.toZh': 'Switch to Chinese',
'login.hero.tagline': 'Faster · Simpler · Professional',
'login.hero.desc.customer':
'Clear quotes, smooth booking, live tracking. AI flags risks and suggests the next step—so from pickup to delivery, BCD keeps every shipment visible, on time, and accounted for.',
'Clear quotes, smooth booking, live tracking. AI flags risks and suggests next steps—from pickup to delivery, BCD keeps every shipment visible and accounted for.',
'login.hero.admin.pillar.care.title': 'More Professional',
'login.hero.admin.pillar.care.desc': 'Right lanes · No dropped issues · Clear end-to-end',
'login.hero.admin.pillar.speed.title': 'Faster',
@ -88,6 +88,9 @@
'If you\'re still on, finish what\'s urgent — the rest can wait.',
'login.hero.trackPlaceholder': 'Enter tracking number',
'login.hero.track': 'Track',
'login.hero.trust.customer': 'US · EU · SEA · Warehousing · AI-assisted',
'login.hero.cta.registerQuote': 'Register to see rates',
'login.hero.cta.exploreLanes': 'Explore lanes',
'login.field.account': 'Account',
'login.field.account.agent': 'Agent code',
'login.field.password': 'Password',

View File

@ -40,7 +40,7 @@
'login.lang.toZh': '切换为中文',
'login.hero.tagline': 'Faster · Simpler · Professional',
'login.hero.desc.customer':
'查价说得清、下单走得顺、轨迹跟得上。AI 帮你看风险、提建议、少踩坑——从揽收到签收,BCD 陪你把每一票发好、盯紧、交代清楚。',
'查价说得清、下单走得顺、轨迹跟得上。AI 帮你看风险、提建议——从揽收到签收,BCD 陪你把每一票发好、盯紧、交代清楚。',
'login.hero.admin.pillar.care.title': '更专业',
'login.hero.admin.pillar.care.desc': '线路选对 · 异常不丢 · 全程说得清',
'login.hero.admin.pillar.speed.title': '更快速',
@ -81,6 +81,9 @@
'login.care.holidayNote.nationalDay': '假期里若仍在岗,先把最急的办好,其余明天再说。',
'login.hero.trackPlaceholder': '请输入跟踪单号',
'login.hero.track': '查询物流',
'login.hero.trust.customer': '美欧东南亚 · 仓配一体 · AI 陪跑',
'login.hero.cta.registerQuote': '去注册看价',
'login.hero.cta.exploreLanes': '了解线路',
'login.field.account': '账号',
'login.field.account.agent': '代理编号',
'login.field.password': '密码',

View File

@ -59,26 +59,47 @@
<!-- 步骤 1:选择注册方式 -->
<template v-if="step === 'choose'">
<div class="nova-register__choose">
<button type="button" class="nova-register__choose-card" @click="selectWebRegister">
<div class="nova-register__choose" role="group" :aria-label="t('marketing.register.choose.group')">
<button
type="button"
class="nova-register__choose-row"
@click="selectWebRegister"
>
<span class="nova-register__choose-icon nova-register__choose-icon--web">
<icon-computer :size="22" />
<icon-computer :size="20" />
</span>
<span class="nova-register__choose-title">{{ t('marketing.register.choose.web') }}</span>
<span class="nova-register__choose-desc">{{ t('marketing.register.choose.webDesc') }}</span>
<span class="nova-register__choose-copy">
<span class="nova-register__choose-title">{{ t('marketing.register.choose.web') }}</span>
<span class="nova-register__choose-desc">{{ t('marketing.register.choose.webDesc') }}</span>
</span>
<icon-right class="nova-register__choose-arrow" :size="14" />
</button>
<button type="button" class="nova-register__choose-card" @click="selectWechatRegister">
<button
type="button"
class="nova-register__choose-row nova-register__choose-row--wechat"
@mouseenter="prefetchWechatRegister"
@focus="prefetchWechatRegister"
@click="selectWechatRegister"
>
<span class="nova-register__choose-icon nova-register__choose-icon--wechat">
<icon-wechat :size="22" />
<icon-wechat :size="20" />
</span>
<span class="nova-register__choose-title">{{ t('marketing.register.choose.wechat') }}</span>
<span class="nova-register__choose-desc">{{ t('marketing.register.choose.wechatDesc') }}</span>
<span class="nova-register__choose-copy">
<span class="nova-register__choose-title-row">
<span class="nova-register__choose-title">{{ t('marketing.register.choose.wechat') }}</span>
<span class="nova-register__choose-badge">{{ t('marketing.register.choose.recommended') }}</span>
</span>
<span class="nova-register__choose-desc">{{ t('marketing.register.choose.wechatDesc') }}</span>
</span>
<icon-right class="nova-register__choose-arrow" :size="14" />
</button>
</div>
<p class="nova-register__footer">
{{ t('marketing.register.hasAccount') }}
<a-link @click="goLogin">{{ t('marketing.register.goLogin') }}</a-link>
</p>
<div class="nova-register__alt">
<p class="nova-register__alt-hint">
{{ t('marketing.register.hasAccount') }}
<a-link @click="goLogin">{{ t('marketing.register.goLogin') }}</a-link>
</p>
</div>
</template>
<!-- 步骤 2a:网页注册 -->
@ -265,6 +286,7 @@ import { Message } from '@arco-design/web-vue'
import {
IconComputer,
IconMoonFill,
IconRight,
IconSunFill,
IconWechat,
} from '@arco-design/web-vue/es/icon'
@ -367,6 +389,12 @@ function selectWechatRegister() {
step.value = 'wechat'
syncStepQuery('wechat')
}
/** 悬停/聚焦时预拉微信扫码分包,点进后更少等待 */
function prefetchWechatRegister() {
if (preferH5Portal() || isWeChatBrowser()) return
void import('@/views/login/components/wechat-login.vue')
}
const agentValidated = ref<boolean | null>(null)
const agentNameMasked = ref('')
const agentLoading = ref(false)
@ -812,15 +840,15 @@ onBeforeUnmount(() => {
border: none !important;
box-shadow: none !important;
background: transparent !important;
color: rgba(26, 45, 74, 0.72) !important;
color: #86868b !important;
}
.login-form-toolbar :deep(.theme-toggle-btn.arco-btn:hover),
.login-form-toolbar :deep(.login-lang-toggle:hover) {
border: none !important;
box-shadow: none !important;
background: var(--app-acrylic-hover-bg) !important;
color: var(--app-primary-color) !important;
background: rgba(0, 0, 0, 0.04) !important;
color: #1d1d1f !important;
}
.theme-toggle-btn {
@ -831,24 +859,23 @@ onBeforeUnmount(() => {
.login-form {
--login-card-bg: #ffffff;
--login-card-shadow:
inset 0 2px 8px rgba(15, 23, 42, 0.07),
inset 0 1px 1px rgba(15, 23, 42, 0.04);
--login-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 16px 32px rgba(0, 0, 0, 0.06);
position: relative;
z-index: 10;
width: 100%;
max-width: 460px;
padding: 44px 30px 32px;
max-width: 380px;
padding: 40px 32px 28px;
background: var(--login-card-bg);
border: none;
border-radius: 20px;
border: 1px solid #e8e8ed;
border-radius: 16px;
box-shadow: var(--login-card-shadow);
display: flex;
flex-direction: column;
}
.login-form--register {
max-width: 460px;
max-height: min(94dvh, 780px);
}
@ -870,7 +897,7 @@ onBeforeUnmount(() => {
.nova-register__header {
display: block;
text-align: center;
margin-bottom: 18px;
margin-bottom: 28px;
color: inherit;
text-decoration: none;
cursor: pointer;
@ -879,8 +906,10 @@ onBeforeUnmount(() => {
.nova-register__brand-hint {
margin: 8px 0 0;
font-size: 13px;
line-height: 1.4;
color: rgba(15, 39, 68, 0.55);
font-weight: 400;
line-height: 1.35;
color: #86868b;
letter-spacing: -0.01em;
}
.nova-register__back {
@ -904,72 +933,160 @@ onBeforeUnmount(() => {
.nova-register__choose {
display: flex;
flex-direction: column;
gap: 12px;
margin-top: 4px;
width: 100%;
margin: 0;
border: 1px solid #d2d2d7;
border-radius: 12px;
background: #fff;
overflow: hidden;
transition:
border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1);
&:hover {
border-color: #c7c7cc;
}
}
.nova-register__choose-card {
.nova-register__choose-row {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
align-items: center;
gap: 12px;
width: 100%;
padding: 16px 18px;
margin: 0;
padding: 14px 14px 14px 12px;
border: none;
border-radius: 14px;
background: #f0f3f4;
box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
border-radius: 0;
background: transparent;
text-align: left;
cursor: pointer;
font-family: inherit;
transition:
background 0.2s ease,
transform 0.2s ease,
box-shadow 0.2s ease;
transition: background 0.18s cubic-bezier(0.22, 1, 0.36, 1);
& + & {
border-top: 1px solid #d2d2d7;
}
&:hover {
background: color-mix(in srgb, var(--app-primary-color) 8%, #f0f3f4);
box-shadow:
inset 0 2px 8px rgba(15, 23, 42, 0.06),
0 0 0 2px color-mix(in srgb, var(--app-primary-color) 18%, transparent);
transform: translateY(-1px);
background: color-mix(in srgb, var(--app-primary-color) 5%, #fff);
}
&:active {
transform: translateY(0);
background: color-mix(in srgb, var(--app-primary-color) 8%, #fff);
}
&:focus-visible {
outline: none;
background: color-mix(in srgb, var(--app-primary-color) 7%, #fff);
box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--app-primary-color) 35%, transparent);
}
}
.nova-register__choose-row--wechat:hover {
background: color-mix(in srgb, #07c160 6%, #fff);
}
.nova-register__choose-row--wechat:active {
background: color-mix(in srgb, #07c160 10%, #fff);
}
.nova-register__choose-icon {
display: inline-flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
margin-bottom: 6px;
border-radius: 12px;
width: 36px;
height: 36px;
border-radius: 10px;
}
.nova-register__choose-icon--web {
background: color-mix(in srgb, var(--app-primary-color) 14%, #fff);
background: color-mix(in srgb, var(--app-primary-color) 12%, #fff);
color: var(--app-primary-color);
}
.nova-register__choose-icon--wechat {
background: color-mix(in srgb, #07c160 16%, #fff);
background: color-mix(in srgb, #07c160 14%, #fff);
color: #07c160;
}
.nova-register__choose-copy {
display: flex;
flex: 1;
min-width: 0;
flex-direction: column;
gap: 3px;
}
.nova-register__choose-title-row {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.nova-register__choose-title {
font-size: 15px;
font-weight: 700;
color: #0f2744;
font-weight: 600;
line-height: 1.25;
color: #1d1d1f;
}
.nova-register__choose-badge {
flex-shrink: 0;
padding: 1px 6px;
border-radius: 999px;
font-size: 10px;
font-weight: 600;
line-height: 16px;
letter-spacing: 0.02em;
color: #07c160;
background: color-mix(in srgb, #07c160 12%, #fff);
}
.nova-register__choose-desc {
font-size: 12px;
line-height: 1.4;
color: #86909c;
font-weight: 400;
line-height: 1.35;
color: #86868b;
}
.nova-register__choose-arrow {
flex-shrink: 0;
color: #c7c7cc;
transition: color 0.15s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.nova-register__choose-row:hover .nova-register__choose-arrow,
.nova-register__choose-row:focus-visible .nova-register__choose-arrow {
color: var(--app-primary-color);
transform: translateX(2px);
}
.nova-register__choose-row--wechat:hover .nova-register__choose-arrow,
.nova-register__choose-row--wechat:focus-visible .nova-register__choose-arrow {
color: #07c160;
}
.nova-register__alt {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid #f0f0f2;
}
.nova-register__alt-hint {
margin: 0;
font-size: 12px;
line-height: 1.35;
color: #86868b;
:deep(.arco-link) {
color: var(--app-primary-color);
font-weight: 400;
}
}
.nova-register__invite {
@ -1163,12 +1280,13 @@ onBeforeUnmount(() => {
.nova-register__footer {
margin: 16px 0 0;
text-align: center;
font-size: 13px;
color: #86909c;
font-size: 12px;
line-height: 1.35;
color: #86868b;
:deep(.arco-link) {
color: var(--app-primary-color);
font-weight: 600;
font-weight: 400;
}
}

View File

@ -4,10 +4,12 @@ export default {
'marketing.register.brandHint': 'Welcome to BCD customer portal',
'marketing.register.brandHint.web': 'Register with email & phone',
'marketing.register.brandHint.wechat': 'Register with WeChat',
'marketing.register.choose.group': 'Choose how to register',
'marketing.register.choose.web': 'Web register',
'marketing.register.choose.webDesc': 'Fill in details and open your portal',
'marketing.register.choose.wechat': 'WeChat register',
'marketing.register.choose.wechatDesc': 'Scan to authorize and finish quickly',
'marketing.register.choose.recommended': 'Recommended',
'marketing.register.backToChoose': '← Back to options',
'marketing.register.referrerHint': 'Invited by {name} ({code})',

View File

@ -4,10 +4,12 @@ export default {
'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
'marketing.register.choose.group': '选择注册方式',
'marketing.register.choose.web': '网页注册',
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
'marketing.register.choose.wechat': '微信注册',
'marketing.register.choose.wechatDesc': '扫码授权,快捷完成注册',
'marketing.register.choose.recommended': '推荐',
'marketing.register.backToChoose': '← 返回选择注册方式',
'marketing.register.referrerHint': '您正通过 {name}({code})的邀请注册',

View File

@ -17,7 +17,6 @@
<div class="ai-app-main">
<section class="ai-welcome" :class="{ 'is-hidden': chatting }">
<div class="ai-welcome__hero">
<!-- 飞机 / 跑道拆开,便于单独调间距与尺寸;机腹仍对齐 --runway-edge-top -->
<div class="ai-welcome-plane" aria-hidden="true">
<img
src="/site/img/hero-plane-3d.webp"
@ -28,11 +27,9 @@
fetchpriority="high"
/>
</div>
<div class="ai-welcome-runway">
<SiteRunway :text="runwayTitle" />
<h2 class="ai-welcome-title ai-welcome-title--sr">
{{ runwayTitle }}
</h2>
<div class="ai-welcome-title-wrap">
<SiteRunway :text="heroTitle" />
<h1 class="ai-welcome-title ai-welcome-title--sr">{{ heroTitle }}</h1>
</div>
<div class="ai-welcome__stack">
<div class="ai-welcome__command">
@ -116,7 +113,7 @@
</template>
</EdiChatDialog>
</div>
<!-- 沉底通栏:脱出限宽 layout,贴合作伙伴条上方全宽自适应 -->
<!-- 沉底栏:与主内容同宽;合作伙伴条仍全宽 -->
<div v-if="!chatting" class="ai-home-bottom">
<SiteFeaturedRoutes
:is-zh="isZh"
@ -345,7 +342,7 @@
const shortTitle = ref(
typeof window !== 'undefined' && window.matchMedia('(max-width: 640px)').matches,
);
const runwayTitle = computed(() =>
const heroTitle = computed(() =>
shortTitle.value ? copy.value.titleShort : copy.value.title,
);

View File

@ -45,9 +45,11 @@
const dot = isNarrow ? 1.8 : 2;
const influence = 120;
const strength = 18;
const dprCap = 1.25;
const dprCap = 1.1;
/** 上下各约 18% 渐隐,中间才有点阵 */
const edgePad = 0.18;
const cold = 'rgba(15, 23, 42, 1)';
const warm = 'rgba(2, 62, 138, 1)';
let width = 0;
let height = 0;
@ -65,6 +67,7 @@
let isPaused = props.paused;
let pointerLast = 0;
let moving = false;
let resizeTimer = 0;
const syncRect = () => {
const rect = root.getBoundingClientRect();
@ -149,12 +152,12 @@
}
}
const a = (hot ? 0.22 : 0.12) * edge;
ctx.fillStyle = hot
? `rgba(2, 62, 138, ${a})`
: `rgba(15, 23, 42, ${a})`;
// 固定色 + globalAlpha,避免每点拼 rgba 字符串
ctx.globalAlpha = (hot ? 0.22 : 0.12) * edge;
ctx.fillStyle = hot ? warm : cold;
ctx.fillRect(x - s / 2, y - s / 2, s, s);
}
ctx.globalAlpha = 1;
};
const tryStop = () => {
@ -232,8 +235,12 @@
}
const ro = new ResizeObserver(() => {
rebuild();
paint();
if (resizeTimer) window.clearTimeout(resizeTimer);
resizeTimer = window.setTimeout(() => {
resizeTimer = 0;
rebuild();
paint();
}, 80);
});
ro.observe(root);
rebuild();
@ -258,6 +265,10 @@
teardown = () => {
tryStop();
if (resizeTimer) {
window.clearTimeout(resizeTimer);
resizeTimer = 0;
}
setPaused = null;
ro.disconnect();
io.disconnect();

View File

@ -9,13 +9,13 @@
<h3 class="ai-featured-routes__title">{{ copy.featuredRoutesTitle }}</h3>
</div>
<div class="ai-featured-routes__actions">
<div v-if="!loading && featured.length > 5" class="ai-featured-routes__nav">
<div v-if="!loading && featured.length > pageSize" class="ai-featured-routes__nav">
<button
type="button"
class="ai-featured-routes__nav-btn"
:aria-label="copy.featuredRoutesPrev"
:disabled="busy || !canPrev"
@click="scrollBy(-1)"
@click="scrollPage(-1)"
>
<span aria-hidden="true">‹</span>
</button>
@ -24,7 +24,7 @@
class="ai-featured-routes__nav-btn"
:aria-label="copy.featuredRoutesNext"
:disabled="busy || !canNext"
@click="scrollBy(1)"
@click="scrollPage(1)"
>
<span aria-hidden="true">›</span>
</button>
@ -151,14 +151,29 @@
const copy = computed(() => (props.isZh ? WELCOME_COPY.zh : WELCOME_COPY.en));
const routesCopy = computed(() => ROUTES_COPY[lang.value]);
const PAGE_SIZE_FALLBACK = 4;
const loading = ref(true);
const featured = ref<RouteItem[]>([]);
const scrollerRef = ref<HTMLElement | null>(null);
const canPrev = ref(false);
const canNext = ref(false);
const pageSize = ref(PAGE_SIZE_FALLBACK);
const visible = computed(() => loading.value || featured.value.length > 0);
function readPageSize() {
const el = scrollerRef.value?.closest('.ai-featured-routes') as HTMLElement | null;
if (!el) {
pageSize.value = PAGE_SIZE_FALLBACK;
return pageSize.value;
}
const raw = getComputedStyle(el).getPropertyValue('--ai-featured-visible').trim();
const n = Number.parseInt(raw, 10);
pageSize.value = Number.isFinite(n) && n > 0 ? n : PAGE_SIZE_FALLBACK;
return pageSize.value;
}
function cardAria(item: RouteItem) {
const eta = formatRouteTimeliness(item);
return [
@ -196,29 +211,42 @@
syncScrollState();
}
function stepPx() {
/** 一整页:用第 N 张相对第 0 张的 offset,避免 gap/亚像素对不齐 */
function pageStepPx() {
const el = scrollerRef.value;
if (!el) return 0;
const item = el.querySelector('.ai-featured-routes__item') as HTMLElement | null;
if (!item) return Math.round(el.clientWidth * 0.72);
const size = readPageSize();
const items = el.querySelectorAll('.ai-featured-routes__item');
if (items.length > size) {
const first = items[0] as HTMLElement;
const pageFirst = items[size] as HTMLElement;
const delta = pageFirst.offsetLeft - first.offsetLeft;
if (delta > 0) return delta;
}
const item = items[0] as HTMLElement | undefined;
if (!item) return Math.round(el.clientWidth);
const styles = getComputedStyle(el);
const gap = parseFloat(styles.columnGap || styles.gap || '16') || 16;
return Math.round(item.getBoundingClientRect().width + gap);
return Math.round(size * (item.getBoundingClientRect().width + gap));
}
function scrollBy(dir: -1 | 1) {
function scrollPage(dir: -1 | 1) {
const el = scrollerRef.value;
if (!el) return;
el.scrollBy({ left: dir * stepPx(), behavior: 'smooth' });
const step = pageStepPx();
if (!step) return;
const max = Math.max(0, el.scrollWidth - el.clientWidth);
const next = Math.min(max, Math.max(0, Math.round(el.scrollLeft + dir * step)));
el.scrollTo({ left: next, behavior: 'smooth' });
}
function onKeydown(event: KeyboardEvent) {
if (event.key === 'ArrowLeft') {
event.preventDefault();
scrollBy(-1);
scrollPage(-1);
} else if (event.key === 'ArrowRight') {
event.preventDefault();
scrollBy(1);
scrollPage(1);
}
}
@ -259,8 +287,12 @@
ro?.disconnect();
ro = null;
if (!el || typeof ResizeObserver === 'undefined') return;
ro = new ResizeObserver(() => syncScrollState());
ro = new ResizeObserver(() => {
readPageSize();
syncScrollState();
});
ro.observe(el);
readPageSize();
syncScrollState();
});

View File

@ -6,10 +6,7 @@
<script lang="ts" setup>
/**
* 左视图淡线跑道:
* - 上下冷灰短横 / 中线略暖略粗,两端更长消隐
* - 入场:道面先淡入 → 标题轻入(少 whoosh)
* - 通过 --runway-edge-top 把上边线位置交给飞机对齐
* 欢迎标题 canvas:保留原逐字入场 / 斜切 / 品牌双色,不再画跑道线。
*/
import { onMounted, onUnmounted, ref, watch } from 'vue';
import { isPortalIrisActive } from '@/utils/page-transition-flag';
@ -39,224 +36,78 @@
const dprCap = 1.5;
const ENTER_DELAY = 80;
const DECK_DUR = 340;
const TEXT_AT = 200; // 道面起势后再出字
const TEXT_AT = 120;
const CHAR_STAGGER = 18;
const CHAR_DUR = 260;
const CHAR_DUR = 280;
let width = 0;
let height = 0;
let currentText = props.text;
/** 开场经过的毫秒(扣 delay 后) */
let enterElapsed = reduceMotion ? 1e9 : 0;
let enterRaf = 0;
let enterStart = 0;
let enterDone = reduceMotion;
const gridGap = isNarrow ? 20 : 18;
/** 吸附布局只在 rebuild 算一次;paint 动画帧禁止读 rect/写 CSS */
let layout = {
x0: 0,
y0: 0,
y1: 0,
cy: 0,
pw: 0,
ph: 0,
skew: 0,
dashPhase: 0,
ready: false,
};
let lastEdgeTop = '';
let settleRaf = 0;
let resizeTimer = 0;
let cachedFont = '';
let cachedCharWidths: number[] = [];
let cachedChars: string[] = [];
let cachedLabel = '';
const easeOutCubic = (t: number) => 1 - (1 - t) ** 3;
const enterTotalMs = (charCount: number) => {
const textEnd = TEXT_AT + Math.max(0, charCount - 1) * CHAR_STAGGER + CHAR_DUR;
return Math.max(DECK_DUR, textEnd);
};
const syncEdgeTop = (y0: number) => {
const px = `${Math.round(y0)}px`;
if (px === lastEdgeTop) return;
lastEdgeTop = px;
root.style.setProperty('--runway-edge-top', px);
const hero = root.closest('.ai-welcome__hero') as HTMLElement | null;
hero?.style.setProperty('--runway-edge-top', px);
const runway = root.closest('.ai-welcome-runway') as HTMLElement | null;
runway?.style.setProperty('--runway-edge-top', px);
};
const computeLayout = () => {
if (width < 40 || height < 24) {
layout.ready = false;
return;
}
const gridEl = document.querySelector(
'.ai-shell-bg__dots, .ai-dot-grid',
) as HTMLElement | null;
const gRect = gridEl?.getBoundingClientRect();
const cRect = canvas.getBoundingClientRect();
const gH = Math.max(1, Math.floor(gRect?.height || window.innerHeight));
const gW = Math.max(1, Math.floor(gRect?.width || window.innerWidth));
const gRows = Math.ceil(gH / gridGap) + 1;
const gCols = Math.ceil(gW / gridGap) + 1;
const gOy = (gH - (gRows - 1) * gridGap) / 2;
const gOx = (gW - (gCols - 1) * gridGap) / 2;
const gTop = gRect?.top ?? 0;
const gLeft = gRect?.left ?? 0;
const snapY = (localY: number) => {
const screenY = cRect.top + localY;
const inGrid = screenY - gTop;
const row = Math.round((inGrid - gOy) / gridGap);
return gTop + gOy + row * gridGap - cRect.top;
};
const padX = width * 0.04;
const padY = height * 0.16;
const skew = Math.min(width * 0.14, 72);
const x0 = padX;
let y0 = snapY(padY);
let y1 = snapY(padY + (height - padY * 2));
if (Math.abs(y1 - y0) < gridGap * 0.5) y1 = y0 + gridGap;
const pw = width - padX * 2 - skew;
const ph = y1 - y0;
let cy = snapY((y0 + y1) / 2);
if (Math.abs(cy - y0) < 1) cy = y0 + gridGap;
if (Math.abs(cy - y1) < 1) cy = y1 - gridGap;
const dashPhase =
(((cRect.left - (gLeft + gOx)) % gridGap) + gridGap) % gridGap;
layout = { x0, y0, y1, cy, pw, ph, skew, dashPhase, ready: pw >= 40 && ph >= 16 };
syncEdgeTop(y0);
};
const enterTotalMs = (charCount: number) =>
TEXT_AT + Math.max(0, charCount - 1) * CHAR_STAGGER + CHAR_DUR;
const paint = () => {
ctx.clearRect(0, 0, width, height);
if (width < 40 || height < 24 || !layout.ready) return;
const { x0, y0, y1, cy, pw, ph, skew, dashPhase } = layout;
const tl = { x: x0 + skew, y: y0 };
const tr = { x: x0 + pw + skew, y: y0 };
const br = { x: x0 + pw, y: y1 };
const bl = { x: x0, y: y1 };
const ml = { x: (tl.x + bl.x) / 2, y: (tl.y + bl.y) / 2 };
const mr = { x: (tr.x + br.x) / 2, y: (tr.y + br.y) / 2 };
const cx = (tl.x + tr.x + br.x + bl.x) / 4;
const deckP = easeOutCubic(Math.max(0, Math.min(1, enterElapsed / DECK_DUR)));
if (deckP < 0.02) return;
// 上下:冷灰;中线:略暖略实,更像道面中心线
const edgeInk = 'rgba(15, 23, 42, 0.26)';
const edgeFade = 'rgba(15, 23, 42, 0)';
const midInk = 'rgba(180, 110, 55, 0.38)';
const midFade = 'rgba(180, 110, 55, 0)';
const dashLen = 8;
const dashGap = Math.max(1, gridGap - dashLen);
const strokeFaded = (
ax: number,
ay: number,
bx: number,
by: number,
solid: string,
fade: string,
lineW: number,
) => {
const g = ctx.createLinearGradient(ax, ay, bx, by);
// 两端消隐更长,接进背景点阵
g.addColorStop(0, fade);
g.addColorStop(0.2, solid);
g.addColorStop(0.8, solid);
g.addColorStop(1, fade);
ctx.beginPath();
ctx.moveTo(ax, ay);
ctx.lineTo(bx, by);
ctx.strokeStyle = g;
ctx.lineWidth = lineW;
ctx.lineCap = 'butt';
ctx.stroke();
};
ctx.save();
ctx.globalAlpha = deckP;
const edgeW = isNarrow ? 1.35 : 1.65;
const midW = isNarrow ? 1.55 : 1.9;
ctx.setLineDash([dashLen, dashGap]);
ctx.lineDashOffset = -dashPhase;
strokeFaded(tl.x, tl.y, tr.x, tr.y, edgeInk, edgeFade, edgeW);
strokeFaded(bl.x, bl.y, br.x, br.y, edgeInk, edgeFade, edgeW);
ctx.setLineDash([]);
ctx.lineDashOffset = 0;
if (width < 40 || height < 24) return;
const label = currentText.trim();
const fontSize = Math.max(
14,
Math.min(ph * 0.42, pw / Math.max(9, (label.length || 1) * 0.82)),
);
const shear = -0.32;
ctx.font = `600 ${fontSize}px "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif`;
const textW = label ? ctx.measureText(label).width : 0;
const gap = Math.max(18, textW * 0.62 + fontSize * 1.1);
const gapL = cx - gap;
const gapR = cx + gap;
const lerp = (a: number, b: number, t: number) => a + (b - a) * t;
const alongT = (x: number) => {
const span = mr.x - ml.x || 1;
return Math.max(0, Math.min(1, (x - ml.x) / span));
};
const pointOnMid = (t: number) => ({
x: lerp(ml.x, mr.x, t),
y: cy,
});
ctx.setLineDash([dashLen, dashGap]);
ctx.lineDashOffset = -dashPhase;
const tL = alongT(gapL);
const tR = alongT(gapR);
if (tL > 0.04) {
const a = pointOnMid(0.02);
const b = pointOnMid(Math.max(0.02, tL - 0.02));
strokeFaded(a.x, a.y, b.x, b.y, midInk, midFade, midW);
}
if (tR < 0.96) {
const a = pointOnMid(Math.min(0.98, tR + 0.02));
const b = pointOnMid(0.98);
strokeFaded(a.x, a.y, b.x, b.y, midInk, midFade, midW);
}
ctx.setLineDash([]);
ctx.lineDashOffset = 0;
ctx.restore();
if (!label) return;
ctx.font = `600 ${fontSize}px "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif`;
const chars = [...label];
const cx = width / 2;
const cy = height / 2;
// 约为原大标题一半
const fontSize = Math.max(
isNarrow ? 12 : 14,
Math.min(
height * (isNarrow ? 0.42 : 0.48),
width / Math.max(9, (label.length || 1) * 0.82),
),
);
// 原 shear -0.32 ≈ 更明显斜体
const shear = isNarrow ? -0.28 : -0.36;
const font = `600 ${fontSize}px "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif`;
if (font !== cachedFont || label !== cachedLabel) {
ctx.font = font;
cachedFont = font;
cachedLabel = label;
cachedChars = [...label];
cachedCharWidths = cachedChars.map((ch) => ctx.measureText(ch).width);
} else {
ctx.font = font;
}
const chars = cachedChars;
const brandMatch = label.match(/^BCD(\s*·\s*)?/);
const brandLen = brandMatch ? [...brandMatch[0]].length : 0;
const brandFill = 'rgba(2, 62, 138, 0.9)';
const accentFill = 'rgba(233, 106, 38, 0.92)';
const shadowFill = 'rgba(18, 24, 32, 0.1)';
const letterGap = fontSize * 0.12;
const charWidths = chars.map((ch) => ctx.measureText(ch).width);
const shadowFill = 'rgba(18, 24, 32, 0.12)';
const letterGap = fontSize * 0.14;
const charWidths = cachedCharWidths;
const totalW =
charWidths.reduce((s, w) => s + w, 0) + letterGap * Math.max(0, chars.length - 1);
// 轻位移,避免抢输入台注意
const whooshMax = Math.min(28, width * 0.04);
const whooshMax = Math.min(36, width * 0.05);
const yGlyph = fontSize * 0.02;
const shadowX = fontSize * 0.04;
const shadowY = fontSize * 0.1;
const shadowX = fontSize * 0.045;
const shadowY = fontSize * 0.11;
ctx.save();
ctx.translate(cx, cy);
ctx.transform(1, 0, shear, 1, 0, 0);
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.font = font;
let cursor = -totalW / 2;
for (let i = 0; i < chars.length; i++) {
@ -324,30 +175,37 @@
const rebuild = () => {
const rect = root.getBoundingClientRect();
width = Math.max(1, Math.floor(rect.width));
height = Math.max(1, Math.floor(rect.height));
const nextW = Math.max(1, Math.floor(rect.width));
const nextH = Math.max(1, Math.floor(rect.height));
const dpr = Math.min(window.devicePixelRatio || 1, dprCap);
if (nextW === width && nextH === height) {
paint();
return;
}
width = nextW;
height = nextH;
cachedFont = '';
canvas.width = Math.floor(width * dpr);
canvas.height = Math.floor(height * dpr);
canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
computeLayout();
paint();
if (settleRaf) cancelAnimationFrame(settleRaf);
settleRaf = requestAnimationFrame(() => {
settleRaf = 0;
computeLayout();
paint();
});
};
replayEnter = () => {
currentText = props.text;
cachedFont = '';
startEnter();
};
const ro = new ResizeObserver(() => rebuild());
const ro = new ResizeObserver(() => {
if (resizeTimer) window.clearTimeout(resizeTimer);
resizeTimer = window.setTimeout(() => {
resizeTimer = 0;
rebuild();
}, 60);
});
ro.observe(root);
rebuild();
@ -360,18 +218,12 @@
teardown = () => {
stopEnter();
if (settleRaf) {
cancelAnimationFrame(settleRaf);
settleRaf = 0;
if (resizeTimer) {
window.clearTimeout(resizeTimer);
resizeTimer = 0;
}
ro.disconnect();
replayEnter = null;
lastEdgeTop = '';
root.style.removeProperty('--runway-edge-top');
const hero = root.closest('.ai-welcome__hero') as HTMLElement | null;
hero?.style.removeProperty('--runway-edge-top');
const runway = root.closest('.ai-welcome-runway') as HTMLElement | null;
runway?.style.removeProperty('--runway-edge-top');
};
});
@ -389,9 +241,9 @@
<style scoped>
.ai-runway {
position: relative;
z-index: 1;
z-index: 2;
width: min(760px, 96%);
height: clamp(84px, 11vw, 128px);
height: clamp(44px, 5.5vw, 64px);
margin: 0 auto;
pointer-events: none;
}
@ -405,14 +257,14 @@
@media (max-height: 900px) {
.ai-runway {
width: min(480px, 90%);
height: 76px;
height: 42px;
}
}
@media (max-width: 640px) {
.ai-runway {
width: 100%;
height: 80px;
height: 40px;
}
}
</style>

View File

@ -54,19 +54,13 @@ export function goOfficialLogin(
armOfficialLoginFlip();
}
// 先确保登录分包就绪,再开翻页,避免顶栏进度条干等
void (async () => {
try {
if (preferMobilePortal()) {
await import('@/views/h5/customer-center/login/index.vue');
} else {
await import('@/views/login/index.vue');
}
} catch {
/* ignore:仍继续跳转 */
}
await router.push(officialLoginLocation(dest));
})();
// 立刻开跳:预取在 hover 已做;这里再等 chunk 会让虹膜「点了不动」
void import(
preferMobilePortal()
? '@/views/h5/customer-center/login/index.vue'
: '@/views/login/index.vue',
).catch(() => undefined);
void router.push(officialLoginLocation(dest));
return true;
}

View File

@ -2216,7 +2216,7 @@ body.command-home #ai-advisor-shell {
}
.ai-welcome-plane,
.ai-welcome-runway,
.ai-welcome-title-wrap,
.ai-composer-slot--welcome,
.ai-featured-routes,
.ai-intent-section,
@ -2228,7 +2228,7 @@ body.command-home #ai-advisor-shell {
animation-delay: 0s;
}
.ai-welcome-runway {
.ai-welcome-title-wrap {
animation-delay: 0.06s;
}
@ -2249,9 +2249,6 @@ body.command-home #ai-advisor-shell {
}
.ai-welcome__hero {
/* 跑道上边线 Y 由 SiteRunway 写入;飞机单独一块也能读到 */
--runway-edge-top: 14px;
--plane-belly-inset: clamp(24px, 5vw, 40px);
position: relative;
display: flex;
flex-direction: column;
@ -2260,7 +2257,7 @@ body.command-home #ai-advisor-shell {
width: 100%;
max-width: var(--ai-content-max);
margin-inline: auto;
gap: 8px;
gap: 6px;
padding: 0 0 4px;
isolation: isolate;
}
@ -2320,17 +2317,16 @@ body.command-home #navbar .site-nav-avatar:hover {
overflow: visible;
}
.ai-welcome-runway {
.ai-welcome-title-wrap {
position: relative;
z-index: 1; /* 与点阵同视觉层,不做抬升浮层 */
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
margin-top: 4px;
margin-top: 2px;
}
/* 点阵标题的无障碍文案 */
/* canvas 标题的无障碍文案 */
.ai-welcome-title--sr {
position: absolute;
width: 1px;
@ -2506,19 +2502,17 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
margin-top: auto;
}
/* 通栏:紧跟提问区,全屏宽(脱出 layout 限宽) */
/* 底栏:与主内容同宽居中(宽屏不再 100vw 通栏脱出) */
.ai-home-bottom {
--ai-home-rail-pad: clamp(12px, 1.6vw, 28px);
position: relative;
left: 50%;
right: auto;
display: flex;
flex-direction: column;
flex-shrink: 0;
gap: 10px;
width: 100vw;
max-width: 100vw;
margin: clamp(14px, 2.2vh, 24px) 0 0 -50vw;
width: 100%;
max-width: var(--ai-content-max, 1200px);
margin: clamp(14px, 2.2vh, 24px) auto 0;
padding: 0 0 4px;
box-sizing: border-box;
}
@ -2542,22 +2536,25 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
overflow: visible;
}
/* 精选线路:静止横排 + peek 可滑(无自动跑马灯) */
/* 精选线路:一屏整 4 张均分,无 peek;多余线路整页翻
注意:--ai-featured-card-w 里的 100% 在 item 上解析 = scroller 内容盒宽度,
故横向 padding 只能放在 rail,公式里不能再减 head-pad(否则卡偏窄漏出第 5 张)。 */
.ai-featured-routes {
--ai-featured-gap: 0.75rem;
--ai-featured-peek: 1.75rem;
--ai-featured-visible: 5;
--ai-featured-gap: 0.65rem;
--ai-featured-visible: 4;
--ai-featured-card-h: 11.5rem;
--ai-featured-head-pad: var(--ai-home-rail-pad, 16px);
--ai-featured-fade-bg: var(--ai-bg, #f0f3f4);
/* -1px 吃掉亚像素取整,避免第 5 张露 1px */
--ai-featured-card-w: calc(
(100% - var(--ai-featured-peek) - var(--ai-featured-gap) * (var(--ai-featured-visible) - 1)) /
(100% - (var(--ai-featured-gap) * (var(--ai-featured-visible) - 1)) - 1px) /
var(--ai-featured-visible)
);
flex-shrink: 0;
min-width: 0;
margin-top: 0;
padding: 4px 0 0;
overflow: hidden;
}
.ai-featured-routes__head {
@ -2608,9 +2605,9 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
padding: 0;
border: 1px solid rgba(255, 255, 255, 0.7);
border-radius: 999px;
background: color-mix(in srgb, #fff 52%, transparent);
backdrop-filter: blur(10px) saturate(150%);
-webkit-backdrop-filter: blur(10px) saturate(150%);
background: color-mix(in srgb, #fff 88%, transparent);
backdrop-filter: none;
-webkit-backdrop-filter: none;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
color: var(--ai-action);
font-size: 1.05rem;
@ -2655,28 +2652,32 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
.ai-featured-routes__rail {
position: relative;
box-sizing: border-box;
width: 100%;
min-width: 0;
padding: 0.25rem 0 0.5rem;
/* 左右留白放在 rail,scroller 内容区 = 可用宽,卡宽公式才能刚好 4 张 */
padding: 0.25rem var(--ai-featured-head-pad) 0.5rem;
overflow: hidden;
}
.ai-featured-routes__fade {
position: absolute;
top: 0;
bottom: 0;
top: 0.25rem;
bottom: 0.5rem;
z-index: 2;
width: clamp(2.5rem, 5vw, 4.5rem);
width: 0.75rem;
pointer-events: none;
opacity: 0.4;
}
.ai-featured-routes__fade--left {
left: 0;
background: linear-gradient(90deg, var(--ai-featured-fade-bg) 18%, transparent);
left: var(--ai-featured-head-pad);
background: linear-gradient(90deg, var(--ai-featured-fade-bg) 40%, transparent);
}
.ai-featured-routes__fade--right {
right: 0;
background: linear-gradient(270deg, var(--ai-featured-fade-bg) 18%, transparent);
right: var(--ai-featured-head-pad);
background: linear-gradient(270deg, var(--ai-featured-fade-bg) 40%, transparent);
}
.ai-featured-routes__scroller {
@ -2685,12 +2686,12 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
gap: var(--ai-featured-gap);
width: 100%;
margin: 0;
padding: 0 var(--ai-featured-head-pad);
padding: 0;
list-style: none;
overflow-x: auto;
overflow-x: hidden;
overflow-y: hidden;
scroll-snap-type: x mandatory;
scroll-padding-inline: var(--ai-featured-head-pad);
scroll-padding-inline: 0;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
outline: none;
@ -2706,12 +2707,15 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
}
.ai-featured-routes__item {
box-sizing: border-box;
flex: 0 0 var(--ai-featured-card-w);
width: var(--ai-featured-card-w);
min-width: var(--ai-featured-card-w);
max-width: var(--ai-featured-card-w);
min-width: 0;
margin: 0;
padding: 0;
scroll-snap-align: start;
overflow: hidden;
}
.ai-featured-routes__skel {
@ -2746,6 +2750,8 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
border: 1px solid rgba(255, 255, 255, 0.66);
border-radius: 14px;
background: color-mix(in srgb, #fff 46%, transparent);
backdrop-filter: blur(14px) saturate(160%);
-webkit-backdrop-filter: blur(14px) saturate(160%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.78),
0 1px 2px rgba(15, 23, 42, 0.04);
@ -2922,38 +2928,27 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
}
}
@media (max-width: 1280px) {
@media (min-width: 1200px) {
.ai-featured-routes {
--ai-featured-visible: 4;
--ai-featured-peek: 2.25rem;
}
}
@media (max-width: 980px) {
.ai-featured-routes {
--ai-featured-visible: 3;
--ai-featured-peek: 2.25rem;
}
}
@media (max-width: 720px) {
.ai-featured-routes {
--ai-featured-visible: 2;
--ai-featured-peek: 14vw;
}
}
@media (max-width: 520px) {
.ai-featured-routes {
--ai-featured-visible: 1;
--ai-featured-peek: 18vw;
}
.ai-featured-routes__nav {
display: none;
}
.ai-featured-routes {
--ai-featured-card-h: 11rem;
}
}
@ -3016,13 +3011,13 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
color: inherit;
border: 1px solid rgba(255, 255, 255, 0.55);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
backdrop-filter: blur(14px) saturate(160%);
-webkit-backdrop-filter: blur(14px) saturate(160%);
/* blur 改由 command-home 叠色承担,避免 clip-path + blur 合层卡顿 */
backdrop-filter: none;
-webkit-backdrop-filter: none;
transition:
background 0.18s var(--ai-ease),
border-color 0.18s var(--ai-ease),
color 0.18s var(--ai-ease),
filter 0.18s var(--ai-ease);
color 0.18s var(--ai-ease);
}
.ai-intent-ribbon__item:first-child .ai-intent-ribbon__face {
@ -3163,9 +3158,9 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
padding: 6px 10px;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.7);
background: color-mix(in srgb, #fff 55%, transparent);
backdrop-filter: blur(12px) saturate(150%);
-webkit-backdrop-filter: blur(12px) saturate(150%);
background: color-mix(in srgb, #fff 92%, transparent);
backdrop-filter: none;
-webkit-backdrop-filter: none;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.75),
0 8px 22px rgba(15, 23, 42, 0.1);
@ -3333,8 +3328,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
display: flex;
justify-content: center;
width: 100%;
/* 负 margin = 上边线位置 + 机腹图内留白,让机腹贴住跑道上沿 */
margin: 0 0 calc(-1 * (var(--runway-edge-top, 14px) + var(--plane-belly-inset, 40px)));
margin: 0 0 -28px;
pointer-events: none;
}
@ -3344,12 +3338,11 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
width: min(448px, 40vw);
height: auto;
display: block;
filter: drop-shadow(0 14px 28px rgba(var(--ai-sky-rgb), 0.12));
/* 去掉常驻 drop-shadow / 无限呼吸,减少首页持续合成开销 */
filter: none;
transform: translateZ(0);
transform-origin: 50% 60%;
/* 先落地,再呼吸,避免两段 transform 抢同一属性 */
animation:
aiPlaneIn 0.68s cubic-bezier(0.22, 1, 0.36, 1) both,
aiPlaneBreathe 5.6s ease-in-out 0.72s infinite;
animation: aiPlaneIn 0.68s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes aiPlaneIn {
@ -3363,20 +3356,10 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
}
}
@keyframes aiPlaneBreathe {
0%,
100% {
transform: translate3d(0, 0, 0);
}
50% {
transform: translate3d(0, -5px, 0);
}
}
@media (prefers-reduced-motion: reduce) {
.ai-welcome-plane,
.ai-welcome-plane img,
.ai-welcome-runway,
.ai-welcome-title-wrap,
.ai-composer-slot--welcome,
.ai-featured-routes,
.ai-ask,
@ -3402,7 +3385,6 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
}
body.command-home .ai-featured-routes {
--ai-featured-peek: 1.5rem;
--ai-featured-card-h: 10.75rem;
}
@ -3435,8 +3417,8 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
font-size: 0.74rem;
}
body.command-home .ai-welcome__hero {
--plane-belly-inset: clamp(18px, 4vw, 32px);
body.command-home .ai-welcome-plane {
margin-bottom: -18px;
}
body.command-home .ai-welcome-plane img {
@ -3444,6 +3426,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
}
body.command-home .ai-trust-bar {
--ai-trust-bar-h: 44px;
margin-top: 8px;
@ -4456,8 +4439,8 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
padding-top: 2px;
}
.ai-welcome__hero {
--plane-belly-inset: clamp(22px, 5vw, 40px);
.ai-welcome-plane {
margin-bottom: -20px;
}
.ai-welcome__stack {
@ -4561,6 +4544,10 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
display: none;
}
.ai-welcome-title-wrap {
margin-top: 4px;
}
.ai-welcome__stack {
margin-top: 2px;
}
@ -4848,35 +4835,46 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
text-decoration: underline;
}
/* Paint budget: 默认关掉大面积 blur;精选卡 / 意图条白名单保留液态玻璃 */
/* Paint budget: 默认关掉大面积 blur;精选线路卡保留液态玻璃 */
body.command-home,
body.command-home * {
backdrop-filter: none !important;
-webkit-backdrop-filter: none !important;
}
body.command-home .ai-featured-routes__card,
body.command-home .ai-intent-ribbon__face,
body.command-home .ai-intent-ribbon__hint,
body.command-home .ai-featured-routes__nav-btn {
body.command-home .ai-featured-routes__card {
backdrop-filter: blur(14px) saturate(160%) !important;
-webkit-backdrop-filter: blur(14px) saturate(160%) !important;
}
body.command-home .ai-featured-routes__card {
background: color-mix(in srgb, #fff 46%, transparent) !important;
}
body.command-home .ai-intent-ribbon__face {
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.28) 55%, transparent 100%),
color-mix(in srgb, #fff 70%, transparent) !important;
}
body.command-home .ai-intent-ribbon__item:nth-child(even) .ai-intent-ribbon__face {
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 244, 236, 0.35) 55%, transparent 100%),
color-mix(in srgb, var(--ai-accent, #e96a26) 8%, #fff) !important;
}
body.command-home .ai-intent-ribbon__hint,
body.command-home .ai-featured-routes__nav-btn {
backdrop-filter: blur(12px) saturate(150%) !important;
-webkit-backdrop-filter: blur(12px) saturate(150%) !important;
background: color-mix(in srgb, #fff 88%, transparent) !important;
}
body.command-home .ai-welcome-plane img {
filter: none;
}
body.command-home .ai-featured-routes,
body.command-home .ai-intent-section,
body.command-home .ai-home-bottom {
contain: layout paint;
}
body.command-home .ai-history-sidebar {
background: color-mix(in srgb, var(--ai-paper) 72%, transparent);
}