feat: 客户登录品牌布局与官网登录体验优化
All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m0s
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:
parent
5010213539
commit
f511c3b8d8
45
src/App.vue
45
src/App.vue
@ -50,17 +50,15 @@
|
|||||||
const isPageIris = computed(() => portalTransition.value === 'oms-iris');
|
const isPageIris = computed(() => portalTransition.value === 'oms-iris');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 圆半径用百分比时,约 71% 就盖住视口四角。
|
* 圆半径约 71% 盖住四角;收到 78% 留余量。
|
||||||
* 收到 80% 为止,整段时间都在铺画面,不再扩到 150% 后空转。
|
* 时长略收、缓动更匀,减少「点了发呆再猛撑开」的感觉。
|
||||||
* 曲线前段就有位移、后段轻轻收住,避免猛地撑开或开头发呆。
|
|
||||||
*/
|
*/
|
||||||
const IRIS_MS = 920;
|
const IRIS_MS = 720;
|
||||||
const IRIS_EASE = 'cubic-bezier(0.33, 0.5, 0.22, 1)';
|
const IRIS_EASE = 'cubic-bezier(0.22, 0.82, 0.28, 1)';
|
||||||
/** 新页图片解码最多等这么久,超时也开动画,避免点击发僵 */
|
/** 新页最多等一帧解码窗口;超时也开裁剪,优先跟手 */
|
||||||
const IRIS_READY_CAP_MS = 160;
|
const IRIS_READY_CAP_MS = 64;
|
||||||
const IRIS_AT = '50% 50%';
|
const IRIS_AT = '50% 50%';
|
||||||
/** 约 71% 盖住四角,收到 80% 留一点余量 */
|
const IRIS_END = '78%';
|
||||||
const IRIS_END = '80%';
|
|
||||||
|
|
||||||
function clearPortalTransition() {
|
function clearPortalTransition() {
|
||||||
portalTransition.value = '';
|
portalTransition.value = '';
|
||||||
@ -161,6 +159,7 @@
|
|||||||
async function playIrisEnter(node: HTMLElement, done: () => void) {
|
async function playIrisEnter(node: HTMLElement, done: () => void) {
|
||||||
prepareSheet(node, 1);
|
prepareSheet(node, 1);
|
||||||
node.style.willChange = 'clip-path';
|
node.style.willChange = 'clip-path';
|
||||||
|
node.style.transform = 'translateZ(0)';
|
||||||
node.style.pointerEvents = 'none';
|
node.style.pointerEvents = 'none';
|
||||||
node.style.clipPath = 'none';
|
node.style.clipPath = 'none';
|
||||||
node.style.setProperty('-webkit-clip-path', 'none');
|
node.style.setProperty('-webkit-clip-path', 'none');
|
||||||
@ -193,22 +192,24 @@
|
|||||||
|
|
||||||
const at = IRIS_AT;
|
const at = IRIS_AT;
|
||||||
const end = IRIS_END;
|
const end = IRIS_END;
|
||||||
|
const startClip = `circle(0% at ${at})`;
|
||||||
|
const endClip = `circle(${end} at ${at})`;
|
||||||
// 先收到 0 再抬到上层,避免动画首帧还没写上时整页闪一下
|
// 先收到 0 再抬到上层,避免动画首帧还没写上时整页闪一下
|
||||||
node.style.clipPath = `circle(0% at ${at})`;
|
node.style.clipPath = startClip;
|
||||||
node.style.setProperty('-webkit-clip-path', `circle(0% at ${at})`);
|
node.style.setProperty('-webkit-clip-path', startClip);
|
||||||
node.style.zIndex = '3';
|
node.style.zIndex = '3';
|
||||||
|
// 强制一次合成同步,减少首帧卡顿
|
||||||
|
void node.offsetWidth;
|
||||||
try {
|
try {
|
||||||
anim = node.animate(
|
const frames = [
|
||||||
[
|
{ clipPath: startClip, webkitClipPath: startClip },
|
||||||
{ clipPath: `circle(0% at ${at})` },
|
{ clipPath: endClip, webkitClipPath: endClip },
|
||||||
{ clipPath: `circle(${end} at ${at})` },
|
] as Keyframe[];
|
||||||
],
|
anim = node.animate(frames, {
|
||||||
{
|
duration: IRIS_MS,
|
||||||
duration: IRIS_MS,
|
easing: IRIS_EASE,
|
||||||
easing: IRIS_EASE,
|
fill: 'forwards',
|
||||||
fill: 'forwards',
|
});
|
||||||
},
|
|
||||||
);
|
|
||||||
} catch {
|
} catch {
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
|
|||||||
1
src/auto-imports.d.ts
vendored
1
src/auto-imports.d.ts
vendored
@ -588,7 +588,6 @@ declare module 'vue' {
|
|||||||
readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']>
|
readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']>
|
||||||
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
|
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
|
||||||
readonly useLocalStorage: UnwrapRef<typeof import('@vueuse/core')['useLocalStorage']>
|
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 useMagicKeys: UnwrapRef<typeof import('@vueuse/core')['useMagicKeys']>
|
||||||
readonly useManualRefHistory: UnwrapRef<typeof import('@vueuse/core')['useManualRefHistory']>
|
readonly useManualRefHistory: UnwrapRef<typeof import('@vueuse/core')['useManualRefHistory']>
|
||||||
readonly useMediaControls: UnwrapRef<typeof import('@vueuse/core')['useMediaControls']>
|
readonly useMediaControls: UnwrapRef<typeof import('@vueuse/core')['useMediaControls']>
|
||||||
|
|||||||
@ -1,13 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="visible" class="login-captcha">
|
<div
|
||||||
<label class="login-captcha__field" :class="{ 'is-focused': focused, 'is-filled': !!modelValue }">
|
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>
|
<span v-if="floatLabel" class="login-captcha__float">{{ floatLabel }}</span>
|
||||||
<input
|
<input
|
||||||
|
ref="inputRef"
|
||||||
:value="modelValue"
|
:value="modelValue"
|
||||||
class="login-captcha__input"
|
class="login-captcha__input"
|
||||||
type="text"
|
type="text"
|
||||||
inputmode="text"
|
inputmode="text"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
autocapitalize="characters"
|
||||||
|
spellcheck="false"
|
||||||
maxlength="8"
|
maxlength="8"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:aria-label="ariaLabel || floatLabel || placeholder"
|
:aria-label="ariaLabel || floatLabel || placeholder"
|
||||||
@ -16,6 +23,7 @@
|
|||||||
@input="onInput"
|
@input="onInput"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="login-captcha__image"
|
class="login-captcha__image"
|
||||||
@ -24,14 +32,24 @@
|
|||||||
:aria-label="refreshTitle"
|
:aria-label="refreshTitle"
|
||||||
@click="refresh"
|
@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 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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<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';
|
import { fetchLoginCaptcha } from '@/api/rbac/login-guard';
|
||||||
|
|
||||||
defineOptions({ name: 'LoginCaptchaField' });
|
defineOptions({ name: 'LoginCaptchaField' });
|
||||||
@ -45,6 +63,7 @@ const props = withDefaults(
|
|||||||
ariaLabel?: string;
|
ariaLabel?: string;
|
||||||
refreshTitle?: string;
|
refreshTitle?: string;
|
||||||
loadingText?: string;
|
loadingText?: string;
|
||||||
|
autofocus?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
@ -54,6 +73,7 @@ const props = withDefaults(
|
|||||||
ariaLabel: '',
|
ariaLabel: '',
|
||||||
refreshTitle: '点击刷新验证码',
|
refreshTitle: '点击刷新验证码',
|
||||||
loadingText: '加载中',
|
loadingText: '加载中',
|
||||||
|
autofocus: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -63,18 +83,32 @@ const emit = defineEmits<{
|
|||||||
refreshed: [];
|
refreshed: [];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const inputRef = ref<HTMLInputElement | null>(null);
|
||||||
const focused = ref(false);
|
const focused = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const captchaId = ref('');
|
const captchaId = ref('');
|
||||||
const imageBase64 = ref('');
|
const imageBase64 = ref('');
|
||||||
|
/** 刷新时保留上一张图,避免闪空白 */
|
||||||
|
const displayBase64 = ref('');
|
||||||
|
|
||||||
const imageSrc = computed(() =>
|
const imageSrc = computed(() =>
|
||||||
imageBase64.value ? `data:image/png;base64,${imageBase64.value}` : '',
|
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) {
|
function onInput(e: Event) {
|
||||||
const el = e.target as HTMLInputElement;
|
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() {
|
async function refresh() {
|
||||||
@ -84,19 +118,22 @@ async function refresh() {
|
|||||||
const res = await fetchLoginCaptcha();
|
const res = await fetchLoginCaptcha();
|
||||||
captchaId.value = res.captchaId;
|
captchaId.value = res.captchaId;
|
||||||
imageBase64.value = res.imageBase64;
|
imageBase64.value = res.imageBase64;
|
||||||
|
displayBase64.value = res.imageBase64;
|
||||||
emit('update:captchaId', res.captchaId);
|
emit('update:captchaId', res.captchaId);
|
||||||
emit('update:modelValue', '');
|
emit('update:modelValue', '');
|
||||||
emit('refreshed');
|
emit('refreshed');
|
||||||
|
await focusInput();
|
||||||
} catch {
|
} catch {
|
||||||
captchaId.value = '';
|
captchaId.value = '';
|
||||||
imageBase64.value = '';
|
imageBase64.value = '';
|
||||||
|
displayBase64.value = '';
|
||||||
emit('update:captchaId', '');
|
emit('update:captchaId', '');
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ refresh, captchaId });
|
defineExpose({ refresh, captchaId, focus: focusInput });
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.visible,
|
() => props.visible,
|
||||||
@ -105,6 +142,7 @@ watch(
|
|||||||
else {
|
else {
|
||||||
captchaId.value = '';
|
captchaId.value = '';
|
||||||
imageBase64.value = '';
|
imageBase64.value = '';
|
||||||
|
displayBase64.value = '';
|
||||||
emit('update:captchaId', '');
|
emit('update:captchaId', '');
|
||||||
emit('update:modelValue', '');
|
emit('update:modelValue', '');
|
||||||
}
|
}
|
||||||
@ -118,95 +156,199 @@ onMounted(() => {
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.login-captcha {
|
.login-captcha {
|
||||||
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
gap: 8px;
|
|
||||||
width: 100%;
|
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 {
|
.login-captcha__field {
|
||||||
|
position: relative;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
position: relative;
|
display: block;
|
||||||
display: flex;
|
margin: 0;
|
||||||
align-items: center;
|
padding: 0;
|
||||||
height: 40px;
|
cursor: text;
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-captcha__float {
|
.login-captcha__float {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 12px;
|
left: 14px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
z-index: 2;
|
||||||
font-size: 14px;
|
max-width: calc(100% - 28px);
|
||||||
color: #86909c;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #86868b;
|
||||||
pointer-events: none;
|
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 {
|
.login-captcha__field.is-filled .login-captcha__float {
|
||||||
top: 8px;
|
top: 6px;
|
||||||
transform: none;
|
|
||||||
font-size: 11px;
|
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 {
|
.login-captcha__input {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 54px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 22px 12px 8px 14px;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: 0.12em;
|
line-height: 26px;
|
||||||
color: #1d2129;
|
letter-spacing: 0.14em;
|
||||||
padding-top: 10px;
|
color: #1d1d1f;
|
||||||
|
caret-color: var(--app-primary-color, #1d7281);
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-captcha__field:not(.is-focused):not(.is-filled) .login-captcha__input {
|
.login-captcha:not(.is-focused) .login-captcha__field:not(.is-filled) .login-captcha__input {
|
||||||
padding-top: 0;
|
padding: 0 14px;
|
||||||
|
line-height: 54px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-captcha__image {
|
.login-captcha__image {
|
||||||
flex: 0 0 120px;
|
position: relative;
|
||||||
width: 120px;
|
box-sizing: border-box;
|
||||||
height: 40px;
|
flex: 0 0 128px;
|
||||||
|
width: 128px;
|
||||||
|
height: 54px;
|
||||||
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px solid #e5e6eb;
|
border: none;
|
||||||
border-radius: 8px;
|
border-left: 1px solid #e8e8ed;
|
||||||
background: #f7f8fa;
|
background: #f7f8fa;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: pointer;
|
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 {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 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 {
|
&:disabled {
|
||||||
opacity: 0.7;
|
|
||||||
cursor: wait;
|
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 {
|
.login-captcha__loading {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #86909c;
|
color: #86868b;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -521,10 +521,12 @@ export default {
|
|||||||
'marketing.register.brandHint': 'Welcome to BCD customer portal',
|
'marketing.register.brandHint': 'Welcome to BCD customer portal',
|
||||||
'marketing.register.brandHint.web': 'Register with email & phone',
|
'marketing.register.brandHint.web': 'Register with email & phone',
|
||||||
'marketing.register.brandHint.wechat': 'Register with WeChat',
|
'marketing.register.brandHint.wechat': 'Register with WeChat',
|
||||||
|
'marketing.register.choose.group': 'Choose how to register',
|
||||||
'marketing.register.choose.web': 'Web register',
|
'marketing.register.choose.web': 'Web register',
|
||||||
'marketing.register.choose.webDesc': 'Fill in details and open your portal',
|
'marketing.register.choose.webDesc': 'Fill in details and open your portal',
|
||||||
'marketing.register.choose.wechat': 'WeChat register',
|
'marketing.register.choose.wechat': 'WeChat register',
|
||||||
'marketing.register.choose.wechatDesc': 'Scan to authorize and finish quickly',
|
'marketing.register.choose.wechatDesc': 'Scan to authorize and finish quickly',
|
||||||
|
'marketing.register.choose.recommended': 'Recommended',
|
||||||
'marketing.register.backToChoose': '← Back to options',
|
'marketing.register.backToChoose': '← Back to options',
|
||||||
|
|
||||||
'marketing.register.referrerHint': 'Invited by {name} ({code})',
|
'marketing.register.referrerHint': 'Invited by {name} ({code})',
|
||||||
|
|||||||
@ -518,10 +518,12 @@ export default {
|
|||||||
'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
|
'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
|
||||||
'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
|
'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
|
||||||
'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
|
'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
|
||||||
|
'marketing.register.choose.group': '选择注册方式',
|
||||||
'marketing.register.choose.web': '网页注册',
|
'marketing.register.choose.web': '网页注册',
|
||||||
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
|
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
|
||||||
'marketing.register.choose.wechat': '微信注册',
|
'marketing.register.choose.wechat': '微信注册',
|
||||||
'marketing.register.choose.wechatDesc': '扫码授权,快捷完成注册',
|
'marketing.register.choose.wechatDesc': '扫码授权,快捷完成注册',
|
||||||
|
'marketing.register.choose.recommended': '推荐',
|
||||||
'marketing.register.backToChoose': '← 返回选择注册方式',
|
'marketing.register.backToChoose': '← 返回选择注册方式',
|
||||||
|
|
||||||
'marketing.register.referrerHint': '您正通过 {name}({code})的邀请注册',
|
'marketing.register.referrerHint': '您正通过 {name}({code})的邀请注册',
|
||||||
|
|||||||
@ -282,7 +282,8 @@ onMounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
margin: 0 auto;
|
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;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -293,13 +294,13 @@ onMounted(() => {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #e8e8ed;
|
border: 1px solid #e8e8ed;
|
||||||
border-radius: 16px;
|
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);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-card__brand {
|
.h5-login-card__brand {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 0 24px;
|
margin: 0 0 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-card__brand-row {
|
.h5-login-card__brand-row {
|
||||||
@ -411,7 +412,7 @@ onMounted(() => {
|
|||||||
.h5-login-row.is-focused .h5-login-float,
|
.h5-login-row.is-focused .h5-login-float,
|
||||||
.h5-login-row.is-filled .h5-login-float,
|
.h5-login-row.is-filled .h5-login-float,
|
||||||
.h5-login-row:has(input:-webkit-autofill) .h5-login-float {
|
.h5-login-row:has(input:-webkit-autofill) .h5-login-float {
|
||||||
top: 9px;
|
top: 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #6e6e73;
|
color: #6e6e73;
|
||||||
@ -429,8 +430,8 @@ onMounted(() => {
|
|||||||
.h5-login-form :deep(.arco-input-wrapper),
|
.h5-login-form :deep(.arco-input-wrapper),
|
||||||
.h5-login-form :deep(.arco-input-password) {
|
.h5-login-form :deep(.arco-input-password) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 52px;
|
min-height: 56px;
|
||||||
padding: 16px 12px 6px 14px;
|
padding: 22px 12px 8px 14px;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
@ -496,7 +497,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-submit {
|
.h5-login-submit {
|
||||||
margin-top: 20px;
|
margin-top: 24px;
|
||||||
height: 44px !important;
|
height: 44px !important;
|
||||||
border-radius: 980px !important;
|
border-radius: 980px !important;
|
||||||
font-size: 15px !important;
|
font-size: 15px !important;
|
||||||
|
|||||||
@ -5,8 +5,9 @@
|
|||||||
replace
|
replace
|
||||||
:title="label"
|
:title="label"
|
||||||
:aria-label="label"
|
:aria-label="label"
|
||||||
|
@click="onSwitchClick"
|
||||||
>
|
>
|
||||||
<icon-swap :size="18" />
|
<icon-swap :size="16" />
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -14,6 +15,7 @@
|
|||||||
import { computed } from 'vue';
|
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 { armPageFlip } from '@/utils/page-transition-flag';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
/** 当前页面对侧:admin=去管理登录;customer=去客户登录 */
|
/** 当前页面对侧:admin=去管理登录;customer=去客户登录 */
|
||||||
@ -31,31 +33,46 @@ const label = computed(() =>
|
|||||||
? t('h5.login.switchToAdmin')
|
? t('h5.login.switchToAdmin')
|
||||||
: t('h5.login.switchToCustomer'),
|
: t('h5.login.switchToCustomer'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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>
|
||||||
.h5-login-portal-switch {
|
.h5-login-portal-switch {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 14px;
|
right: max(16px, env(safe-area-inset-right, 0px));
|
||||||
bottom: calc(14px + env(safe-area-inset-bottom, 0px));
|
bottom: calc(18px + env(safe-area-inset-bottom, 0px));
|
||||||
z-index: 30;
|
z-index: 30;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 32px;
|
width: 36px;
|
||||||
height: 32px;
|
height: 36px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
color: #c9cdd4;
|
color: #c7c7cc;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background: transparent;
|
background: rgba(255, 255, 255, 0.72);
|
||||||
border: none;
|
border: 1px solid #e8e8ed;
|
||||||
opacity: 0.28;
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
|
||||||
|
opacity: 1;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-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 {
|
&:active {
|
||||||
opacity: 0.55;
|
color: #86868b;
|
||||||
color: #c9cdd4;
|
background: #f5f5f7;
|
||||||
|
border-color: #d2d2d7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -547,7 +547,8 @@ onMounted(async () => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
margin: 0 auto;
|
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;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -558,13 +559,13 @@ onMounted(async () => {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #e8e8ed;
|
border: 1px solid #e8e8ed;
|
||||||
border-radius: 16px;
|
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);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-card__brand {
|
.h5-login-card__brand {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 0 24px;
|
margin: 0 0 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-card__brand-row {
|
.h5-login-card__brand-row {
|
||||||
@ -682,7 +683,7 @@ onMounted(async () => {
|
|||||||
.h5-login-row.is-focused .h5-login-float,
|
.h5-login-row.is-focused .h5-login-float,
|
||||||
.h5-login-row.is-filled .h5-login-float,
|
.h5-login-row.is-filled .h5-login-float,
|
||||||
.h5-login-row:has(input:-webkit-autofill) .h5-login-float {
|
.h5-login-row:has(input:-webkit-autofill) .h5-login-float {
|
||||||
top: 9px;
|
top: 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #6e6e73;
|
color: #6e6e73;
|
||||||
@ -700,8 +701,8 @@ onMounted(async () => {
|
|||||||
.h5-login-form :deep(.arco-input-wrapper),
|
.h5-login-form :deep(.arco-input-wrapper),
|
||||||
.h5-login-form :deep(.arco-input-password) {
|
.h5-login-form :deep(.arco-input-password) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 52px;
|
min-height: 56px;
|
||||||
padding: 16px 12px 6px 14px;
|
padding: 22px 12px 8px 14px;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
@ -799,7 +800,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-submit {
|
.h5-login-submit {
|
||||||
margin-top: 20px;
|
margin-top: 24px;
|
||||||
height: 44px !important;
|
height: 44px !important;
|
||||||
border-radius: 980px !important;
|
border-radius: 980px !important;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@ -813,7 +814,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.h5-login-alt {
|
.h5-login-alt {
|
||||||
margin-top: 20px;
|
margin-top: 22px;
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
border-top: 1px solid #f0f0f2;
|
border-top: 1px solid #f0f0f2;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,27 +1,74 @@
|
|||||||
<template>
|
<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">
|
<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 class="login-hero__content">
|
||||||
<div v-if="isCustomer" class="login-hero__heading">
|
<div v-if="isCustomer" class="login-hero__heading">
|
||||||
<h1 class="login-hero__title">{{ t('brand.name') }}</h1>
|
<h1 class="login-hero__tagline">{{ t('brand.fullName') }}</h1>
|
||||||
<span class="login-hero__sep" aria-hidden="true">I</span>
|
<span class="login-hero__rule" aria-hidden="true" />
|
||||||
<span class="login-hero__tagline">{{ t('login.hero.tagline') }}</span>
|
<p class="login-hero__trust">{{ t('login.hero.trust.customer') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-if="isCustomer">
|
<template v-if="isCustomer">
|
||||||
<p class="login-hero__desc">{{ t('login.hero.desc.customer') }}</p>
|
<p class="login-hero__desc">
|
||||||
<form class="login-hero__search" @submit.prevent="onTrackSubmit">
|
{{ t('login.hero.desc.customer') }}
|
||||||
<input
|
</p>
|
||||||
v-model="trackingNo"
|
|
||||||
type="text"
|
<div class="login-hero__tools">
|
||||||
class="login-hero__search-input"
|
<form class="login-hero__search" @submit.prevent="onTrackSubmit">
|
||||||
:placeholder="t('login.hero.trackPlaceholder')"
|
<input
|
||||||
autocomplete="off"
|
v-model="trackingNo"
|
||||||
/>
|
type="text"
|
||||||
<button type="submit" class="login-hero__search-btn">
|
class="login-hero__search-input"
|
||||||
{{ t('login.hero.track') }}
|
:placeholder="t('login.hero.trackPlaceholder')"
|
||||||
</button>
|
autocomplete="off"
|
||||||
</form>
|
/>
|
||||||
|
<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>
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@ -74,19 +121,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="login-hero__visual">
|
<div v-if="!isCustomer" 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>
|
|
||||||
<img
|
<img
|
||||||
v-else
|
|
||||||
class="login-hero__truck"
|
class="login-hero__truck"
|
||||||
src="/login-assets/hero-truck.png"
|
src="/login-assets/hero-truck.png"
|
||||||
alt=""
|
alt=""
|
||||||
@ -100,7 +136,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 { useRouter } from 'vue-router';
|
import { useRoute, 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 {
|
import {
|
||||||
@ -109,7 +145,6 @@ import {
|
|||||||
IconMindMapping,
|
IconMindMapping,
|
||||||
IconRobot,
|
IconRobot,
|
||||||
} from '@arco-design/web-vue/es/icon';
|
} from '@arco-design/web-vue/es/icon';
|
||||||
|
|
||||||
defineOptions({ name: 'LoginHero' });
|
defineOptions({ name: 'LoginHero' });
|
||||||
|
|
||||||
interface HeroPillar {
|
interface HeroPillar {
|
||||||
@ -180,6 +215,7 @@ 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);
|
||||||
@ -187,6 +223,10 @@ 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,
|
||||||
);
|
);
|
||||||
@ -216,7 +256,21 @@ function onTrackSubmit() {
|
|||||||
Message.info(t('login.hero.trackPlaceholder'));
|
Message.info(t('login.hero.trackPlaceholder'));
|
||||||
return;
|
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(() => {
|
onMounted(() => {
|
||||||
@ -245,6 +299,67 @@ onBeforeUnmount(() => {
|
|||||||
padding: 0 8px;
|
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 {
|
.login-hero__content {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@ -253,6 +368,154 @@ onBeforeUnmount(() => {
|
|||||||
max-width: 560px;
|
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 {
|
.login-hero__heading {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@ -286,11 +549,11 @@ onBeforeUnmount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-hero__desc {
|
.login-hero__desc {
|
||||||
margin: 0 0 32px;
|
margin: 0;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
color: rgba(255, 255, 255, 0.82);
|
color: rgba(255, 255, 255, 0.82);
|
||||||
max-width: 520px;
|
max-width: 420px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-hero--admin {
|
.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 {
|
.login-hero__visual {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@ -589,25 +812,9 @@ onBeforeUnmount(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: -1000px;
|
|
||||||
margin-left: -200px;
|
|
||||||
pointer-events: none;
|
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 {
|
.login-hero--admin .login-hero__truck {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
@ -629,10 +836,62 @@ onBeforeUnmount(() => {
|
|||||||
color: #1a2d4a;
|
color: #1a2d4a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-hero--light.login-hero--customer .login-hero__tagline {
|
||||||
|
color: #1a2d4a;
|
||||||
|
}
|
||||||
|
|
||||||
.login-hero--light .login-hero__desc {
|
.login-hero--light .login-hero__desc {
|
||||||
color: rgba(26, 45, 74, 0.58);
|
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 {
|
.login-hero--light .login-hero__principle {
|
||||||
&::before {
|
&::before {
|
||||||
background: rgba(26, 45, 74, 0.12);
|
background: rgba(26, 45, 74, 0.12);
|
||||||
@ -684,10 +943,6 @@ onBeforeUnmount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1250px) {
|
@media screen and (max-width: 1250px) {
|
||||||
.login-hero__visual {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-hero--admin .login-hero__visual {
|
.login-hero--admin .login-hero__visual {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,8 +69,8 @@ function onSwitchClick(e: MouseEvent) {
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.login-portal-switch {
|
.login-portal-switch {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 14px;
|
right: 16px;
|
||||||
bottom: 14px;
|
bottom: 16px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -607,7 +607,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: 9px;
|
top: 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #6e6e73;
|
color: #6e6e73;
|
||||||
@ -625,8 +625,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: 52px;
|
min-height: 56px;
|
||||||
padding: 16px 12px 6px 14px;
|
padding: 22px 12px 8px 14px;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
@ -708,7 +708,7 @@ async function handleSubmit() {
|
|||||||
.nova-login__submit {
|
.nova-login__submit {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
margin-top: 20px;
|
margin-top: 24px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border-radius: 980px;
|
border-radius: 980px;
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
:class="[
|
:class="[
|
||||||
'login-container',
|
'login-container',
|
||||||
{
|
{
|
||||||
|
'login-container--customer': isCustomerLogin,
|
||||||
'login-container--light': isLightMode,
|
'login-container--light': isLightMode,
|
||||||
'login-container--exit': isExiting,
|
'login-container--exit': isExiting,
|
||||||
},
|
},
|
||||||
@ -118,7 +119,7 @@ import { isPortalIrisActive } from '@/utils/page-transition-flag';
|
|||||||
const WechatLogin = defineAsyncComponent(
|
const WechatLogin = defineAsyncComponent(
|
||||||
() => import('./components/wechat-login.vue'),
|
() => 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(
|
const LoginCharacters = defineAsyncComponent(
|
||||||
() => import('./components/LoginCharacters.vue'),
|
() => import('./components/LoginCharacters.vue'),
|
||||||
);
|
);
|
||||||
@ -140,7 +141,7 @@ const isAdminLogin = computed(() => loginType.value === OmsLoginType.User);
|
|||||||
const brandCornerSuffix = computed(() =>
|
const brandCornerSuffix = computed(() =>
|
||||||
isAgentLogin.value ? t('login.brand.suffix.agent') : t('brand.fullName'),
|
isAgentLogin.value ? t('login.brand.suffix.agent') : t('brand.fullName'),
|
||||||
);
|
);
|
||||||
/** 角色动画偏重,首屏延后一帧再挂,管理端也挂但异步分包 */
|
/** 角色动画偏重,首屏延后空闲再挂 */
|
||||||
const showCharacters = ref(false);
|
const showCharacters = ref(false);
|
||||||
/** 管理端关怀条在翻页结束后再挂,避免展开过程中插入一块新图层 */
|
/** 管理端关怀条在翻页结束后再挂,避免展开过程中插入一块新图层 */
|
||||||
const careBannerReady = ref(!isPortalIrisActive());
|
const careBannerReady = ref(!isPortalIrisActive());
|
||||||
@ -473,6 +474,29 @@ onBeforeUnmount(() => {
|
|||||||
pointer-events: auto;
|
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 {
|
.login-hero-panel--admin {
|
||||||
inset: 0;
|
inset: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -492,16 +516,6 @@ onBeforeUnmount(() => {
|
|||||||
height: 100%;
|
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 {
|
.login-form-toolbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 14px;
|
top: 14px;
|
||||||
@ -541,7 +555,8 @@ onBeforeUnmount(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 380px;
|
max-width: 380px;
|
||||||
min-height: auto;
|
min-height: auto;
|
||||||
padding: 40px 32px 28px;
|
/* 底留白给门户切换钮,避免管理端短卡把按钮挤进登录键 */
|
||||||
|
padding: 44px 32px 56px;
|
||||||
background: var(--login-card-bg);
|
background: var(--login-card-bg);
|
||||||
border: 1px solid #e8e8ed;
|
border: 1px solid #e8e8ed;
|
||||||
outline: none;
|
outline: none;
|
||||||
@ -614,7 +629,7 @@ onBeforeUnmount(() => {
|
|||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
.login-form {
|
.login-form {
|
||||||
max-width: 97% !important;
|
max-width: 97% !important;
|
||||||
padding: 32px 20px 24px;
|
padding: 36px 20px 52px;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
'login.lang.toZh': 'Switch to Chinese',
|
'login.lang.toZh': 'Switch to Chinese',
|
||||||
'login.hero.tagline': 'Faster · Simpler · Professional',
|
'login.hero.tagline': 'Faster · Simpler · Professional',
|
||||||
'login.hero.desc.customer':
|
'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.title': 'More Professional',
|
||||||
'login.hero.admin.pillar.care.desc': 'Right lanes · No dropped issues · Clear end-to-end',
|
'login.hero.admin.pillar.care.desc': 'Right lanes · No dropped issues · Clear end-to-end',
|
||||||
'login.hero.admin.pillar.speed.title': 'Faster',
|
'login.hero.admin.pillar.speed.title': 'Faster',
|
||||||
@ -88,6 +88,9 @@
|
|||||||
'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.',
|
||||||
'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.cta.registerQuote': 'Register to see rates',
|
||||||
|
'login.hero.cta.exploreLanes': 'Explore lanes',
|
||||||
'login.field.account': 'Account',
|
'login.field.account': 'Account',
|
||||||
'login.field.account.agent': 'Agent code',
|
'login.field.account.agent': 'Agent code',
|
||||||
'login.field.password': 'Password',
|
'login.field.password': 'Password',
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
'login.lang.toZh': '切换为中文',
|
'login.lang.toZh': '切换为中文',
|
||||||
'login.hero.tagline': 'Faster · Simpler · Professional',
|
'login.hero.tagline': 'Faster · Simpler · Professional',
|
||||||
'login.hero.desc.customer':
|
'login.hero.desc.customer':
|
||||||
'查价说得清、下单走得顺、轨迹跟得上。AI 帮你看风险、提建议、少踩坑——从揽收到签收,BCD 陪你把每一票发好、盯紧、交代清楚。',
|
'查价说得清、下单走得顺、轨迹跟得上。AI 帮你看风险、提建议——从揽收到签收,BCD 陪你把每一票发好、盯紧、交代清楚。',
|
||||||
'login.hero.admin.pillar.care.title': '更专业',
|
'login.hero.admin.pillar.care.title': '更专业',
|
||||||
'login.hero.admin.pillar.care.desc': '线路选对 · 异常不丢 · 全程说得清',
|
'login.hero.admin.pillar.care.desc': '线路选对 · 异常不丢 · 全程说得清',
|
||||||
'login.hero.admin.pillar.speed.title': '更快速',
|
'login.hero.admin.pillar.speed.title': '更快速',
|
||||||
@ -81,6 +81,9 @@
|
|||||||
'login.care.holidayNote.nationalDay': '假期里若仍在岗,先把最急的办好,其余明天再说。',
|
'login.care.holidayNote.nationalDay': '假期里若仍在岗,先把最急的办好,其余明天再说。',
|
||||||
'login.hero.trackPlaceholder': '请输入跟踪单号',
|
'login.hero.trackPlaceholder': '请输入跟踪单号',
|
||||||
'login.hero.track': '查询物流',
|
'login.hero.track': '查询物流',
|
||||||
|
'login.hero.trust.customer': '美欧东南亚 · 仓配一体 · AI 陪跑',
|
||||||
|
'login.hero.cta.registerQuote': '去注册看价',
|
||||||
|
'login.hero.cta.exploreLanes': '了解线路',
|
||||||
'login.field.account': '账号',
|
'login.field.account': '账号',
|
||||||
'login.field.account.agent': '代理编号',
|
'login.field.account.agent': '代理编号',
|
||||||
'login.field.password': '密码',
|
'login.field.password': '密码',
|
||||||
|
|||||||
@ -59,26 +59,47 @@
|
|||||||
|
|
||||||
<!-- 步骤 1:选择注册方式 -->
|
<!-- 步骤 1:选择注册方式 -->
|
||||||
<template v-if="step === 'choose'">
|
<template v-if="step === 'choose'">
|
||||||
<div class="nova-register__choose">
|
<div class="nova-register__choose" role="group" :aria-label="t('marketing.register.choose.group')">
|
||||||
<button type="button" class="nova-register__choose-card" @click="selectWebRegister">
|
<button
|
||||||
|
type="button"
|
||||||
|
class="nova-register__choose-row"
|
||||||
|
@click="selectWebRegister"
|
||||||
|
>
|
||||||
<span class="nova-register__choose-icon nova-register__choose-icon--web">
|
<span class="nova-register__choose-icon nova-register__choose-icon--web">
|
||||||
<icon-computer :size="22" />
|
<icon-computer :size="20" />
|
||||||
</span>
|
</span>
|
||||||
<span class="nova-register__choose-title">{{ t('marketing.register.choose.web') }}</span>
|
<span class="nova-register__choose-copy">
|
||||||
<span class="nova-register__choose-desc">{{ t('marketing.register.choose.webDesc') }}</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>
|
||||||
|
<icon-right class="nova-register__choose-arrow" :size="14" />
|
||||||
</button>
|
</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">
|
<span class="nova-register__choose-icon nova-register__choose-icon--wechat">
|
||||||
<icon-wechat :size="22" />
|
<icon-wechat :size="20" />
|
||||||
</span>
|
</span>
|
||||||
<span class="nova-register__choose-title">{{ t('marketing.register.choose.wechat') }}</span>
|
<span class="nova-register__choose-copy">
|
||||||
<span class="nova-register__choose-desc">{{ t('marketing.register.choose.wechatDesc') }}</span>
|
<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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="nova-register__footer">
|
<div class="nova-register__alt">
|
||||||
{{ t('marketing.register.hasAccount') }}
|
<p class="nova-register__alt-hint">
|
||||||
<a-link @click="goLogin">{{ t('marketing.register.goLogin') }}</a-link>
|
{{ t('marketing.register.hasAccount') }}
|
||||||
</p>
|
<a-link @click="goLogin">{{ t('marketing.register.goLogin') }}</a-link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 步骤 2a:网页注册 -->
|
<!-- 步骤 2a:网页注册 -->
|
||||||
@ -265,6 +286,7 @@ import { Message } from '@arco-design/web-vue'
|
|||||||
import {
|
import {
|
||||||
IconComputer,
|
IconComputer,
|
||||||
IconMoonFill,
|
IconMoonFill,
|
||||||
|
IconRight,
|
||||||
IconSunFill,
|
IconSunFill,
|
||||||
IconWechat,
|
IconWechat,
|
||||||
} from '@arco-design/web-vue/es/icon'
|
} from '@arco-design/web-vue/es/icon'
|
||||||
@ -367,6 +389,12 @@ function selectWechatRegister() {
|
|||||||
step.value = 'wechat'
|
step.value = 'wechat'
|
||||||
syncStepQuery('wechat')
|
syncStepQuery('wechat')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 悬停/聚焦时预拉微信扫码分包,点进后更少等待 */
|
||||||
|
function prefetchWechatRegister() {
|
||||||
|
if (preferH5Portal() || isWeChatBrowser()) return
|
||||||
|
void import('@/views/login/components/wechat-login.vue')
|
||||||
|
}
|
||||||
const agentValidated = ref<boolean | null>(null)
|
const agentValidated = ref<boolean | null>(null)
|
||||||
const agentNameMasked = ref('')
|
const agentNameMasked = ref('')
|
||||||
const agentLoading = ref(false)
|
const agentLoading = ref(false)
|
||||||
@ -812,15 +840,15 @@ onBeforeUnmount(() => {
|
|||||||
border: none !important;
|
border: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
background: transparent !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(.theme-toggle-btn.arco-btn:hover),
|
||||||
.login-form-toolbar :deep(.login-lang-toggle:hover) {
|
.login-form-toolbar :deep(.login-lang-toggle:hover) {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
background: var(--app-acrylic-hover-bg) !important;
|
background: rgba(0, 0, 0, 0.04) !important;
|
||||||
color: var(--app-primary-color) !important;
|
color: #1d1d1f !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-toggle-btn {
|
.theme-toggle-btn {
|
||||||
@ -831,24 +859,23 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
--login-card-bg: #ffffff;
|
--login-card-bg: #ffffff;
|
||||||
--login-card-shadow:
|
--login-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 16px 32px rgba(0, 0, 0, 0.06);
|
||||||
inset 0 2px 8px rgba(15, 23, 42, 0.07),
|
|
||||||
inset 0 1px 1px rgba(15, 23, 42, 0.04);
|
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 460px;
|
max-width: 380px;
|
||||||
padding: 44px 30px 32px;
|
padding: 40px 32px 28px;
|
||||||
background: var(--login-card-bg);
|
background: var(--login-card-bg);
|
||||||
border: none;
|
border: 1px solid #e8e8ed;
|
||||||
border-radius: 20px;
|
border-radius: 16px;
|
||||||
box-shadow: var(--login-card-shadow);
|
box-shadow: var(--login-card-shadow);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form--register {
|
.login-form--register {
|
||||||
|
max-width: 460px;
|
||||||
max-height: min(94dvh, 780px);
|
max-height: min(94dvh, 780px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,7 +897,7 @@ onBeforeUnmount(() => {
|
|||||||
.nova-register__header {
|
.nova-register__header {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 18px;
|
margin-bottom: 28px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -879,8 +906,10 @@ onBeforeUnmount(() => {
|
|||||||
.nova-register__brand-hint {
|
.nova-register__brand-hint {
|
||||||
margin: 8px 0 0;
|
margin: 8px 0 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.4;
|
font-weight: 400;
|
||||||
color: rgba(15, 39, 68, 0.55);
|
line-height: 1.35;
|
||||||
|
color: #86868b;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nova-register__back {
|
.nova-register__back {
|
||||||
@ -904,72 +933,160 @@ onBeforeUnmount(() => {
|
|||||||
.nova-register__choose {
|
.nova-register__choose {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
width: 100%;
|
||||||
margin-top: 4px;
|
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;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
align-items: flex-start;
|
gap: 12px;
|
||||||
gap: 4px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16px 18px;
|
margin: 0;
|
||||||
|
padding: 14px 14px 14px 12px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 14px;
|
border-radius: 0;
|
||||||
background: #f0f3f4;
|
background: transparent;
|
||||||
box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
transition:
|
transition: background 0.18s cubic-bezier(0.22, 1, 0.36, 1);
|
||||||
background 0.2s ease,
|
|
||||||
transform 0.2s ease,
|
& + & {
|
||||||
box-shadow 0.2s ease;
|
border-top: 1px solid #d2d2d7;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: color-mix(in srgb, var(--app-primary-color) 8%, #f0f3f4);
|
background: color-mix(in srgb, var(--app-primary-color) 5%, #fff);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&: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 {
|
.nova-register__choose-icon {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
flex-shrink: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 40px;
|
width: 36px;
|
||||||
height: 40px;
|
height: 36px;
|
||||||
margin-bottom: 6px;
|
border-radius: 10px;
|
||||||
border-radius: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nova-register__choose-icon--web {
|
.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);
|
color: var(--app-primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nova-register__choose-icon--wechat {
|
.nova-register__choose-icon--wechat {
|
||||||
background: color-mix(in srgb, #07c160 16%, #fff);
|
background: color-mix(in srgb, #07c160 14%, #fff);
|
||||||
color: #07c160;
|
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 {
|
.nova-register__choose-title {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 700;
|
font-weight: 600;
|
||||||
color: #0f2744;
|
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 {
|
.nova-register__choose-desc {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.4;
|
font-weight: 400;
|
||||||
color: #86909c;
|
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 {
|
.nova-register__invite {
|
||||||
@ -1163,12 +1280,13 @@ onBeforeUnmount(() => {
|
|||||||
.nova-register__footer {
|
.nova-register__footer {
|
||||||
margin: 16px 0 0;
|
margin: 16px 0 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
color: #86909c;
|
line-height: 1.35;
|
||||||
|
color: #86868b;
|
||||||
|
|
||||||
:deep(.arco-link) {
|
:deep(.arco-link) {
|
||||||
color: var(--app-primary-color);
|
color: var(--app-primary-color);
|
||||||
font-weight: 600;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,10 +4,12 @@ export default {
|
|||||||
'marketing.register.brandHint': 'Welcome to BCD customer portal',
|
'marketing.register.brandHint': 'Welcome to BCD customer portal',
|
||||||
'marketing.register.brandHint.web': 'Register with email & phone',
|
'marketing.register.brandHint.web': 'Register with email & phone',
|
||||||
'marketing.register.brandHint.wechat': 'Register with WeChat',
|
'marketing.register.brandHint.wechat': 'Register with WeChat',
|
||||||
|
'marketing.register.choose.group': 'Choose how to register',
|
||||||
'marketing.register.choose.web': 'Web register',
|
'marketing.register.choose.web': 'Web register',
|
||||||
'marketing.register.choose.webDesc': 'Fill in details and open your portal',
|
'marketing.register.choose.webDesc': 'Fill in details and open your portal',
|
||||||
'marketing.register.choose.wechat': 'WeChat register',
|
'marketing.register.choose.wechat': 'WeChat register',
|
||||||
'marketing.register.choose.wechatDesc': 'Scan to authorize and finish quickly',
|
'marketing.register.choose.wechatDesc': 'Scan to authorize and finish quickly',
|
||||||
|
'marketing.register.choose.recommended': 'Recommended',
|
||||||
'marketing.register.backToChoose': '← Back to options',
|
'marketing.register.backToChoose': '← Back to options',
|
||||||
|
|
||||||
'marketing.register.referrerHint': 'Invited by {name} ({code})',
|
'marketing.register.referrerHint': 'Invited by {name} ({code})',
|
||||||
|
|||||||
@ -4,10 +4,12 @@ export default {
|
|||||||
'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
|
'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
|
||||||
'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
|
'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
|
||||||
'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
|
'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
|
||||||
|
'marketing.register.choose.group': '选择注册方式',
|
||||||
'marketing.register.choose.web': '网页注册',
|
'marketing.register.choose.web': '网页注册',
|
||||||
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
|
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
|
||||||
'marketing.register.choose.wechat': '微信注册',
|
'marketing.register.choose.wechat': '微信注册',
|
||||||
'marketing.register.choose.wechatDesc': '扫码授权,快捷完成注册',
|
'marketing.register.choose.wechatDesc': '扫码授权,快捷完成注册',
|
||||||
|
'marketing.register.choose.recommended': '推荐',
|
||||||
'marketing.register.backToChoose': '← 返回选择注册方式',
|
'marketing.register.backToChoose': '← 返回选择注册方式',
|
||||||
|
|
||||||
'marketing.register.referrerHint': '您正通过 {name}({code})的邀请注册',
|
'marketing.register.referrerHint': '您正通过 {name}({code})的邀请注册',
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
<div class="ai-app-main">
|
<div class="ai-app-main">
|
||||||
<section class="ai-welcome" :class="{ 'is-hidden': chatting }">
|
<section class="ai-welcome" :class="{ 'is-hidden': chatting }">
|
||||||
<div class="ai-welcome__hero">
|
<div class="ai-welcome__hero">
|
||||||
<!-- 飞机 / 跑道拆开,便于单独调间距与尺寸;机腹仍对齐 --runway-edge-top -->
|
|
||||||
<div class="ai-welcome-plane" aria-hidden="true">
|
<div class="ai-welcome-plane" aria-hidden="true">
|
||||||
<img
|
<img
|
||||||
src="/site/img/hero-plane-3d.webp"
|
src="/site/img/hero-plane-3d.webp"
|
||||||
@ -28,11 +27,9 @@
|
|||||||
fetchpriority="high"
|
fetchpriority="high"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-welcome-runway">
|
<div class="ai-welcome-title-wrap">
|
||||||
<SiteRunway :text="runwayTitle" />
|
<SiteRunway :text="heroTitle" />
|
||||||
<h2 class="ai-welcome-title ai-welcome-title--sr">
|
<h1 class="ai-welcome-title ai-welcome-title--sr">{{ heroTitle }}</h1>
|
||||||
{{ runwayTitle }}
|
|
||||||
</h2>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-welcome__stack">
|
<div class="ai-welcome__stack">
|
||||||
<div class="ai-welcome__command">
|
<div class="ai-welcome__command">
|
||||||
@ -116,7 +113,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</EdiChatDialog>
|
</EdiChatDialog>
|
||||||
</div>
|
</div>
|
||||||
<!-- 沉底通栏:脱出限宽 layout,贴合作伙伴条上方全宽自适应 -->
|
<!-- 沉底栏:与主内容同宽;合作伙伴条仍全宽 -->
|
||||||
<div v-if="!chatting" class="ai-home-bottom">
|
<div v-if="!chatting" class="ai-home-bottom">
|
||||||
<SiteFeaturedRoutes
|
<SiteFeaturedRoutes
|
||||||
:is-zh="isZh"
|
:is-zh="isZh"
|
||||||
@ -345,7 +342,7 @@
|
|||||||
const shortTitle = ref(
|
const shortTitle = ref(
|
||||||
typeof window !== 'undefined' && window.matchMedia('(max-width: 640px)').matches,
|
typeof window !== 'undefined' && window.matchMedia('(max-width: 640px)').matches,
|
||||||
);
|
);
|
||||||
const runwayTitle = computed(() =>
|
const heroTitle = computed(() =>
|
||||||
shortTitle.value ? copy.value.titleShort : copy.value.title,
|
shortTitle.value ? copy.value.titleShort : copy.value.title,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -45,9 +45,11 @@
|
|||||||
const dot = isNarrow ? 1.8 : 2;
|
const dot = isNarrow ? 1.8 : 2;
|
||||||
const influence = 120;
|
const influence = 120;
|
||||||
const strength = 18;
|
const strength = 18;
|
||||||
const dprCap = 1.25;
|
const dprCap = 1.1;
|
||||||
/** 上下各约 18% 渐隐,中间才有点阵 */
|
/** 上下各约 18% 渐隐,中间才有点阵 */
|
||||||
const edgePad = 0.18;
|
const edgePad = 0.18;
|
||||||
|
const cold = 'rgba(15, 23, 42, 1)';
|
||||||
|
const warm = 'rgba(2, 62, 138, 1)';
|
||||||
|
|
||||||
let width = 0;
|
let width = 0;
|
||||||
let height = 0;
|
let height = 0;
|
||||||
@ -65,6 +67,7 @@
|
|||||||
let isPaused = props.paused;
|
let isPaused = props.paused;
|
||||||
let pointerLast = 0;
|
let pointerLast = 0;
|
||||||
let moving = false;
|
let moving = false;
|
||||||
|
let resizeTimer = 0;
|
||||||
|
|
||||||
const syncRect = () => {
|
const syncRect = () => {
|
||||||
const rect = root.getBoundingClientRect();
|
const rect = root.getBoundingClientRect();
|
||||||
@ -149,12 +152,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const a = (hot ? 0.22 : 0.12) * edge;
|
// 固定色 + globalAlpha,避免每点拼 rgba 字符串
|
||||||
ctx.fillStyle = hot
|
ctx.globalAlpha = (hot ? 0.22 : 0.12) * edge;
|
||||||
? `rgba(2, 62, 138, ${a})`
|
ctx.fillStyle = hot ? warm : cold;
|
||||||
: `rgba(15, 23, 42, ${a})`;
|
|
||||||
ctx.fillRect(x - s / 2, y - s / 2, s, s);
|
ctx.fillRect(x - s / 2, y - s / 2, s, s);
|
||||||
}
|
}
|
||||||
|
ctx.globalAlpha = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
const tryStop = () => {
|
const tryStop = () => {
|
||||||
@ -232,8 +235,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ro = new ResizeObserver(() => {
|
const ro = new ResizeObserver(() => {
|
||||||
rebuild();
|
if (resizeTimer) window.clearTimeout(resizeTimer);
|
||||||
paint();
|
resizeTimer = window.setTimeout(() => {
|
||||||
|
resizeTimer = 0;
|
||||||
|
rebuild();
|
||||||
|
paint();
|
||||||
|
}, 80);
|
||||||
});
|
});
|
||||||
ro.observe(root);
|
ro.observe(root);
|
||||||
rebuild();
|
rebuild();
|
||||||
@ -258,6 +265,10 @@
|
|||||||
|
|
||||||
teardown = () => {
|
teardown = () => {
|
||||||
tryStop();
|
tryStop();
|
||||||
|
if (resizeTimer) {
|
||||||
|
window.clearTimeout(resizeTimer);
|
||||||
|
resizeTimer = 0;
|
||||||
|
}
|
||||||
setPaused = null;
|
setPaused = null;
|
||||||
ro.disconnect();
|
ro.disconnect();
|
||||||
io.disconnect();
|
io.disconnect();
|
||||||
|
|||||||
@ -9,13 +9,13 @@
|
|||||||
<h3 class="ai-featured-routes__title">{{ copy.featuredRoutesTitle }}</h3>
|
<h3 class="ai-featured-routes__title">{{ copy.featuredRoutesTitle }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-featured-routes__actions">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="ai-featured-routes__nav-btn"
|
class="ai-featured-routes__nav-btn"
|
||||||
:aria-label="copy.featuredRoutesPrev"
|
:aria-label="copy.featuredRoutesPrev"
|
||||||
:disabled="busy || !canPrev"
|
:disabled="busy || !canPrev"
|
||||||
@click="scrollBy(-1)"
|
@click="scrollPage(-1)"
|
||||||
>
|
>
|
||||||
<span aria-hidden="true">‹</span>
|
<span aria-hidden="true">‹</span>
|
||||||
</button>
|
</button>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
class="ai-featured-routes__nav-btn"
|
class="ai-featured-routes__nav-btn"
|
||||||
:aria-label="copy.featuredRoutesNext"
|
:aria-label="copy.featuredRoutesNext"
|
||||||
:disabled="busy || !canNext"
|
:disabled="busy || !canNext"
|
||||||
@click="scrollBy(1)"
|
@click="scrollPage(1)"
|
||||||
>
|
>
|
||||||
<span aria-hidden="true">›</span>
|
<span aria-hidden="true">›</span>
|
||||||
</button>
|
</button>
|
||||||
@ -151,14 +151,29 @@
|
|||||||
const copy = computed(() => (props.isZh ? WELCOME_COPY.zh : WELCOME_COPY.en));
|
const copy = computed(() => (props.isZh ? WELCOME_COPY.zh : WELCOME_COPY.en));
|
||||||
const routesCopy = computed(() => ROUTES_COPY[lang.value]);
|
const routesCopy = computed(() => ROUTES_COPY[lang.value]);
|
||||||
|
|
||||||
|
const PAGE_SIZE_FALLBACK = 4;
|
||||||
|
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const featured = ref<RouteItem[]>([]);
|
const featured = ref<RouteItem[]>([]);
|
||||||
const scrollerRef = ref<HTMLElement | null>(null);
|
const scrollerRef = ref<HTMLElement | null>(null);
|
||||||
const canPrev = ref(false);
|
const canPrev = ref(false);
|
||||||
const canNext = ref(false);
|
const canNext = ref(false);
|
||||||
|
const pageSize = ref(PAGE_SIZE_FALLBACK);
|
||||||
|
|
||||||
const visible = computed(() => loading.value || featured.value.length > 0);
|
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) {
|
function cardAria(item: RouteItem) {
|
||||||
const eta = formatRouteTimeliness(item);
|
const eta = formatRouteTimeliness(item);
|
||||||
return [
|
return [
|
||||||
@ -196,29 +211,42 @@
|
|||||||
syncScrollState();
|
syncScrollState();
|
||||||
}
|
}
|
||||||
|
|
||||||
function stepPx() {
|
/** 一整页:用第 N 张相对第 0 张的 offset,避免 gap/亚像素对不齐 */
|
||||||
|
function pageStepPx() {
|
||||||
const el = scrollerRef.value;
|
const el = scrollerRef.value;
|
||||||
if (!el) return 0;
|
if (!el) return 0;
|
||||||
const item = el.querySelector('.ai-featured-routes__item') as HTMLElement | null;
|
const size = readPageSize();
|
||||||
if (!item) return Math.round(el.clientWidth * 0.72);
|
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 styles = getComputedStyle(el);
|
||||||
const gap = parseFloat(styles.columnGap || styles.gap || '16') || 16;
|
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;
|
const el = scrollerRef.value;
|
||||||
if (!el) return;
|
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) {
|
function onKeydown(event: KeyboardEvent) {
|
||||||
if (event.key === 'ArrowLeft') {
|
if (event.key === 'ArrowLeft') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
scrollBy(-1);
|
scrollPage(-1);
|
||||||
} else if (event.key === 'ArrowRight') {
|
} else if (event.key === 'ArrowRight') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
scrollBy(1);
|
scrollPage(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,8 +287,12 @@
|
|||||||
ro?.disconnect();
|
ro?.disconnect();
|
||||||
ro = null;
|
ro = null;
|
||||||
if (!el || typeof ResizeObserver === 'undefined') return;
|
if (!el || typeof ResizeObserver === 'undefined') return;
|
||||||
ro = new ResizeObserver(() => syncScrollState());
|
ro = new ResizeObserver(() => {
|
||||||
|
readPageSize();
|
||||||
|
syncScrollState();
|
||||||
|
});
|
||||||
ro.observe(el);
|
ro.observe(el);
|
||||||
|
readPageSize();
|
||||||
syncScrollState();
|
syncScrollState();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
/**
|
/**
|
||||||
* 左视图淡线跑道:
|
* 欢迎标题 canvas:保留原逐字入场 / 斜切 / 品牌双色,不再画跑道线。
|
||||||
* - 上下冷灰短横 / 中线略暖略粗,两端更长消隐
|
|
||||||
* - 入场:道面先淡入 → 标题轻入(少 whoosh)
|
|
||||||
* - 通过 --runway-edge-top 把上边线位置交给飞机对齐
|
|
||||||
*/
|
*/
|
||||||
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
import { isPortalIrisActive } from '@/utils/page-transition-flag';
|
import { isPortalIrisActive } from '@/utils/page-transition-flag';
|
||||||
@ -39,224 +36,78 @@
|
|||||||
const dprCap = 1.5;
|
const dprCap = 1.5;
|
||||||
|
|
||||||
const ENTER_DELAY = 80;
|
const ENTER_DELAY = 80;
|
||||||
const DECK_DUR = 340;
|
const TEXT_AT = 120;
|
||||||
const TEXT_AT = 200; // 道面起势后再出字
|
|
||||||
const CHAR_STAGGER = 18;
|
const CHAR_STAGGER = 18;
|
||||||
const CHAR_DUR = 260;
|
const CHAR_DUR = 280;
|
||||||
let width = 0;
|
let width = 0;
|
||||||
let height = 0;
|
let height = 0;
|
||||||
let currentText = props.text;
|
let currentText = props.text;
|
||||||
/** 开场经过的毫秒(扣 delay 后) */
|
|
||||||
let enterElapsed = reduceMotion ? 1e9 : 0;
|
let enterElapsed = reduceMotion ? 1e9 : 0;
|
||||||
let enterRaf = 0;
|
let enterRaf = 0;
|
||||||
let enterStart = 0;
|
let enterStart = 0;
|
||||||
let enterDone = reduceMotion;
|
let enterDone = reduceMotion;
|
||||||
const gridGap = isNarrow ? 20 : 18;
|
let resizeTimer = 0;
|
||||||
/** 吸附布局只在 rebuild 算一次;paint 动画帧禁止读 rect/写 CSS */
|
let cachedFont = '';
|
||||||
let layout = {
|
let cachedCharWidths: number[] = [];
|
||||||
x0: 0,
|
let cachedChars: string[] = [];
|
||||||
y0: 0,
|
let cachedLabel = '';
|
||||||
y1: 0,
|
|
||||||
cy: 0,
|
|
||||||
pw: 0,
|
|
||||||
ph: 0,
|
|
||||||
skew: 0,
|
|
||||||
dashPhase: 0,
|
|
||||||
ready: false,
|
|
||||||
};
|
|
||||||
let lastEdgeTop = '';
|
|
||||||
let settleRaf = 0;
|
|
||||||
|
|
||||||
const easeOutCubic = (t: number) => 1 - (1 - t) ** 3;
|
const easeOutCubic = (t: number) => 1 - (1 - t) ** 3;
|
||||||
|
|
||||||
const enterTotalMs = (charCount: number) => {
|
const enterTotalMs = (charCount: number) =>
|
||||||
const textEnd = TEXT_AT + Math.max(0, charCount - 1) * CHAR_STAGGER + CHAR_DUR;
|
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 paint = () => {
|
const paint = () => {
|
||||||
ctx.clearRect(0, 0, width, height);
|
ctx.clearRect(0, 0, width, height);
|
||||||
if (width < 40 || height < 24 || !layout.ready) return;
|
if (width < 40 || height < 24) 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;
|
|
||||||
|
|
||||||
const label = currentText.trim();
|
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;
|
if (!label) return;
|
||||||
|
|
||||||
ctx.font = `600 ${fontSize}px "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif`;
|
const cx = width / 2;
|
||||||
const chars = [...label];
|
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 brandMatch = label.match(/^BCD(\s*·\s*)?/);
|
||||||
const brandLen = brandMatch ? [...brandMatch[0]].length : 0;
|
const brandLen = brandMatch ? [...brandMatch[0]].length : 0;
|
||||||
const brandFill = 'rgba(2, 62, 138, 0.9)';
|
const brandFill = 'rgba(2, 62, 138, 0.9)';
|
||||||
const accentFill = 'rgba(233, 106, 38, 0.92)';
|
const accentFill = 'rgba(233, 106, 38, 0.92)';
|
||||||
const shadowFill = 'rgba(18, 24, 32, 0.1)';
|
const shadowFill = 'rgba(18, 24, 32, 0.12)';
|
||||||
const letterGap = fontSize * 0.12;
|
const letterGap = fontSize * 0.14;
|
||||||
const charWidths = chars.map((ch) => ctx.measureText(ch).width);
|
const charWidths = cachedCharWidths;
|
||||||
const totalW =
|
const totalW =
|
||||||
charWidths.reduce((s, w) => s + w, 0) + letterGap * Math.max(0, chars.length - 1);
|
charWidths.reduce((s, w) => s + w, 0) + letterGap * Math.max(0, chars.length - 1);
|
||||||
// 轻位移,避免抢输入台注意
|
const whooshMax = Math.min(36, width * 0.05);
|
||||||
const whooshMax = Math.min(28, width * 0.04);
|
|
||||||
const yGlyph = fontSize * 0.02;
|
const yGlyph = fontSize * 0.02;
|
||||||
const shadowX = fontSize * 0.04;
|
const shadowX = fontSize * 0.045;
|
||||||
const shadowY = fontSize * 0.1;
|
const shadowY = fontSize * 0.11;
|
||||||
|
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.translate(cx, cy);
|
ctx.translate(cx, cy);
|
||||||
ctx.transform(1, 0, shear, 1, 0, 0);
|
ctx.transform(1, 0, shear, 1, 0, 0);
|
||||||
ctx.textAlign = 'center';
|
ctx.textAlign = 'center';
|
||||||
ctx.textBaseline = 'middle';
|
ctx.textBaseline = 'middle';
|
||||||
|
ctx.font = font;
|
||||||
|
|
||||||
let cursor = -totalW / 2;
|
let cursor = -totalW / 2;
|
||||||
for (let i = 0; i < chars.length; i++) {
|
for (let i = 0; i < chars.length; i++) {
|
||||||
@ -324,30 +175,37 @@
|
|||||||
|
|
||||||
const rebuild = () => {
|
const rebuild = () => {
|
||||||
const rect = root.getBoundingClientRect();
|
const rect = root.getBoundingClientRect();
|
||||||
width = Math.max(1, Math.floor(rect.width));
|
const nextW = Math.max(1, Math.floor(rect.width));
|
||||||
height = Math.max(1, Math.floor(rect.height));
|
const nextH = Math.max(1, Math.floor(rect.height));
|
||||||
const dpr = Math.min(window.devicePixelRatio || 1, dprCap);
|
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.width = Math.floor(width * dpr);
|
||||||
canvas.height = Math.floor(height * dpr);
|
canvas.height = Math.floor(height * dpr);
|
||||||
canvas.style.width = `${width}px`;
|
canvas.style.width = `${width}px`;
|
||||||
canvas.style.height = `${height}px`;
|
canvas.style.height = `${height}px`;
|
||||||
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||||
computeLayout();
|
|
||||||
paint();
|
paint();
|
||||||
if (settleRaf) cancelAnimationFrame(settleRaf);
|
|
||||||
settleRaf = requestAnimationFrame(() => {
|
|
||||||
settleRaf = 0;
|
|
||||||
computeLayout();
|
|
||||||
paint();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
replayEnter = () => {
|
replayEnter = () => {
|
||||||
currentText = props.text;
|
currentText = props.text;
|
||||||
|
cachedFont = '';
|
||||||
startEnter();
|
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);
|
ro.observe(root);
|
||||||
rebuild();
|
rebuild();
|
||||||
|
|
||||||
@ -360,18 +218,12 @@
|
|||||||
|
|
||||||
teardown = () => {
|
teardown = () => {
|
||||||
stopEnter();
|
stopEnter();
|
||||||
if (settleRaf) {
|
if (resizeTimer) {
|
||||||
cancelAnimationFrame(settleRaf);
|
window.clearTimeout(resizeTimer);
|
||||||
settleRaf = 0;
|
resizeTimer = 0;
|
||||||
}
|
}
|
||||||
ro.disconnect();
|
ro.disconnect();
|
||||||
replayEnter = null;
|
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>
|
<style scoped>
|
||||||
.ai-runway {
|
.ai-runway {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 2;
|
||||||
width: min(760px, 96%);
|
width: min(760px, 96%);
|
||||||
height: clamp(84px, 11vw, 128px);
|
height: clamp(44px, 5.5vw, 64px);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
@ -405,14 +257,14 @@
|
|||||||
@media (max-height: 900px) {
|
@media (max-height: 900px) {
|
||||||
.ai-runway {
|
.ai-runway {
|
||||||
width: min(480px, 90%);
|
width: min(480px, 90%);
|
||||||
height: 76px;
|
height: 42px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.ai-runway {
|
.ai-runway {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -54,19 +54,13 @@ export function goOfficialLogin(
|
|||||||
armOfficialLoginFlip();
|
armOfficialLoginFlip();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 先确保登录分包就绪,再开翻页,避免顶栏进度条干等
|
// 立刻开跳:预取在 hover 已做;这里再等 chunk 会让虹膜「点了不动」
|
||||||
void (async () => {
|
void import(
|
||||||
try {
|
preferMobilePortal()
|
||||||
if (preferMobilePortal()) {
|
? '@/views/h5/customer-center/login/index.vue'
|
||||||
await import('@/views/h5/customer-center/login/index.vue');
|
: '@/views/login/index.vue',
|
||||||
} else {
|
).catch(() => undefined);
|
||||||
await import('@/views/login/index.vue');
|
void router.push(officialLoginLocation(dest));
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
/* ignore:仍继续跳转 */
|
|
||||||
}
|
|
||||||
await router.push(officialLoginLocation(dest));
|
|
||||||
})();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2216,7 +2216,7 @@ body.command-home #ai-advisor-shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome-plane,
|
.ai-welcome-plane,
|
||||||
.ai-welcome-runway,
|
.ai-welcome-title-wrap,
|
||||||
.ai-composer-slot--welcome,
|
.ai-composer-slot--welcome,
|
||||||
.ai-featured-routes,
|
.ai-featured-routes,
|
||||||
.ai-intent-section,
|
.ai-intent-section,
|
||||||
@ -2228,7 +2228,7 @@ body.command-home #ai-advisor-shell {
|
|||||||
animation-delay: 0s;
|
animation-delay: 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome-runway {
|
.ai-welcome-title-wrap {
|
||||||
animation-delay: 0.06s;
|
animation-delay: 0.06s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2249,9 +2249,6 @@ body.command-home #ai-advisor-shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome__hero {
|
.ai-welcome__hero {
|
||||||
/* 跑道上边线 Y 由 SiteRunway 写入;飞机单独一块也能读到 */
|
|
||||||
--runway-edge-top: 14px;
|
|
||||||
--plane-belly-inset: clamp(24px, 5vw, 40px);
|
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -2260,7 +2257,7 @@ body.command-home #ai-advisor-shell {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: var(--ai-content-max);
|
max-width: var(--ai-content-max);
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
padding: 0 0 4px;
|
padding: 0 0 4px;
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
}
|
}
|
||||||
@ -2320,17 +2317,16 @@ body.command-home #navbar .site-nav-avatar:hover {
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome-runway {
|
.ai-welcome-title-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1; /* 与点阵同视觉层,不做抬升浮层 */
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
justify-content: center;
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 4px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 点阵标题的无障碍文案 */
|
/* canvas 标题的无障碍文案 */
|
||||||
.ai-welcome-title--sr {
|
.ai-welcome-title--sr {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
@ -2506,19 +2502,17 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 通栏:紧跟提问区,全屏宽(脱出 layout 限宽) */
|
/* 底栏:与主内容同宽居中(宽屏不再 100vw 通栏脱出) */
|
||||||
.ai-home-bottom {
|
.ai-home-bottom {
|
||||||
--ai-home-rail-pad: clamp(12px, 1.6vw, 28px);
|
--ai-home-rail-pad: clamp(12px, 1.6vw, 28px);
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 50%;
|
|
||||||
right: auto;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 100vw;
|
width: 100%;
|
||||||
max-width: 100vw;
|
max-width: var(--ai-content-max, 1200px);
|
||||||
margin: clamp(14px, 2.2vh, 24px) 0 0 -50vw;
|
margin: clamp(14px, 2.2vh, 24px) auto 0;
|
||||||
padding: 0 0 4px;
|
padding: 0 0 4px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@ -2542,22 +2536,25 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 精选线路:静止横排 + peek 可滑(无自动跑马灯) */
|
/* 精选线路:一屏整 4 张均分,无 peek;多余线路整页翻
|
||||||
|
注意:--ai-featured-card-w 里的 100% 在 item 上解析 = scroller 内容盒宽度,
|
||||||
|
故横向 padding 只能放在 rail,公式里不能再减 head-pad(否则卡偏窄漏出第 5 张)。 */
|
||||||
.ai-featured-routes {
|
.ai-featured-routes {
|
||||||
--ai-featured-gap: 0.75rem;
|
--ai-featured-gap: 0.65rem;
|
||||||
--ai-featured-peek: 1.75rem;
|
--ai-featured-visible: 4;
|
||||||
--ai-featured-visible: 5;
|
|
||||||
--ai-featured-card-h: 11.5rem;
|
--ai-featured-card-h: 11.5rem;
|
||||||
--ai-featured-head-pad: var(--ai-home-rail-pad, 16px);
|
--ai-featured-head-pad: var(--ai-home-rail-pad, 16px);
|
||||||
--ai-featured-fade-bg: var(--ai-bg, #f0f3f4);
|
--ai-featured-fade-bg: var(--ai-bg, #f0f3f4);
|
||||||
|
/* -1px 吃掉亚像素取整,避免第 5 张露 1px */
|
||||||
--ai-featured-card-w: calc(
|
--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)
|
var(--ai-featured-visible)
|
||||||
);
|
);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding: 4px 0 0;
|
padding: 4px 0 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-featured-routes__head {
|
.ai-featured-routes__head {
|
||||||
@ -2608,9 +2605,9 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.7);
|
border: 1px solid rgba(255, 255, 255, 0.7);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: color-mix(in srgb, #fff 52%, transparent);
|
background: color-mix(in srgb, #fff 88%, transparent);
|
||||||
backdrop-filter: blur(10px) saturate(150%);
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: blur(10px) saturate(150%);
|
-webkit-backdrop-filter: none;
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
|
||||||
color: var(--ai-action);
|
color: var(--ai-action);
|
||||||
font-size: 1.05rem;
|
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 {
|
.ai-featured-routes__rail {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 0;
|
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 {
|
.ai-featured-routes__fade {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0.25rem;
|
||||||
bottom: 0;
|
bottom: 0.5rem;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
width: clamp(2.5rem, 5vw, 4.5rem);
|
width: 0.75rem;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-featured-routes__fade--left {
|
.ai-featured-routes__fade--left {
|
||||||
left: 0;
|
left: var(--ai-featured-head-pad);
|
||||||
background: linear-gradient(90deg, var(--ai-featured-fade-bg) 18%, transparent);
|
background: linear-gradient(90deg, var(--ai-featured-fade-bg) 40%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-featured-routes__fade--right {
|
.ai-featured-routes__fade--right {
|
||||||
right: 0;
|
right: var(--ai-featured-head-pad);
|
||||||
background: linear-gradient(270deg, var(--ai-featured-fade-bg) 18%, transparent);
|
background: linear-gradient(270deg, var(--ai-featured-fade-bg) 40%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-featured-routes__scroller {
|
.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);
|
gap: var(--ai-featured-gap);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 var(--ai-featured-head-pad);
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
overflow-x: auto;
|
overflow-x: hidden;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
scroll-snap-type: x mandatory;
|
scroll-snap-type: x mandatory;
|
||||||
scroll-padding-inline: var(--ai-featured-head-pad);
|
scroll-padding-inline: 0;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
outline: none;
|
outline: none;
|
||||||
@ -2706,12 +2707,15 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-composer-dock
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ai-featured-routes__item {
|
.ai-featured-routes__item {
|
||||||
|
box-sizing: border-box;
|
||||||
flex: 0 0 var(--ai-featured-card-w);
|
flex: 0 0 var(--ai-featured-card-w);
|
||||||
width: 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;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
scroll-snap-align: start;
|
scroll-snap-align: start;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-featured-routes__skel {
|
.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: 1px solid rgba(255, 255, 255, 0.66);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
background: color-mix(in srgb, #fff 46%, transparent);
|
background: color-mix(in srgb, #fff 46%, transparent);
|
||||||
|
backdrop-filter: blur(14px) saturate(160%);
|
||||||
|
-webkit-backdrop-filter: blur(14px) saturate(160%);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.78),
|
inset 0 1px 0 rgba(255, 255, 255, 0.78),
|
||||||
0 1px 2px rgba(15, 23, 42, 0.04);
|
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-routes {
|
||||||
--ai-featured-visible: 4;
|
--ai-featured-visible: 4;
|
||||||
--ai-featured-peek: 2.25rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 980px) {
|
@media (max-width: 980px) {
|
||||||
.ai-featured-routes {
|
.ai-featured-routes {
|
||||||
--ai-featured-visible: 3;
|
--ai-featured-visible: 3;
|
||||||
--ai-featured-peek: 2.25rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.ai-featured-routes {
|
.ai-featured-routes {
|
||||||
--ai-featured-visible: 2;
|
--ai-featured-visible: 2;
|
||||||
--ai-featured-peek: 14vw;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 520px) {
|
@media (max-width: 520px) {
|
||||||
.ai-featured-routes {
|
.ai-featured-routes {
|
||||||
--ai-featured-visible: 1;
|
--ai-featured-visible: 1;
|
||||||
--ai-featured-peek: 18vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-featured-routes__nav {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-featured-routes {
|
|
||||||
--ai-featured-card-h: 11rem;
|
--ai-featured-card-h: 11rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3016,13 +3011,13 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.55);
|
border: 1px solid rgba(255, 255, 255, 0.55);
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
|
||||||
backdrop-filter: blur(14px) saturate(160%);
|
/* blur 改由 command-home 叠色承担,避免 clip-path + blur 合层卡顿 */
|
||||||
-webkit-backdrop-filter: blur(14px) saturate(160%);
|
backdrop-filter: none;
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
transition:
|
transition:
|
||||||
background 0.18s var(--ai-ease),
|
background 0.18s var(--ai-ease),
|
||||||
border-color 0.18s var(--ai-ease),
|
border-color 0.18s var(--ai-ease),
|
||||||
color 0.18s var(--ai-ease),
|
color 0.18s var(--ai-ease);
|
||||||
filter 0.18s var(--ai-ease);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-intent-ribbon__item:first-child .ai-intent-ribbon__face {
|
.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;
|
padding: 6px 10px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.7);
|
border: 1px solid rgba(255, 255, 255, 0.7);
|
||||||
background: color-mix(in srgb, #fff 55%, transparent);
|
background: color-mix(in srgb, #fff 92%, transparent);
|
||||||
backdrop-filter: blur(12px) saturate(150%);
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: blur(12px) saturate(150%);
|
-webkit-backdrop-filter: none;
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.75),
|
inset 0 1px 0 rgba(255, 255, 255, 0.75),
|
||||||
0 8px 22px rgba(15, 23, 42, 0.1);
|
0 8px 22px rgba(15, 23, 42, 0.1);
|
||||||
@ -3333,8 +3328,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* 负 margin = 上边线位置 + 机腹图内留白,让机腹贴住跑道上沿 */
|
margin: 0 0 -28px;
|
||||||
margin: 0 0 calc(-1 * (var(--runway-edge-top, 14px) + var(--plane-belly-inset, 40px)));
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3344,12 +3338,11 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
width: min(448px, 40vw);
|
width: min(448px, 40vw);
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
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-origin: 50% 60%;
|
||||||
/* 先落地,再呼吸,避免两段 transform 抢同一属性 */
|
animation: aiPlaneIn 0.68s cubic-bezier(0.22, 1, 0.36, 1) both;
|
||||||
animation:
|
|
||||||
aiPlaneIn 0.68s cubic-bezier(0.22, 1, 0.36, 1) both,
|
|
||||||
aiPlaneBreathe 5.6s ease-in-out 0.72s infinite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes aiPlaneIn {
|
@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) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.ai-welcome-plane,
|
.ai-welcome-plane,
|
||||||
.ai-welcome-plane img,
|
.ai-welcome-plane img,
|
||||||
.ai-welcome-runway,
|
.ai-welcome-title-wrap,
|
||||||
.ai-composer-slot--welcome,
|
.ai-composer-slot--welcome,
|
||||||
.ai-featured-routes,
|
.ai-featured-routes,
|
||||||
.ai-ask,
|
.ai-ask,
|
||||||
@ -3402,7 +3385,6 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .ai-featured-routes {
|
body.command-home .ai-featured-routes {
|
||||||
--ai-featured-peek: 1.5rem;
|
|
||||||
--ai-featured-card-h: 10.75rem;
|
--ai-featured-card-h: 10.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3435,8 +3417,8 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
font-size: 0.74rem;
|
font-size: 0.74rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .ai-welcome__hero {
|
body.command-home .ai-welcome-plane {
|
||||||
--plane-belly-inset: clamp(18px, 4vw, 32px);
|
margin-bottom: -18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .ai-welcome-plane img {
|
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 {
|
body.command-home .ai-trust-bar {
|
||||||
--ai-trust-bar-h: 44px;
|
--ai-trust-bar-h: 44px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
@ -4456,8 +4439,8 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome__hero {
|
.ai-welcome-plane {
|
||||||
--plane-belly-inset: clamp(22px, 5vw, 40px);
|
margin-bottom: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome__stack {
|
.ai-welcome__stack {
|
||||||
@ -4561,6 +4544,10 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ai-welcome-title-wrap {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.ai-welcome__stack {
|
.ai-welcome__stack {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
@ -4848,35 +4835,46 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Paint budget: 默认关掉大面积 blur;精选卡 / 意图条白名单保留液态玻璃 */
|
/* Paint budget: 默认关掉大面积 blur;精选线路卡保留液态玻璃 */
|
||||||
body.command-home,
|
body.command-home,
|
||||||
body.command-home * {
|
body.command-home * {
|
||||||
backdrop-filter: none !important;
|
backdrop-filter: none !important;
|
||||||
-webkit-backdrop-filter: none !important;
|
-webkit-backdrop-filter: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .ai-featured-routes__card,
|
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 {
|
|
||||||
backdrop-filter: blur(14px) saturate(160%) !important;
|
backdrop-filter: blur(14px) saturate(160%) !important;
|
||||||
-webkit-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;
|
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-intent-ribbon__hint,
|
||||||
body.command-home .ai-featured-routes__nav-btn {
|
body.command-home .ai-featured-routes__nav-btn {
|
||||||
backdrop-filter: blur(12px) saturate(150%) !important;
|
background: color-mix(in srgb, #fff 88%, transparent) !important;
|
||||||
-webkit-backdrop-filter: blur(12px) saturate(150%) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .ai-welcome-plane img {
|
body.command-home .ai-welcome-plane img {
|
||||||
filter: none;
|
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 {
|
body.command-home .ai-history-sidebar {
|
||||||
background: color-mix(in srgb, var(--ai-paper) 72%, transparent);
|
background: color-mix(in srgb, var(--ai-paper) 72%, transparent);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user