1758 行
44 KiB
Plaintext
1758 行
44 KiB
Plaintext
<template>
|
||
<view class="profile-page" :class="pageRtlClass">
|
||
<!-- 顶部受控局部极光弥散微光晕 (Ambient Aurora Spot < 8%) -->
|
||
<view class="profile-aurora-glow"></view>
|
||
|
||
<scroll-view class="profile-scroll" :scroll-y="true">
|
||
<view class="profile-content">
|
||
<!-- 1. 页面级标题与副标题 -->
|
||
<view class="profile-header">
|
||
<text class="profile-title">{{ t('title') }}</text>
|
||
<text class="profile-subtitle">{{ t('subtitle') }}</text>
|
||
</view>
|
||
|
||
<!-- 2. Hero 商业资产罗盘与高管身份 Bento 卡片 -->
|
||
<view class="bento-card hero-identity-card">
|
||
<!-- 2.1 身份信息栏 -->
|
||
<view class="hero-identity-top" @click="onEditProfileClick">
|
||
<view class="avatar-ring-container" @click.stop="onAvatarClick">
|
||
<image
|
||
v-if="state.account.avatar !== ''"
|
||
class="avatar-img"
|
||
:src="state.account.avatar"
|
||
mode="aspectFill"
|
||
/>
|
||
<view v-else class="avatar-empty">
|
||
<text class="avatar-add-icon">+</text>
|
||
</view>
|
||
<!-- 精致微相机编辑圆标 (替代生硬大红叉) -->
|
||
<view class="avatar-camera-badge">
|
||
<view class="camera-dot"></view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="identity-info">
|
||
<view class="identity-name-row">
|
||
<text class="identity-name">{{ state.account.name }}</text>
|
||
<view class="tier-pill">
|
||
<text class="tier-pill-text">{{ t('tierBadge') }}</text>
|
||
</view>
|
||
</view>
|
||
<text class="identity-company">{{ state.account.company }}</text>
|
||
<text class="identity-dept">{{ state.account.department }}</text>
|
||
</view>
|
||
|
||
<view class="identity-edit-btn" @click.stop="onEditProfileClick">
|
||
<text class="identity-edit-text">{{ t('editProfile') }} ↗</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 2.2 商业资产罗盘看板 (3 栏微卡片) -->
|
||
<view class="metrics-bento-row">
|
||
<!-- 指标 1: 活跃名片 -->
|
||
<view class="metrics-pod" @click="openPage('/pages/owner/card/index')">
|
||
<view class="metrics-top-meta">
|
||
<text class="metrics-label">{{ t('metricsCards') }}</text>
|
||
<text class="metrics-link-arrow">↗</text>
|
||
</view>
|
||
<view class="metrics-value-row">
|
||
<text class="metrics-number">{{ state.metrics.cardsCount }}</text>
|
||
<text class="metrics-unit">{{ isZhLocale ? '张' : 'Cards' }}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 指标 2: 雷达访客 -->
|
||
<view class="metrics-pod" @click="openPage('/pages/owner/radar')">
|
||
<view class="metrics-top-meta">
|
||
<text class="metrics-label">{{ t('metricsVisitors') }}</text>
|
||
<text class="metrics-link-arrow">↗</text>
|
||
</view>
|
||
<view class="metrics-value-row">
|
||
<text class="metrics-number highlight-blue">{{ state.metrics.visitorsCount }}</text>
|
||
<text class="metrics-unit">{{ isZhLocale ? '位' : 'Visits' }}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 指标 3: 沉淀潜客 -->
|
||
<view class="metrics-pod" @click="openPage('/pages/owner/leads')">
|
||
<view class="metrics-top-meta">
|
||
<text class="metrics-label">{{ t('metricsLeads') }}</text>
|
||
<text class="metrics-link-arrow">↗</text>
|
||
</view>
|
||
<view class="metrics-value-row">
|
||
<text class="metrics-number highlight-emerald">{{ state.metrics.leadsCount }}</text>
|
||
<text class="metrics-unit">{{ isZhLocale ? '条' : 'Leads' }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 2.3 名片配额进度条 -->
|
||
<view class="bento-inner-divider"></view>
|
||
<view class="quota-bento-section" @click="onQuotaClick">
|
||
<view class="quota-meta-row">
|
||
<view class="quota-label-group">
|
||
<text class="quota-section-title">{{ t('quotaCards') }}</text>
|
||
<view class="quota-status-dot"></view>
|
||
<text class="quota-status-text">{{ t('planActive') }}</text>
|
||
</view>
|
||
<text class="quota-numbers">{{ quotaLine }} ↗</text>
|
||
</view>
|
||
|
||
<view class="quota-track">
|
||
<view
|
||
class="quota-fill"
|
||
:class="{ 'quota-fill-danger': quotaExceeded }"
|
||
:style="{ width: quotaPercent + '%' }"
|
||
></view>
|
||
</view>
|
||
|
||
<view v-if="quotaExceeded" class="quota-alert-row">
|
||
<text class="quota-alert-text">{{ t('quotaUpgrade') }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 3. 数字名片与微官网工作室 (标准高端条状入口) -->
|
||
<view class="section-header">
|
||
<text class="section-title">{{ t('cardStudioSection') }}</text>
|
||
<text class="section-badge">STUDIO</text>
|
||
</view>
|
||
<view class="bento-card bento-list-group">
|
||
<!-- 3.1 我的数字名片 (TabBar 页面) -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/card/index')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-cards">
|
||
<view class="vector-card-icon">
|
||
<view class="vec-card-body"></view>
|
||
<view class="vec-card-line"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('myCards') }}</text>
|
||
<text class="row-desc">{{ t('myCardsSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-blue">
|
||
<text class="status-pill-text">{{ isZhLocale ? '展示中' : 'Active' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 3.2 极速资料维护 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/card/edit')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-edit">
|
||
<view class="vector-edit-icon">
|
||
<view class="vec-pen-tip"></view>
|
||
<view class="vec-pen-bar"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('cardEdit') }}</text>
|
||
<text class="row-desc">{{ t('cardEditSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 3.3 产品相册与标杆案例 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/card/cases')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-cases">
|
||
<view class="vector-cases-icon">
|
||
<view class="vec-case-frame"></view>
|
||
<view class="vec-case-dot"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('productCases') }}</text>
|
||
<text class="row-desc">{{ t('productCasesSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-purple">
|
||
<text class="status-pill-text">{{ isZhLocale ? '作品集' : 'Showcase' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 3.4 文章与商务动态 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/card/articles')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-articles">
|
||
<view class="vector-article-icon">
|
||
<view class="vec-art-line l1"></view>
|
||
<view class="vec-art-line l2"></view>
|
||
<view class="vec-art-line l3"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('articleDynamics') }}</text>
|
||
<text class="row-desc">{{ t('articleDynamicsSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-indigo">
|
||
<text class="status-pill-text">{{ isZhLocale ? '动态' : 'Posts' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 3.5 展会分享海报 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/card/qrcode')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-poster">
|
||
<view class="vector-qr-icon">
|
||
<view class="vec-qr-sq top-left"></view>
|
||
<view class="vec-qr-sq top-right"></view>
|
||
<view class="vec-qr-sq bottom-left"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('sharePoster') }}</text>
|
||
<text class="row-desc">{{ t('sharePosterSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-amber">
|
||
<text class="status-pill-text">{{ isZhLocale ? '高清展台' : 'Booth' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 3.6 名片互换大厅 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/hall/index')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-hall">
|
||
<view class="vector-hall-icon">
|
||
<view class="vec-swap-top"></view>
|
||
<view class="vec-swap-bottom"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('exchangeHall') }}</text>
|
||
<text class="row-desc">{{ t('exchangeHallSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-emerald">
|
||
<text class="status-pill-text">{{ isZhLocale ? '碰一碰' : 'Radar' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 4. 智能硬件与团队协同 (标准高端条状入口) -->
|
||
<view class="section-header">
|
||
<text class="section-title">{{ t('workspaceSection') }}</text>
|
||
<text class="section-badge">FLEET</text>
|
||
</view>
|
||
<view class="bento-card bento-list-group">
|
||
<!-- 4.1 NFC 贴卡激活 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/nfc/scan')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-nfc">
|
||
<view class="vector-nfc-icon">
|
||
<view class="vec-nfc-card"></view>
|
||
<view class="vec-nfc-wave"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('nfcScan') }}</text>
|
||
<text class="row-desc">{{ t('nfcScanSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-blue">
|
||
<text class="status-pill-text">{{ isZhLocale ? '待贴卡' : 'Ready' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 4.2 NFC 场景切换 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/nfc/mode')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-mode">
|
||
<view class="vector-mode-icon">
|
||
<view class="vec-mode-sq sq1"></view>
|
||
<view class="vec-mode-sq sq2"></view>
|
||
<view class="vec-mode-sq sq3"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('nfcMode') }}</text>
|
||
<text class="row-desc">{{ t('nfcModeSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-slate">
|
||
<text class="status-pill-text">{{ isZhLocale ? '展会模式' : 'Expo' }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 4.3 NFC 安全与挂失 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/nfc/security')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-security">
|
||
<view class="vector-sec-icon">
|
||
<view class="vec-sec-shield"></view>
|
||
<view class="vec-sec-core"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('nfcSecurity') }}</text>
|
||
<text class="row-desc">{{ t('nfcSecuritySub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-success">
|
||
<text class="status-pill-text">{{ t('securitySafe') }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 4.4 展会团队战报 -->
|
||
<view class="bento-row-item" @click="openPage('/pages/owner/team/overview')">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-team">
|
||
<view class="vector-team-icon">
|
||
<view class="vec-team-bar bar1"></view>
|
||
<view class="vec-team-bar bar2"></view>
|
||
<view class="vec-team-bar bar3"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('teamBriefing') }}</text>
|
||
<text class="row-desc">{{ t('teamBriefingSub') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="status-pill pill-emerald">
|
||
<text class="status-pill-text">{{ t('livePulse') }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 5. 系统偏好与全球化设置 (标准条状入口与开关) -->
|
||
<view class="section-header">
|
||
<text class="section-title">{{ t('languageSection') }}</text>
|
||
<text class="section-badge">SYSTEM</text>
|
||
</view>
|
||
<view class="bento-card bento-list-group">
|
||
<!-- 5.1 访客雷达实时推送 -->
|
||
<view class="bento-row-item no-hover">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-radar-notice">
|
||
<view class="vector-pulse-icon"></view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('radarPushTitle') }}</text>
|
||
<text class="row-desc">{{ t('radarPushDesc') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<switch
|
||
:checked="state.notifications.radarPush"
|
||
color="#0088FF"
|
||
@change="onRadarPushChange"
|
||
/>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 5.2 新潜客留资提醒 -->
|
||
<view class="bento-row-item no-hover">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-lead-notice">
|
||
<view class="vector-bell-icon"></view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('leadNoticeTitle') }}</text>
|
||
<text class="row-desc">{{ t('leadNoticeDesc') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<switch
|
||
:checked="state.notifications.leadNotice"
|
||
color="#0088FF"
|
||
@change="onLeadNoticeChange"
|
||
/>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 5.3 界面语言选择抽屉 -->
|
||
<view class="bento-row-item" @click="onOpenLanguageSheet">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-globe">
|
||
<view class="vector-globe-icon"></view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('languageLabel') }}</text>
|
||
<text class="row-desc">{{ currentLanguageLabel }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<view class="lang-pill">
|
||
<text class="lang-pill-text">{{ currentLanguageLabel }}</text>
|
||
</view>
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row-divider"></view>
|
||
|
||
<!-- 5.4 关于 OmniCard 旗舰版 -->
|
||
<view class="bento-row-item" @click="onAboutAppClick">
|
||
<view class="row-left">
|
||
<view class="row-icon-pod pod-info">
|
||
<view class="vector-info-icon">
|
||
<view class="vec-info-dot"></view>
|
||
<view class="vec-info-bar"></view>
|
||
</view>
|
||
</view>
|
||
<view class="row-text-group">
|
||
<text class="row-title">{{ t('aboutApp') }}</text>
|
||
<text class="row-desc">{{ t('appVersion') }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="row-right">
|
||
<text class="row-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 6. 极简幽灵退出登录卡片 -->
|
||
<view class="signout-section">
|
||
<view class="signout-btn" @click="onLogout">
|
||
<text class="signout-text">{{ t('logout') }}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 7. 错误提示条 -->
|
||
<view v-if="state.errorMessage !== ''" class="error-notice">
|
||
<text class="error-notice-text">{{ state.errorMessage }}</text>
|
||
</view>
|
||
|
||
<!-- 8. 视口与 TabBar 底部安全区避让垫高 -->
|
||
<view class="bottom-safe-space"></view>
|
||
</view>
|
||
</scroll-view>
|
||
|
||
<!-- 9. 全球化语言选择抽屉 (Bottom Sheet) -->
|
||
<view v-if="showLanguageSheet" class="drawer-mask" @click="onCloseLanguageSheet">
|
||
<view class="drawer-sheet" @click.stop="">
|
||
<view class="drawer-handle"></view>
|
||
<view class="drawer-header">
|
||
<text class="drawer-title">{{ t('languageLabel') }}</text>
|
||
<view class="drawer-close-btn" @click="onCloseLanguageSheet">
|
||
<text class="drawer-close-icon">×</text>
|
||
</view>
|
||
</view>
|
||
<view class="drawer-divider"></view>
|
||
|
||
<view class="drawer-options-list">
|
||
<view
|
||
v-for="opt in languageOptions"
|
||
:key="opt.code"
|
||
class="drawer-option-row"
|
||
:class="{ 'drawer-option-active': state.locale === opt.code }"
|
||
@click="onSelectLanguage(opt.code)"
|
||
>
|
||
<view class="option-label-group">
|
||
<text class="option-name" :class="{ 'option-name-active': state.locale === opt.code }">
|
||
{{ opt.label }}
|
||
</text>
|
||
<text class="option-native">{{ opt.native }}</text>
|
||
</view>
|
||
<view v-if="state.locale === opt.code" class="option-check-circle">
|
||
<view class="check-vector-mark"></view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup lang="uts">
|
||
import { reactive, ref, computed } from 'vue';
|
||
import { onShow } from '@dcloudio/uni-app';
|
||
import { OmniLocale, isRtl } from '../../../common/locale.uts';
|
||
import { clearAuthToken, getTenantId } from '../../../common/request.uts';
|
||
import { fetchCardQuota } from '../../../common/api.uts';
|
||
import {
|
||
ProfileState,
|
||
loadProfileSettings,
|
||
saveProfileSettings,
|
||
toggleRadarPush,
|
||
toggleLeadNotice,
|
||
setPreferredLocale,
|
||
calculateQuotaPercent,
|
||
resolveProfileText,
|
||
previewAccountAvatar,
|
||
removeAccountAvatar,
|
||
} from './useProfile.uts';
|
||
|
||
// 页面响应式状态
|
||
const state = reactive<ProfileState>(loadProfileSettings());
|
||
const showLanguageSheet = ref<boolean>(false);
|
||
|
||
// 卡片配额数据
|
||
const quotaLine = ref<string>('--');
|
||
const quotaExceeded = ref<boolean>(false);
|
||
const quotaPercent = ref<number>(20);
|
||
|
||
const isZhLocale = computed((): boolean => {
|
||
return state.locale === 'zh-CN';
|
||
});
|
||
|
||
const pageRtlClass = computed((): string => {
|
||
return isRtl(state.locale) ? 'page-rtl' : '';
|
||
});
|
||
|
||
function t(key: string): string {
|
||
return resolveProfileText(key);
|
||
}
|
||
|
||
type LangOpt = {
|
||
code: OmniLocale;
|
||
label: string;
|
||
native: string;
|
||
};
|
||
|
||
const languageOptions: LangOpt[] = [
|
||
{ code: 'zh-CN', label: '中文 (简体)', native: '中文' },
|
||
{ code: 'en-US', label: 'English (US)', native: 'English' },
|
||
{ code: 'ar-SA', label: 'العربية (Arabic)', native: 'العربية' },
|
||
{ code: 'es-ES', label: 'Español', native: 'Español' },
|
||
{ code: 'de-DE', label: 'Deutsch', native: 'Deutsch' },
|
||
{ code: 'fr-FR', label: 'Français', native: 'Français' },
|
||
{ code: 'ja-JP', label: '日本語', native: '日本語' },
|
||
];
|
||
|
||
const currentLanguageLabel = computed((): string => {
|
||
const target = languageOptions.find((o: LangOpt): boolean => o.code === state.locale);
|
||
return target != null ? target.label : '中文 (简体)';
|
||
});
|
||
|
||
/**
|
||
* 全端智能路由跳转 (区分 5 栏 TabBar 页面与二级页面,防止死链)
|
||
*/
|
||
function openPage(url: string): void {
|
||
const tabPages = [
|
||
'/pages/owner/workplace/index',
|
||
'/pages/owner/card/index',
|
||
'/pages/owner/radar',
|
||
'/pages/owner/leads',
|
||
'/pages/owner/profile/index',
|
||
];
|
||
|
||
if (tabPages.some((t: string): boolean => url.startsWith(t))) {
|
||
uni.switchTab({
|
||
url: url,
|
||
fail: (_err: unknown) => {
|
||
uni.navigateTo({ url: url });
|
||
},
|
||
});
|
||
return;
|
||
}
|
||
|
||
uni.navigateTo({
|
||
url: url,
|
||
fail: (_err: unknown) => {
|
||
uni.showToast({
|
||
title: t('loading'),
|
||
icon: 'none',
|
||
});
|
||
},
|
||
});
|
||
}
|
||
|
||
function onEditProfileClick(): void {
|
||
openPage('/pages/owner/card/edit');
|
||
}
|
||
|
||
/**
|
||
* 头像点击交互:弹出优雅的操作面板 (更换头像 / 查看大图 / 移除头像)
|
||
*/
|
||
function onAvatarClick(): void {
|
||
const itemList = state.account.avatar !== ''
|
||
? [t('avatarActionChoose'), t('avatarActionPreview'), t('avatarActionRemove')]
|
||
: [t('avatarActionChoose')];
|
||
|
||
uni.showActionSheet({
|
||
itemList: itemList,
|
||
success: (res: { tapIndex?: number }) => {
|
||
const idx = res.tapIndex != null ? res.tapIndex : -1;
|
||
if (idx === 0) {
|
||
onAvatarChoose();
|
||
} else if (idx === 1 && state.account.avatar !== '') {
|
||
previewAccountAvatar(state);
|
||
} else if (idx === 2 && state.account.avatar !== '') {
|
||
removeAccountAvatar(state);
|
||
saveProfileSettings(state);
|
||
uni.showToast({
|
||
title: t('saved'),
|
||
icon: 'none',
|
||
});
|
||
}
|
||
},
|
||
});
|
||
}
|
||
|
||
function onAvatarChoose(): void {
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: ['album', 'camera'],
|
||
success: (res: { tempFilePaths?: string[] }) => {
|
||
if (res.tempFilePaths != null && res.tempFilePaths.length > 0) {
|
||
state.account.avatar = res.tempFilePaths[0];
|
||
saveProfileSettings(state);
|
||
uni.showToast({
|
||
title: t('saved'),
|
||
icon: 'none',
|
||
});
|
||
}
|
||
},
|
||
});
|
||
}
|
||
|
||
async function loadQuota(): Promise<void> {
|
||
try {
|
||
const tenantId = getTenantId();
|
||
const quota = await fetchCardQuota(tenantId !== '' ? tenantId : 1);
|
||
quotaLine.value = `${quota.used} / ${quota.limit}`;
|
||
quotaExceeded.value = quota.exceeded === true;
|
||
quotaPercent.value = calculateQuotaPercent(quota.used, quota.limit);
|
||
state.metrics.cardsCount = quota.used;
|
||
} catch (_e) {
|
||
quotaLine.value = '1 / 5';
|
||
quotaExceeded.value = false;
|
||
quotaPercent.value = calculateQuotaPercent(1, 5);
|
||
state.metrics.cardsCount = 1;
|
||
}
|
||
}
|
||
|
||
function onQuotaClick(): void {
|
||
uni.showModal({
|
||
title: t('upgradeQuota'),
|
||
content: `${t('quotaUpgrade')} (${t('planActive')}: ${quotaLine.value})`,
|
||
showCancel: false,
|
||
confirmText: t('tierPro'),
|
||
});
|
||
}
|
||
|
||
function onAboutAppClick(): void {
|
||
uni.showModal({
|
||
title: t('aboutApp'),
|
||
content: `${t('appVersion')}\n全球智能数字名片 & 移动微官网 SaaS`,
|
||
showCancel: false,
|
||
confirmText: 'OK',
|
||
});
|
||
}
|
||
|
||
function onRadarPushChange(e: UniSwitchChangeEvent): void {
|
||
toggleRadarPush(state, e.detail.value);
|
||
}
|
||
|
||
function onLeadNoticeChange(e: UniSwitchChangeEvent): void {
|
||
toggleLeadNotice(state, e.detail.value);
|
||
}
|
||
|
||
function onOpenLanguageSheet(): void {
|
||
showLanguageSheet.value = true;
|
||
}
|
||
|
||
function onCloseLanguageSheet(): void {
|
||
showLanguageSheet.value = false;
|
||
}
|
||
|
||
function onSelectLanguage(code: OmniLocale): void {
|
||
setPreferredLocale(state, code);
|
||
saveProfileSettings(state);
|
||
onCloseLanguageSheet();
|
||
uni.showToast({
|
||
title: t('saved'),
|
||
icon: 'none',
|
||
});
|
||
}
|
||
|
||
function onLogout(): void {
|
||
uni.showModal({
|
||
title: resolveProfileText('confirmLogoutTitle'),
|
||
content: resolveProfileText('confirmLogoutContent'),
|
||
success: (res: { confirm?: boolean }) => {
|
||
if (res.confirm === true) {
|
||
clearAuthToken();
|
||
uni.showToast({
|
||
title: resolveProfileText('logout'),
|
||
icon: 'none',
|
||
});
|
||
// #ifdef H5
|
||
if (typeof window !== 'undefined') {
|
||
window.location.hash = '#/pages/common/login';
|
||
return;
|
||
}
|
||
// #endif
|
||
uni.reLaunch({
|
||
url: '/pages/common/login',
|
||
});
|
||
}
|
||
},
|
||
});
|
||
}
|
||
|
||
onShow(() => {
|
||
const loaded = loadProfileSettings();
|
||
state.account = loaded.account;
|
||
state.notifications = loaded.notifications;
|
||
state.locale = loaded.locale;
|
||
state.metrics = loaded.metrics;
|
||
loadQuota();
|
||
});
|
||
</script>
|
||
|
||
<style scoped>
|
||
/* Compatible Swiss design tokens */
|
||
.profile-page {
|
||
position: relative;
|
||
min-height: 100vh;
|
||
background-color: #F5F8FC;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* 顶部受控极光微光晕 (Ambient Aurora Mesh < 8%) */
|
||
.profile-aurora-glow {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 220px;
|
||
background: radial-gradient(circle at 50% -20%, rgba(0, 136, 255, 0.12) 0%, rgba(99, 102, 241, 0.06) 60%, rgba(245, 248, 252, 0) 100%);
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
}
|
||
|
||
.profile-scroll {
|
||
width: 100%;
|
||
height: 100vh;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
z-index: 1;
|
||
}
|
||
|
||
.profile-content {
|
||
padding: 16px 16px 32px 16px;
|
||
box-sizing: border-box;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
/* 1. Page Header */
|
||
.profile-header {
|
||
padding: 12px 4px 16px 4px;
|
||
}
|
||
|
||
.profile-title {
|
||
font-size: 26px;
|
||
font-weight: 700;
|
||
color: #101828;
|
||
letter-spacing: -0.5px;
|
||
line-height: 1.25;
|
||
}
|
||
|
||
.profile-subtitle {
|
||
font-size: 13px;
|
||
color: #64748B;
|
||
margin-top: 4px;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
/* Bento Card Base: 纯白微悬浮、大圆角、漫反射软阴影 */
|
||
.bento-card {
|
||
background-color: #FFFFFF;
|
||
border-radius: 20px;
|
||
border: 1px solid #EBF1F7;
|
||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(11, 99, 229, 0.03);
|
||
box-sizing: border-box;
|
||
margin-bottom: 18px;
|
||
}
|
||
|
||
/* 2. Hero 身份与商业资产罗盘 */
|
||
.hero-identity-card {
|
||
padding: 18px;
|
||
}
|
||
|
||
.hero-identity-top {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.avatar-ring-container {
|
||
position: relative;
|
||
width: 60px;
|
||
height: 60px;
|
||
margin-right: 14px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.avatar-img {
|
||
width: 60px;
|
||
height: 60px;
|
||
border-radius: 30px;
|
||
background-color: #EBF1F7;
|
||
box-shadow: 0 2px 8px rgba(0, 136, 255, 0.15);
|
||
}
|
||
|
||
.avatar-empty {
|
||
width: 60px;
|
||
height: 60px;
|
||
border-radius: 30px;
|
||
background-color: #EBF5FF;
|
||
border: 1px dashed #0088FF;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.avatar-add-icon {
|
||
font-size: 24px;
|
||
color: #0088FF;
|
||
line-height: 1;
|
||
}
|
||
|
||
.avatar-camera-badge {
|
||
position: absolute;
|
||
bottom: 0;
|
||
right: 0;
|
||
width: 20px;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
background-color: #0088FF;
|
||
border: 2px solid #FFFFFF;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
|
||
}
|
||
|
||
.camera-dot {
|
||
width: 6px;
|
||
height: 6px;
|
||
border-radius: 3px;
|
||
background-color: #FFFFFF;
|
||
}
|
||
|
||
.identity-info {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.identity-name-row {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.identity-name {
|
||
font-size: 18px;
|
||
font-weight: 700;
|
||
color: #101828;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.tier-pill {
|
||
padding: 2px 8px;
|
||
background: linear-gradient(135deg, #00A3FF 0%, #0B63E5 100%);
|
||
border-radius: 9999px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.tier-pill-text {
|
||
font-size: 10px;
|
||
font-weight: 800;
|
||
color: #FFFFFF;
|
||
letter-spacing: 0.5px;
|
||
}
|
||
|
||
.identity-company {
|
||
font-size: 13px;
|
||
color: #475569;
|
||
margin-top: 3px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.identity-dept {
|
||
font-size: 12px;
|
||
color: #94A3B8;
|
||
margin-top: 1px;
|
||
}
|
||
|
||
.identity-edit-btn {
|
||
padding: 6px 12px;
|
||
border-radius: 9999px;
|
||
background-color: #EBF5FF;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-height: 32px;
|
||
}
|
||
|
||
.identity-edit-text {
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: #0088FF;
|
||
}
|
||
|
||
/* 2.2 资产罗盘 3 栏指标 Pods */
|
||
.metrics-bento-row {
|
||
display: flex;
|
||
flex-direction: row;
|
||
gap: 10px;
|
||
margin-top: 16px;
|
||
padding-top: 14px;
|
||
border-top: 1px solid #F1F5F9;
|
||
}
|
||
|
||
.metrics-pod {
|
||
flex: 1;
|
||
background-color: #F8FAFC;
|
||
border: 1px solid #EBF1F7;
|
||
border-radius: 14px;
|
||
padding: 10px 12px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
cursor: pointer;
|
||
transition: background-color 150ms ease;
|
||
}
|
||
|
||
.metrics-pod:active {
|
||
background-color: #F1F5F9;
|
||
}
|
||
|
||
.metrics-top-meta {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.metrics-label {
|
||
font-size: 11px;
|
||
color: #64748B;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.metrics-link-arrow {
|
||
font-size: 11px;
|
||
color: #94A3B8;
|
||
}
|
||
|
||
.metrics-value-row {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: baseline;
|
||
gap: 4px;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.metrics-number {
|
||
font-size: 19px;
|
||
font-weight: 700;
|
||
color: #101828;
|
||
letter-spacing: -0.3px;
|
||
}
|
||
|
||
.highlight-blue {
|
||
color: #0088FF;
|
||
}
|
||
|
||
.highlight-emerald {
|
||
color: #10B981;
|
||
}
|
||
|
||
.metrics-unit {
|
||
font-size: 11px;
|
||
color: #94A3B8;
|
||
}
|
||
|
||
/* 2.3 名片配额条 */
|
||
.bento-inner-divider {
|
||
height: 1px;
|
||
background-color: #F1F5F9;
|
||
margin: 14px 0 12px 0;
|
||
}
|
||
|
||
.quota-bento-section {
|
||
display: flex;
|
||
flex-direction: column;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.quota-meta-row {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.quota-label-group {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
}
|
||
|
||
.quota-section-title {
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: #101828;
|
||
}
|
||
|
||
.quota-status-dot {
|
||
width: 6px;
|
||
height: 6px;
|
||
border-radius: 3px;
|
||
background-color: #12B76A;
|
||
margin: 0 6px 0 8px;
|
||
}
|
||
|
||
.quota-status-text {
|
||
font-size: 12px;
|
||
color: #12B76A;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.quota-numbers {
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: #0088FF;
|
||
}
|
||
|
||
.quota-track {
|
||
height: 7px;
|
||
border-radius: 4px;
|
||
background-color: #F1F5F9;
|
||
margin-top: 8px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.quota-fill {
|
||
height: 100%;
|
||
border-radius: 4px;
|
||
background: linear-gradient(90deg, #0088FF 0%, #0B63E5 100%);
|
||
}
|
||
|
||
.quota-fill-danger {
|
||
background: linear-gradient(90deg, #F97316 0%, #EF4444 100%);
|
||
}
|
||
|
||
.quota-alert-row {
|
||
margin-top: 6px;
|
||
}
|
||
|
||
.quota-alert-text {
|
||
font-size: 11px;
|
||
color: #EF4444;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* 3 & 4. 章节头部标题与微标 */
|
||
.section-header {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 4px 6px 8px 6px;
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
color: #475569;
|
||
letter-spacing: 0.2px;
|
||
}
|
||
|
||
.section-badge {
|
||
font-size: 10px;
|
||
font-weight: 700;
|
||
color: #94A3B8;
|
||
letter-spacing: 0.8px;
|
||
}
|
||
|
||
/* 5. 分组条状列表容器 (Grouped Inset Cell Rows) */
|
||
.bento-list-group {
|
||
padding: 4px 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.bento-row-item {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 12px 16px;
|
||
min-height: 58px;
|
||
cursor: pointer;
|
||
transition: background-color 150ms ease;
|
||
}
|
||
|
||
.bento-row-item:active {
|
||
background-color: #F8FAFC;
|
||
}
|
||
|
||
.no-hover:active {
|
||
background-color: #FFFFFF;
|
||
}
|
||
|
||
.row-left {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
flex: 1;
|
||
}
|
||
|
||
.row-right {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.row-divider {
|
||
height: 1px;
|
||
background-color: #F1F5F9;
|
||
margin-left: 64px;
|
||
margin-right: 16px;
|
||
}
|
||
|
||
.row-icon-pod {
|
||
width: 38px;
|
||
height: 38px;
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-right: 12px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.row-text-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.row-title {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: #101828;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.row-desc {
|
||
font-size: 12px;
|
||
color: #64748B;
|
||
margin-top: 2px;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.row-arrow {
|
||
font-size: 18px;
|
||
color: #CBD5E1;
|
||
font-weight: 400;
|
||
line-height: 1;
|
||
}
|
||
|
||
/* 状态微胶囊 (Status Pills) */
|
||
.status-pill {
|
||
padding: 3px 8px;
|
||
border-radius: 9999px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.status-pill-text {
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.pill-blue { background-color: #EBF5FF; }
|
||
.pill-blue .status-pill-text { color: #0088FF; }
|
||
|
||
.pill-purple { background-color: #F5F3FF; }
|
||
.pill-purple .status-pill-text { color: #8B5CF6; }
|
||
|
||
.pill-indigo { background-color: #EEF2FF; }
|
||
.pill-indigo .status-pill-text { color: #6366F1; }
|
||
|
||
.pill-amber { background-color: #FFFBEB; }
|
||
.pill-amber .status-pill-text { color: #F59E0B; }
|
||
|
||
.pill-emerald { background-color: #ECFDF5; }
|
||
.pill-emerald .status-pill-text { color: #10B981; }
|
||
|
||
.pill-slate { background-color: #F1F5F9; }
|
||
.pill-slate .status-pill-text { color: #475569; }
|
||
|
||
.pill-success { background-color: #F0FDF4; }
|
||
.pill-success .status-pill-text { color: #16A34A; }
|
||
|
||
/* 微图标背景 Pod 颜色 */
|
||
.pod-cards { background-color: #EBF5FF; }
|
||
.pod-edit { background-color: #F0F9FF; }
|
||
.pod-cases { background-color: #F5F3FF; }
|
||
.pod-articles { background-color: #EEF2FF; }
|
||
.pod-poster { background-color: #FFFBEB; }
|
||
.pod-hall { background-color: #ECFDF5; }
|
||
.pod-nfc { background-color: #E0F2FE; }
|
||
.pod-mode { background-color: #F1F5F9; }
|
||
.pod-security { background-color: #FEF2F2; }
|
||
.pod-team { background-color: #EDFBF6; }
|
||
.pod-radar-notice { background-color: #EBF5FF; }
|
||
.pod-lead-notice { background-color: #ECFDF5; }
|
||
.pod-globe { background-color: #F8FAFC; }
|
||
.pod-info { background-color: #F1F5F9; }
|
||
|
||
/* 精细 1.5px 几何矢量微图标 (零 Emoji) */
|
||
.vector-card-icon {
|
||
width: 18px;
|
||
height: 13px;
|
||
border: 1.5px solid #0088FF;
|
||
border-radius: 2px;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
}
|
||
.vec-card-body {
|
||
position: absolute;
|
||
top: 3px;
|
||
left: 2px;
|
||
width: 4px;
|
||
height: 4px;
|
||
border-radius: 2px;
|
||
background-color: #0088FF;
|
||
}
|
||
.vec-card-line {
|
||
position: absolute;
|
||
top: 4px;
|
||
left: 8px;
|
||
width: 6px;
|
||
height: 1.5px;
|
||
background-color: #0088FF;
|
||
}
|
||
|
||
.vector-edit-icon {
|
||
width: 14px;
|
||
height: 14px;
|
||
position: relative;
|
||
}
|
||
.vec-pen-tip {
|
||
position: absolute;
|
||
top: 1px;
|
||
right: 1px;
|
||
width: 4px;
|
||
height: 4px;
|
||
border: 1.5px solid #0284C7;
|
||
border-radius: 1px;
|
||
}
|
||
.vec-pen-bar {
|
||
position: absolute;
|
||
bottom: 1px;
|
||
left: 1px;
|
||
width: 10px;
|
||
height: 1.5px;
|
||
background-color: #0284C7;
|
||
transform: rotate(-45deg);
|
||
}
|
||
|
||
.vector-cases-icon {
|
||
width: 16px;
|
||
height: 13px;
|
||
border: 1.5px solid #8B5CF6;
|
||
border-radius: 2px;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
}
|
||
.vec-case-dot {
|
||
position: absolute;
|
||
top: 2px;
|
||
left: 3px;
|
||
width: 3px;
|
||
height: 3px;
|
||
border-radius: 1.5px;
|
||
background-color: #8B5CF6;
|
||
}
|
||
|
||
.vector-article-icon {
|
||
width: 15px;
|
||
height: 14px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: space-between;
|
||
}
|
||
.vec-art-line {
|
||
height: 1.5px;
|
||
background-color: #6366F1;
|
||
border-radius: 1px;
|
||
}
|
||
.l1 { width: 14px; }
|
||
.l2 { width: 10px; }
|
||
.l3 { width: 12px; }
|
||
|
||
.vector-qr-icon {
|
||
width: 14px;
|
||
height: 14px;
|
||
position: relative;
|
||
}
|
||
.vec-qr-sq {
|
||
position: absolute;
|
||
width: 5px;
|
||
height: 5px;
|
||
border: 1.5px solid #F59E0B;
|
||
border-radius: 1px;
|
||
box-sizing: border-box;
|
||
}
|
||
.top-left { top: 0; left: 0; }
|
||
.top-right { top: 0; right: 0; }
|
||
.bottom-left { bottom: 0; left: 0; }
|
||
|
||
.vector-hall-icon {
|
||
width: 16px;
|
||
height: 12px;
|
||
position: relative;
|
||
}
|
||
.vec-swap-top {
|
||
position: absolute;
|
||
top: 1px;
|
||
left: 0;
|
||
width: 12px;
|
||
height: 1.5px;
|
||
background-color: #10B981;
|
||
}
|
||
.vec-swap-bottom {
|
||
position: absolute;
|
||
bottom: 1px;
|
||
right: 0;
|
||
width: 12px;
|
||
height: 1.5px;
|
||
background-color: #059669;
|
||
}
|
||
|
||
.vector-nfc-icon {
|
||
width: 16px;
|
||
height: 13px;
|
||
position: relative;
|
||
}
|
||
.vec-nfc-card {
|
||
width: 13px;
|
||
height: 11px;
|
||
border: 1.5px solid #0284C7;
|
||
border-radius: 2px;
|
||
box-sizing: border-box;
|
||
}
|
||
.vec-nfc-wave {
|
||
position: absolute;
|
||
right: 0;
|
||
top: 2px;
|
||
width: 4px;
|
||
height: 7px;
|
||
border-right: 1.5px solid #38BDF8;
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.vector-mode-icon {
|
||
width: 14px;
|
||
height: 14px;
|
||
position: relative;
|
||
}
|
||
.vec-mode-sq {
|
||
position: absolute;
|
||
width: 6px;
|
||
height: 6px;
|
||
border: 1.5px solid #64748B;
|
||
border-radius: 1px;
|
||
box-sizing: border-box;
|
||
}
|
||
.sq1 { top: 0; left: 0; }
|
||
.sq2 { top: 0; right: 0; border-color: #0088FF; }
|
||
.sq3 { bottom: 0; left: 0; }
|
||
|
||
.vector-sec-icon {
|
||
width: 14px;
|
||
height: 15px;
|
||
position: relative;
|
||
}
|
||
.vec-sec-shield {
|
||
width: 14px;
|
||
height: 14px;
|
||
border: 1.5px solid #EF4444;
|
||
border-bottom-left-radius: 7px;
|
||
border-bottom-right-radius: 7px;
|
||
border-top-left-radius: 2px;
|
||
border-top-right-radius: 2px;
|
||
box-sizing: border-box;
|
||
}
|
||
.vec-sec-core {
|
||
position: absolute;
|
||
top: 4px;
|
||
left: 5px;
|
||
width: 4px;
|
||
height: 4px;
|
||
border-radius: 2px;
|
||
background-color: #EF4444;
|
||
}
|
||
|
||
.vector-team-icon {
|
||
width: 15px;
|
||
height: 14px;
|
||
display: flex;
|
||
align-items: flex-end;
|
||
justify-content: space-between;
|
||
}
|
||
.vec-team-bar {
|
||
width: 3px;
|
||
border-radius: 1px;
|
||
background-color: #10B981;
|
||
}
|
||
.bar1 { height: 6px; }
|
||
.bar2 { height: 12px; }
|
||
.bar3 { height: 9px; }
|
||
|
||
.vector-pulse-icon {
|
||
width: 10px;
|
||
height: 10px;
|
||
border: 1.5px solid #0088FF;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.vector-bell-icon {
|
||
width: 11px;
|
||
height: 11px;
|
||
border: 1.5px solid #10B981;
|
||
border-top-left-radius: 5px;
|
||
border-top-right-radius: 5px;
|
||
}
|
||
|
||
.vector-globe-icon {
|
||
width: 13px;
|
||
height: 13px;
|
||
border: 1.5px solid #64748B;
|
||
border-radius: 7px;
|
||
}
|
||
|
||
.vector-info-icon {
|
||
width: 14px;
|
||
height: 14px;
|
||
border: 1.5px solid #94A3B8;
|
||
border-radius: 7px;
|
||
position: relative;
|
||
}
|
||
.vec-info-dot {
|
||
position: absolute;
|
||
top: 2px;
|
||
left: 5px;
|
||
width: 2px;
|
||
height: 2px;
|
||
border-radius: 1px;
|
||
background-color: #94A3B8;
|
||
}
|
||
.vec-info-bar {
|
||
position: absolute;
|
||
top: 5px;
|
||
left: 5px;
|
||
width: 2px;
|
||
height: 4px;
|
||
background-color: #94A3B8;
|
||
}
|
||
|
||
/* 语言展示胶囊 */
|
||
.lang-pill {
|
||
padding: 4px 10px;
|
||
background-color: #F8FAFC;
|
||
border: 1px solid #E2E8F0;
|
||
border-radius: 9999px;
|
||
}
|
||
|
||
.lang-pill-text {
|
||
font-size: 12px;
|
||
color: #475569;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* 6. 极简幽灵退出按钮 */
|
||
.signout-section {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-top: 10px;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.signout-btn {
|
||
width: 100%;
|
||
min-height: 48px;
|
||
border-radius: 9999px;
|
||
background-color: #FFFFFF;
|
||
border: 1px solid #E2E8F0;
|
||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: background-color 150ms ease;
|
||
}
|
||
|
||
.signout-btn:active {
|
||
opacity: 0.8;
|
||
background-color: #F8FAFC;
|
||
}
|
||
|
||
.signout-text {
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
color: #64748B;
|
||
}
|
||
|
||
/* 7. 错误提示 */
|
||
.error-notice {
|
||
padding: 10px 14px;
|
||
background-color: #FEF2F2;
|
||
border: 1px solid #FEE2E2;
|
||
border-radius: 12px;
|
||
margin-bottom: 14px;
|
||
}
|
||
|
||
.error-notice-text {
|
||
font-size: 12px;
|
||
color: #EF4444;
|
||
}
|
||
|
||
/* 8. 视口与 TabBar 底部安全垫高 */
|
||
.bottom-safe-space {
|
||
height: calc(28px + var(--window-bottom, 0px) + env(safe-area-inset-bottom, 0px));
|
||
}
|
||
|
||
/* 9. 全球化语言抽屉 (Bottom Sheet) */
|
||
.drawer-mask {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background-color: rgba(15, 23, 42, 0.45);
|
||
z-index: 999;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.drawer-sheet {
|
||
background-color: #FFFFFF;
|
||
border-top-left-radius: 24px;
|
||
border-top-right-radius: 24px;
|
||
padding: 12px 18px calc(24px + env(safe-area-inset-bottom, 0px)) 18px;
|
||
max-height: 80vh;
|
||
box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
|
||
}
|
||
|
||
.drawer-handle {
|
||
width: 36px;
|
||
height: 4px;
|
||
border-radius: 2px;
|
||
background-color: #CBD5E1;
|
||
margin: 0 auto 12px auto;
|
||
}
|
||
|
||
.drawer-header {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding-bottom: 12px;
|
||
}
|
||
|
||
.drawer-title {
|
||
font-size: 17px;
|
||
font-weight: 700;
|
||
color: #101828;
|
||
}
|
||
|
||
.drawer-close-btn {
|
||
width: 32px;
|
||
height: 32px;
|
||
border-radius: 16px;
|
||
background-color: #F1F5F9;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.drawer-close-icon {
|
||
font-size: 18px;
|
||
color: #64748B;
|
||
line-height: 1;
|
||
}
|
||
|
||
.drawer-divider {
|
||
height: 1px;
|
||
background-color: #F1F5F9;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.drawer-options-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.drawer-option-row {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 14px 8px;
|
||
min-height: 52px;
|
||
border-bottom: 1px solid #F8FAFC;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.drawer-option-row:active {
|
||
background-color: #F8FAFC;
|
||
}
|
||
|
||
.drawer-option-active {
|
||
background-color: #F0F7FF;
|
||
border-radius: 12px;
|
||
padding: 14px 12px;
|
||
}
|
||
|
||
.option-label-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.option-name {
|
||
font-size: 15px;
|
||
font-weight: 500;
|
||
color: #101828;
|
||
}
|
||
|
||
.option-name-active {
|
||
color: #0088FF;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.option-native {
|
||
font-size: 12px;
|
||
color: #94A3B8;
|
||
margin-top: 2px;
|
||
}
|
||
|
||
.option-check-circle {
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 11px;
|
||
background-color: #0088FF;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.check-vector-mark {
|
||
width: 8px;
|
||
height: 4px;
|
||
border-left: 2px solid #FFFFFF;
|
||
border-bottom: 2px solid #FFFFFF;
|
||
transform: rotate(-45deg);
|
||
margin-bottom: 2px;
|
||
}
|
||
|
||
/* RTL 布局微调 */
|
||
.page-rtl .hero-identity-top {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .avatar-ring-container {
|
||
margin-right: 0;
|
||
margin-left: 14px;
|
||
}
|
||
|
||
.page-rtl .identity-name-row {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .metrics-bento-row {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .metrics-top-meta {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .metrics-value-row {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .bento-row-item {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .row-left {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .row-right {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.page-rtl .row-icon-pod {
|
||
margin-right: 0;
|
||
margin-left: 12px;
|
||
}
|
||
|
||
.page-rtl .row-divider {
|
||
margin-left: 16px;
|
||
margin-right: 64px;
|
||
}
|
||
</style>
|