front/src/views/site/SiteMessageCard.vue
zzh 336f8657ee
All checks were successful
Build and Deploy Front / deploy (push) Successful in 6m56s
feat: 官网海洋蓝波浪首页与指南分受众,并同步业务页优化
官网换 GradientWaves/TextType 并做性能减负;模块指南拆开发/运营;含营销指南、轨迹单与 H5 价格等改动。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 18:07:41 +08:00

329 lines
18 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="ai-card" :class="['ai-card--' + card.type, { 'ai-card--warn': card.type === 'hard-basic' }]">
<p v-if="view.kicker" class="ai-card__kicker">{{ view.kicker }}</p>
<p v-if="view.metric" class="ai-card__metric">{{ view.metric }}</p>
<p v-if="view.title" class="ai-card__title">{{ view.title }}</p>
<p v-if="view.body" class="ai-card__body">{{ view.body }}</p>
<div v-if="view.rows?.length" class="ai-card__rows">
<div v-for="row in view.rows" :key="row.label" class="ai-card__row">
<span>{{ row.label }}</span>
<strong>{{ row.value }}</strong>
</div>
</div>
<div v-if="view.items?.length" class="ai-card__list">
<div v-for="item in view.items" :key="item.title" class="ai-card__item">
<strong>{{ item.title }}</strong>
<span v-if="item.hint">{{ item.hint }}</span>
</div>
</div>
<div v-if="card.type === 'choice'" class="ai-card__actions">
<button
v-for="opt in card.options || []"
:key="opt.id"
type="button"
class="ai-card-opt"
:class="{ 'is-primary': opt.primary }"
@click="$emit('choice', { id: opt.id, label: opt.label, flowId: card.flowId || '' })"
>
{{ opt.label }}
</button>
</div>
<div v-else-if="view.actions?.length" class="ai-card__actions">
<template v-for="(action, index) in view.actions" :key="action.key">
<a v-if="action.href" class="ai-card-opt" :class="{ 'is-primary': index === 0 || action.primary }" :href="action.href">
{{ action.label }}
</a>
<button
v-else
type="button"
class="ai-card-opt"
:class="{ 'is-primary': index === 0 || action.primary }"
@click="onAction(action)"
>
{{ action.label }}
</button>
</template>
</div>
</div>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { officialLoginUrl, officialTrackLoginUrl } from './lib/site-urls';
import { SITE_CONTACT } from './lib/site-welcome';
type Card = Record<string, any>;
const props = defineProps<{
card: Card;
isZh: boolean;
}>();
const emit = defineEmits<{
intent: [id: string];
wechat: [];
choice: [payload: { id: string; label: string; flowId: string }];
}>();
const zh = computed(() => props.isZh);
const c = SITE_CONTACT;
const view = computed(() => {
const card = props.card;
const isZh = zh.value;
const quote = isZh ? '去注册询价 →' : 'Register to quote →';
const human = isZh ? '联系顾问 →' : 'Talk to advisor →';
const live = isZh ? '在线咨询' : 'Live chat';
const login = isZh ? '已有账号,去登录' : 'Already registered? Sign in';
const register = isZh ? '去注册登记' : 'Register to quote';
if (card.type === 'choice') {
return { kicker: card.kicker, title: card.title, body: '', rows: [], items: [], actions: [] };
}
if (card.type === 'quote') {
return {
kicker: isZh ? '询价' : 'Quote',
title: isZh ? '注册登记后即可询价' : 'Register to see rates',
body: card.dest
? isZh
? '发到' + card.dest + '可以走。官网不提供询价,完成注册后在客户系统里按线路看明码价。'
: 'We ship to ' + card.dest + '. Quotes are not on this site — register, then see list rates in the customer system.'
: isZh
? '官网不提供询价。完成注册登记后,即可在客户系统里按线路看明码价,一口价不砍。'
: 'This site does not quote. Register first, then see list rates by lane in the customer system — no haggling.',
actions: [
{ key: 'reg', href: officialLoginUrl(card.dest), label: register, primary: true },
{ key: 'login', href: officialLoginUrl(), label: login },
],
};
}
if (card.type === 'track') {
return {
kicker: isZh ? '真实轨迹' : 'Live tracking',
title: isZh ? '登录查真实轨迹' : 'Sign in to track',
body: card.number
? isZh
? `单号 ${card.number} 已记下。登录后看本票真实节点。`
: `Got ${card.number}. Sign in to see live scans for this shipment.`
: isZh
? '有单号请登录查看。询价需先注册登记。'
: 'Sign in if you have a number. Quotes require registration.',
actions: [
{ key: 'track', href: officialTrackLoginUrl(card.number), label: isZh ? '登录查真实轨迹' : 'Sign in to track', primary: true },
{ key: 'quote', href: officialLoginUrl(), label: quote },
{ key: 'human', intent: 'human', label: human },
],
};
}
if (card.type === 'hard-refund' || card.type === 'hard-exempt' || card.type === 'hard-basic') {
const meta = {
'hard-refund': {
kicker: isZh ? '9610 · 利润最优' : '9610 · best margin',
title: isZh ? '出口退税(免抵退)' : 'Export VAT refund',
body: isZh
? '有进项专票:汇总正式报关、完整 10 位 HS、报关单退税联 + 专票。进项税额按退税率退还。'
: 'You have special VAT invoices: formal consolidated declaration, full 10-digit HS, declaration refund copy + invoice. Input VAT is refunded at the rebate rate.',
},
'hard-exempt': {
kicker: isZh ? '9610 · 合规推荐' : '9610 · compliant',
title: isZh ? '无票免征' : 'Exemption without invoice',
body: isZh
? '无专票但要免税:简易/汇总均可,HS 前 4 位,综服平台登记。出口环节增值税/消费税免征。'
: 'No special invoice, but you want exemption: simplified or consolidated filing, first 4 HS digits, comprehensive-service platform. Export VAT/excise is exempted.',
},
'hard-basic': {
kicker: isZh ? '9610 · 快捷出货' : '9610 · fastest exit',
title: isZh ? '基础通关服务' : 'Basic clearance',
body: isZh
? '仅需出货:物流商统一简易申报。出得快,但税务未规范可能被视同内销(增值税 + 所得税 + 滞纳金)。量起来后建议升到免征或退税,IDE 可评估路径。'
: 'Ship-only: carrier files a simplified declaration. Fast, but unstructured tax handling can be treated as domestic sales. We can review an upgrade path when volume grows.',
},
}[card.type];
return { ...meta, actions: [{ key: 'human', intent: 'human', label: human, primary: true }] };
}
if (card.type === 'contact') {
return {
kicker: isZh ? '人工顾问' : 'Human advisor',
title: isZh ? '专人跟,不排队工单' : 'One advisor — not a ticket queue',
body: isZh ? '点「在线咨询」用微信对接顾问。询价请先注册登记。' : 'Tap Live chat to reach an advisor on WeChat. Register first if you need a quote.',
rows: [
{ label: isZh ? '电话' : 'Phone', value: c.phone },
{ label: isZh ? '微信客服' : 'WeCom', value: isZh ? '扫码 / 手机直达' : 'Scan or tap to chat' },
{ label: isZh ? '微信号' : 'WeChat ID', value: c.wechat },
{ label: isZh ? '邮箱' : 'Email', value: c.email },
{ label: isZh ? '地址' : 'Address', value: isZh ? c.addressZh : c.addressEn },
],
actions: [
{ key: 'kf', wechat: true, label: live, primary: true },
{ key: 'tel', href: 'tel:' + c.phone, label: c.phone },
{ key: 'mail', href: 'mailto:' + c.email, label: c.email },
],
};
}
if (card.type === 'company') {
return {
kicker: isZh ? '关于我们' : 'About IDE',
title: isZh ? '中小卖家的跨境物流顾问' : 'Cross-border logistics for SMB sellers',
body: isZh
? '深圳宝安运营,备案主体可核(' + c.icp + ')。主做美欧与东南亚小包。接小批量、带电、别人不接的 9610。一人从报价跟到售后。'
: 'Operated from Bao’an, Shenzhen (ICP ' + c.icp + '). US, EU and Southeast Asia parcels. We take low volume, battery, and 9610 others decline. One advisor from quote to after-sales.',
items: [
{
title: isZh ? '主线:美加墨 / 欧盟 / 澳新 / 东南亚' : 'Lanes: US-CA-MX / EU / AU-NZ / SEA',
hint: isZh ? '欧盟 27 国及英国,东南亚列马来、新、菲、泰、越、印尼。' : 'EU 27 and the UK, plus Malaysia, Singapore, Philippines, Thailand, Vietnam, Indonesia.',
},
{
title: isZh ? '难单先给出货路径' : 'Tough orders get a ship path first',
hint: isZh ? '别人不接的带电、无票、超长,先保证出得去,再谈退税或免征。' : 'Battery, no invoice, oversize — we get it out, then pick refund or exemption.',
},
{
title: isZh ? '微信 ' + c.wechat : 'WeChat ' + c.wechat,
hint: isZh ? '卖家常用这一个号找顾问,底栏也可复制。' : 'The number sellers use. Copy it from the bar below.',
},
],
actions: [
{ key: 'quote', href: officialLoginUrl(), label: quote, primary: true },
{ key: 'human', intent: 'human', label: human },
],
};
}
if (card.type === 'pricing') {
return {
kicker: isZh ? '价格' : 'Pricing',
metric: isZh ? '按线路明码报价,一口价不砍' : 'Lane list rates — no haggling',
body: isZh
? '中小卖家按计费重看价即可,不磨、不砍。税怎么走取决于有没有专票。询价请先注册登记。'
: 'SMB sellers see the list rate by chargeable weight — no haggling. Tax savings still depend on invoices. Register first to quote.',
items: [
{ title: isZh ? '计费重 = 实重和体积重取大' : 'Chargeable weight = max(actual, volumetric)', hint: isZh ? '体积重按渠道系数折算,超长另计。' : 'Volumetric uses the lane factor; oversize is extra.' },
{ title: isZh ? '明码一口价' : 'Published list rate', hint: isZh ? '注册登记后,在客户系统里按线路看价,不用讨价还价。' : 'After you register, see list rates by lane in the customer system. No bargaining.' },
{ title: isZh ? '有票退税,无票免征或基础通关' : 'Refund / exemption / basic clearance', hint: isZh ? '差在税,不在口头运费。带电、敏感货加收。' : 'The gap is tax, not a spoken freight. Battery and sensitive cargo surcharge.' },
],
actions: [
{ key: 'reg', href: officialLoginUrl(), label: register, primary: true },
{ key: 'login', href: officialLoginUrl(), label: login },
],
};
}
if (card.type === 'warehouse') {
return {
kicker: isZh ? '仓储' : 'Warehouse',
title: isZh ? '仓储一件代发' : 'Warehouse dropship',
body: isZh
? '入仓、拣货打包,订单来了就发出去。中小卖家不用自己养仓。开通请先注册登记,在客户系统里操作。'
: 'Inbound, pick and pack, ship when the order lands. Register first — warehouse dropship runs in the customer system.',
items: [
{ title: isZh ? '入仓管理' : 'Inbound', hint: isZh ? '收货上架,库存可查。' : 'Receive, put away, inventory you can see.' },
{ title: isZh ? '一件代发' : 'Dropship', hint: isZh ? '订单过来就拣货打包发出。' : 'Pick, pack, and ship as orders come in.' },
{ title: isZh ? '对接出库' : 'Outbound', hint: isZh ? '和专线、9610 出货打通。' : 'Tied to parcel lanes and 9610 exit.' },
],
actions: [
{ key: 'reg', href: officialLoginUrl(), label: register, primary: true },
{ key: 'login', href: officialLoginUrl(), label: login },
],
};
}
if (card.type === 'member-rules') {
return {
kicker: isZh ? '会员成长' : 'Member levels',
title: isZh ? '发货越多,基础运费越省' : 'Ship more — pay less on base freight',
body: isZh
? '近 12 个月实付基础运费积分定级(约 1 元 = 1 分)。折扣只打基础运费,附加费原价;与优惠券二选一,系统自动选更省的。'
: 'Rolling 12-month points from paid base freight (~¥1 = 1 pt). Discount hits base freight only; surcharges full price. Member rate vs coupon — system picks the cheaper one.',
rows: [
{ label: isZh ? 'V0 普通' : 'V0 Standard', value: isZh ? '原价' : 'List rate' },
{ label: isZh ? 'V1 铜卡 · 2.4万+' : 'V1 Copper · 24k+', value: isZh ? '99 折' : '1% off' },
{ label: isZh ? 'V2 银卡 · 6万+' : 'V2 Silver · 60k+', value: isZh ? '98 折' : '2% off' },
{ label: isZh ? 'V3 金卡 · 12万+' : 'V3 Gold · 120k+', value: isZh ? '97 折' : '3% off' },
{ label: isZh ? 'V4 钻石 · 24万+' : 'V4 Diamond · 240k+', value: isZh ? '96 折 · 可降级' : '4% off · can drop' },
{ label: isZh ? 'V5 皇冠 · 60万+' : 'V5 Crown · 600k+', value: isZh ? '95 折封顶 · 可降级' : '5% off max · can drop' },
],
items: [
{
title: isZh ? 'V0~V3 只升不降' : 'V0–V3 never auto-downgrade',
hint: isZh
? '后面发货少了也不会自动掉档。V4 / V5 积分不够时每天凌晨最多降一级。'
: 'Lower volume will not auto-drop you. V4/V5 may drop one level per night if points fall short.',
},
{
title: isZh ? '积分不能抵运费' : 'Points are not cash',
hint: isZh ? '只用来定级,不能兑礼、提现。券抵掉的金额不计积分。' : 'Levels only — no redeem or withdraw. Coupon-covered freight earns no points.',
},
],
actions: [
{ key: 'reg', href: officialLoginUrl(), label: register, primary: true },
{ key: 'login', href: officialLoginUrl(), label: login },
],
};
}
if (card.type === 'invite-rules') {
return {
kicker: isZh ? '邀新分成' : 'Invite & earn',
title: isZh ? '好友发货,你拿运费余额' : 'Friends ship — you earn freight credit',
body: isZh
? '默认铜卡及以上可邀。好友经你的链接注册并派送成功后计奖;只算一级下级。奖励入运费余额,可继续下单。'
: 'Copper+ can invite by default. Rewards after friends register via your link and deliver. Direct referrals only. Credit lands as freight balance.',
items: [
{
title: isZh ? '第 1 单:实付基础运费 5%,封顶 50 元' : '1st delivery: 5% of paid base freight, cap ¥50',
hint: isZh ? '该单实付基础运费须 ≥ 50 元才计奖。' : 'Paid base freight on that order must be ≥ ¥50.',
},
{
title: isZh ? '第 2~6 单:各 3%,封顶 30 元' : '2nd–6th: 3% each, cap ¥30',
hint: isZh ? '须在新客注册后 90 天内派送成功;第 7 单起不再分成。' : 'Must deliver within 90 days of signup; no share from the 7th order on.',
},
{
title: isZh ? '券奖励:你拿 20 元,对方拿 5 元' : 'Coupons: ¥20 for you, ¥5 for them',
hint: isZh
? '对方注册多一张 5 元券;其首单派送成功后你再得 20 元无门槛券。分成 T+3 工作日入账。'
: 'Invitee gets ¥5 at signup; you get ¥20 after their first delivery. Commission posts T+3 business days.',
},
],
actions: [
{ key: 'reg', href: officialLoginUrl(), label: register, primary: true },
{ key: 'human', intent: 'human', label: human },
],
};
}
if (card.type === 'newcomer-rules') {
return {
kicker: isZh ? '新人福利' : 'New-seller perks',
title: isZh ? '注册即发券,首单就能用' : 'Coupons on signup — usable on first ship',
body: isZh
? '券只抵基础运费,不找零;与会员折二选一。普通注册三张;走邀请链接再加一张 5 元。'
: 'Coupons cut base freight only, no change; mutually exclusive with member rate. Standard pack is three; invite link adds ¥5.',
items: [
{
title: isZh ? '新人首单券 · 15 元' : 'First-ship coupon · ¥15',
hint: isZh ? '无门槛,注册后立即可用,领取后 15 天有效。' : 'No minimum — ready after signup, valid 15 days from claim.',
},
{
title: isZh ? '新人备货券 · 20 元' : 'Stock-up coupon · ¥20',
hint: isZh ? '基础运费满 200 可用,领取后 60 天。' : 'Needs ¥200+ base freight; valid 60 days from claim.',
},
{
title: isZh ? '新人第二单券 · 15 元' : 'Second-ship coupon · ¥15',
hint: isZh
? '注册时未解锁;首单派送成功后解锁,满 150 可用,解锁后 30 天。'
: 'Locked at signup; unlocks after first delivery. Needs ¥150+ base freight; 30 days after unlock.',
},
{
title: isZh ? '邀请注册加赠 · 5 元' : 'Invite bonus · ¥5',
hint: isZh ? '仅通过好友邀请链接注册才有,无门槛,领取后 30 天。' : 'Only via an invite link — no minimum, 30 days from claim.',
},
],
actions: [
{ key: 'reg', href: officialLoginUrl(), label: register, primary: true },
{ key: 'login', href: officialLoginUrl(), label: login },
],
};
}
return { body: '', actions: [] };
});
function onAction(action: { intent?: string; wechat?: boolean }) {
if (action.wechat) emit('wechat');
else if (action.intent) emit('intent', action.intent);
}
</script>