- 模块一: 出海案例作品集、博客动态发布、人名发音语音条、RTL阿语多语言切换 - 模块二: AI顾问人设配置、行业术语库润色、RAG切片沙盒调试、流式会话与意向留资卡片 - 模块三: 全球访客雷达大屏、多维加权意向算分、外部CRM对接推送、团队公海池流转 - 模块四: 移动端NFC安全挂失、NFC动态路由规则配置、动态防伪验签、展会制卡Zip批量导出 - 模块五: 组织架构与名片分配、移动端个人中心设置、离职交接与历史线索迁移、安全审计日志 - 模块六: Stripe国际信用卡订阅Webhook、独立二级域名与SSL检测、坐席配额预警、多币种发票 - 模块七: 纸质名片OCR解析入库、国际商务日程RFC 5545 ICS日历、微官网离线SWR预加载、展会实时排行榜大屏 - 模块八: 全球出海SEO OpenGraph元标签注入与社交爬虫探测、30点端到端全链路业务流集成测试套件
208 行
4.9 KiB
Plaintext
208 行
4.9 KiB
Plaintext
<template>
|
|
<view class="scan-page" :style="pageTheme">
|
|
<view class="scan-content">
|
|
<view class="scan-card">
|
|
<text class="scan-title">{{ pageTitle }}</text>
|
|
<text class="scan-desc">{{ t('desc') }}</text>
|
|
|
|
<view v-if="statusLine !== ''" class="scan-status">
|
|
<text class="scan-status-text">{{ statusLine }}</text>
|
|
</view>
|
|
|
|
<view class="field">
|
|
<text class="field-label">{{ t('uidLabel') }}</text>
|
|
<input
|
|
class="field-input"
|
|
type="text"
|
|
v-model="state.uid"
|
|
:placeholder="t('uidPlaceholder')"
|
|
:disabled="state.submitting"
|
|
/>
|
|
</view>
|
|
|
|
<view class="field">
|
|
<text class="field-label">{{ t('cardIdLabel') }}</text>
|
|
<input
|
|
class="field-input"
|
|
type="number"
|
|
v-model="state.cardIdRaw"
|
|
:placeholder="t('cardIdPlaceholder')"
|
|
:disabled="state.submitting"
|
|
/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="scan-cta-bar">
|
|
<button
|
|
class="primary-cta-btn"
|
|
:class="{ 'primary-cta-btn-disabled': state.submitting }"
|
|
:disabled="state.submitting"
|
|
@click="handleActivate"
|
|
>
|
|
<text class="primary-cta-btn-text">{{ t('cta') }}</text>
|
|
</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="uts">
|
|
import { getCurrentLocale, getOmniText } from '../../../common/locale.uts';
|
|
import { utsLightColors, utsRadius, utsSpacing } from '../../../common/tokens.uts';
|
|
import {
|
|
applyScanOptions,
|
|
createScanState,
|
|
resolveScanText,
|
|
resolveStatusLine,
|
|
startScan,
|
|
submitScan,
|
|
ScanCopyKey,
|
|
ScanPageOptions,
|
|
} from './useScan.uts';
|
|
|
|
const pageTheme: Record<string, string> = {
|
|
'--oc-primary': utsLightColors.primary,
|
|
'--oc-primary-soft': utsLightColors.primarySoft,
|
|
'--oc-bg': utsLightColors.bg,
|
|
'--oc-surface': utsLightColors.surface,
|
|
'--oc-border': utsLightColors.border,
|
|
'--oc-text': utsLightColors.text,
|
|
'--oc-text-2': utsLightColors.text2,
|
|
'--oc-radius-btn': utsRadius.button,
|
|
'--oc-radius-card': utsRadius.card,
|
|
'--oc-space-8': utsSpacing.space8,
|
|
'--oc-space-12': utsSpacing.space12,
|
|
'--oc-space-16': utsSpacing.space16,
|
|
'--oc-space-24': utsSpacing.space24,
|
|
};
|
|
|
|
const state = reactive(createScanState());
|
|
const pageTitle = ref(getOmniText(getCurrentLocale(), 'card.scan_nfc'));
|
|
const statusLine = computed((): string => {
|
|
return resolveStatusLine(state);
|
|
});
|
|
|
|
function t(key: ScanCopyKey): string {
|
|
return resolveScanText(key);
|
|
}
|
|
|
|
function handleActivate(): void {
|
|
submitScan(state);
|
|
}
|
|
|
|
onLoad((options: ScanPageOptions) => {
|
|
applyScanOptions(state, options);
|
|
// #ifdef H5
|
|
state.manualInput = true;
|
|
// #endif
|
|
// #ifdef APP
|
|
startScan(state);
|
|
// #endif
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
.scan-page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
background-color: var(--oc-surface, #F7F8FA);
|
|
}
|
|
|
|
.scan-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding-inline: var(--oc-space-16, 16px);
|
|
padding-block: var(--oc-space-16, 16px);
|
|
}
|
|
|
|
.scan-card {
|
|
background-color: var(--oc-bg, #FFFFFF);
|
|
border: 1px solid var(--oc-border, #E3E7ED);
|
|
border-radius: var(--oc-radius-card, 16px);
|
|
padding: var(--oc-space-24, 24px) 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.scan-title {
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
color: var(--oc-text, #101828);
|
|
margin-bottom: var(--oc-space-8, 8px);
|
|
line-height: 1.25;
|
|
}
|
|
|
|
.scan-desc {
|
|
font-size: 14px;
|
|
color: var(--oc-text-2, #667085);
|
|
line-height: 1.6;
|
|
margin-bottom: var(--oc-space-24, 24px);
|
|
}
|
|
|
|
.scan-status {
|
|
margin-bottom: var(--oc-space-16, 16px);
|
|
}
|
|
|
|
.scan-status-text {
|
|
font-size: 14px;
|
|
color: var(--oc-text, #101828);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-bottom: var(--oc-space-16, 16px);
|
|
}
|
|
|
|
.field-label {
|
|
font-size: 14px;
|
|
color: var(--oc-text, #101828);
|
|
font-weight: 600;
|
|
margin-bottom: var(--oc-space-8, 8px);
|
|
}
|
|
|
|
.field-input {
|
|
height: 44px;
|
|
padding-inline: 12px;
|
|
background-color: var(--oc-surface, #F7F8FA);
|
|
border: 1px solid var(--oc-border, #E3E7ED);
|
|
border-radius: var(--oc-radius-btn, 12px);
|
|
font-size: 14px;
|
|
color: var(--oc-text, #101828);
|
|
}
|
|
|
|
.scan-cta-bar {
|
|
padding: 12px var(--oc-space-16, 16px) var(--oc-space-24, 24px) var(--oc-space-16, 16px);
|
|
background-color: var(--oc-bg, #FFFFFF);
|
|
border-top: 1px solid var(--oc-border, #E3E7ED);
|
|
}
|
|
|
|
.primary-cta-btn {
|
|
height: 48px;
|
|
min-height: 44px;
|
|
background-color: var(--oc-primary, #0B5CFF);
|
|
border-radius: var(--oc-radius-btn, 12px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.primary-cta-btn-disabled {
|
|
background-color: var(--oc-border, #E3E7ED);
|
|
}
|
|
|
|
.primary-cta-btn-text {
|
|
color: var(--oc-bg, #FFFFFF);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.primary-cta-btn-disabled .primary-cta-btn-text {
|
|
color: var(--oc-text-2, #667085);
|
|
}
|
|
</style>
|