From 2d0b6552003e14df86aa46f20a14a16eaf96d8c3 Mon Sep 17 00:00:00 2001 From: wikiboss Date: Mon, 21 Sep 2026 15:34:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(mpuniapp):=20=E8=90=BD=E5=9C=B0=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E9=94=80=E5=94=AE=E7=A7=BB=E5=8A=A8=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0=E4=B8=8E5=E6=A0=8FTabBar=E7=BA=AF=E6=AD=A3=E6=9E=B6?= =?UTF-8?q?=E6=9E=84(=E5=B7=A5=E4=BD=9C=E5=8F=B0=E3=80=81=E5=90=8D?= =?UTF-8?q?=E7=89=87=E3=80=81=E9=9B=B7=E8=BE=BE=E3=80=81=E6=BD=9C=E5=AE=A2?= =?UTF-8?q?=E3=80=81=E6=88=91=E7=9A=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mpuniapp/App.uvue | 4 +- mpuniapp/common/api.uts | 13 + mpuniapp/common/types.uts | 31 + mpuniapp/pages/owner/profile/index.uvue | 928 +++++++++++++----- mpuniapp/pages/owner/workplace/index.uvue | 811 +++++++++++++++ .../pages/owner/workplace/useWorkplace.uts | 314 ++++++ mpuniapp/static/tab-workplace-active.png | Bin 0 -> 987 bytes mpuniapp/static/tab-workplace.png | Bin 0 -> 1031 bytes mpuniapp/tests/tabbar-ia.test.ts | 32 +- mpuniapp/tests/workplace.test.ts | 79 ++ 10 files changed, 1971 insertions(+), 241 deletions(-) create mode 100644 mpuniapp/pages/owner/workplace/index.uvue create mode 100644 mpuniapp/pages/owner/workplace/useWorkplace.uts create mode 100644 mpuniapp/static/tab-workplace-active.png create mode 100644 mpuniapp/static/tab-workplace.png create mode 100644 mpuniapp/tests/workplace.test.ts diff --git a/mpuniapp/App.uvue b/mpuniapp/App.uvue index c66a5ed..8505ad7 100644 --- a/mpuniapp/App.uvue +++ b/mpuniapp/App.uvue @@ -21,7 +21,7 @@ function routeOwnerHome() : void { if (getAuthToken() != '') { uni.switchTab({ - url: '/pages/owner/card/index' + url: '/pages/owner/workplace/index' }) return } @@ -39,7 +39,7 @@ const hash = window.location.hash if (!hash || hash === '#' || hash === '#/' || hash === '') { if (getAuthToken() != '') { - window.location.hash = '#/pages/owner/card/index' + window.location.hash = '#/pages/owner/workplace/index' } else { window.location.hash = '#/pages/common/login' } diff --git a/mpuniapp/common/api.uts b/mpuniapp/common/api.uts index 7ad7139..7e294e0 100644 --- a/mpuniapp/common/api.uts +++ b/mpuniapp/common/api.uts @@ -26,9 +26,22 @@ import { TeamRankItem, SubmitLeadParams, RecordRadarTrackParams, + WorkplaceOverviewResult, } from './types.uts'; import { httpGet, httpPost } from './request.uts'; +/** + * 获取商务概览工作台数据 (包含今日KPI与雷达高光Feed) + * 对齐后端 POST /admin/crm/radar/workplace + */ +export function fetchWorkplaceOverview(feedLimit?: number): Promise { + const query: Record = {}; + if (feedLimit != null) { + query.feedLimit = feedLimit; + } + return httpPost('/admin/crm/radar/workplace', query); +} + /** * 获取微官网与名片公开聚合详情 (包含 Hero、Bento 块、多语言与品牌 VI) * 对齐后端 GET /open/card/portal/detail?id= | ?slug= | ?slugOrId= diff --git a/mpuniapp/common/types.uts b/mpuniapp/common/types.uts index 87a6e3f..940d32e 100644 --- a/mpuniapp/common/types.uts +++ b/mpuniapp/common/types.uts @@ -342,3 +342,34 @@ export interface CardArticle { createTime?: Date | string; updateTime?: Date | string; } + +export interface WorkplaceKpi { + tapCount: number; + viewCount: number; + newLeadCount: number; + conversionRate: number; + tapDelta: number; + viewDelta: number; + newLeadDelta: number; +} + +export interface WorkplaceRadarItem { + id: number | string; + cardId: number | string; + cardTitle?: string; + visitorId?: string; + country: string; + city: string; + touchType: TouchType; + stayDurationMs: number; + viewedBlocks: string[]; + intentScore?: number; + isLocal?: boolean; + createTime: Date | string; +} + +export interface WorkplaceOverviewResult { + kpis: WorkplaceKpi; + radarFeed: WorkplaceRadarItem[]; +} + diff --git a/mpuniapp/pages/owner/profile/index.uvue b/mpuniapp/pages/owner/profile/index.uvue index ab6d221..a250feb 100644 --- a/mpuniapp/pages/owner/profile/index.uvue +++ b/mpuniapp/pages/owner/profile/index.uvue @@ -5,39 +5,45 @@ - + - {{ t('title') }} - {{ t('subtitle') }} + + {{ t('title') }} + {{ t('subtitle') }} + - + - - - - + - - - × + + + + + + + + + + × + + {{ state.account.name }} @@ -49,6 +55,7 @@ {{ state.account.department }} + {{ t('editProfile') }} ↗ @@ -81,15 +88,55 @@ - + + + + + {{ t('metricsCards') }} + › + + + {{ metricsData.cards }} + CARDS + + + + + + {{ t('metricsVisitors') }} + › + + + {{ metricsData.visitors }} + VIEWS + + + + + + {{ t('metricsLeads') }} + › + + + {{ metricsData.leads }} + LEADS + + + + + {{ t('cardStudioSection') }} + - - CARD + + + + + › @@ -97,10 +144,14 @@ {{ myCardsSubText }} + - - EDIT + + + + + › @@ -108,10 +159,14 @@ {{ cardEditSubText }} + - - CASE + + + + + › @@ -119,10 +174,15 @@ {{ productCasesSubText }} + - - POST + + + + + + › @@ -130,10 +190,16 @@ {{ articleDynamicsSubText }} + - - QR + + + + + + + › @@ -141,10 +207,14 @@ {{ sharePosterSubText }} + - - HALL + + + + + › @@ -153,45 +223,63 @@ - + {{ t('workspaceSection') }} + - - NFC + + + + + › {{ t('nfcScan') }} + - - MODE + + + + + + › {{ t('nfcMode') }} + - - SEC + + + + + › {{ t('nfcSecurity') }} + - - TEAM + + + + + + › @@ -199,12 +287,15 @@ - + {{ t('notificationsSection') }} + + + {{ t('radarPushTitle') }} {{ t('radarPushDesc') }} @@ -212,7 +303,7 @@ @@ -221,6 +312,9 @@ + + + {{ t('leadNoticeTitle') }} {{ t('leadNoticeDesc') }} @@ -228,30 +322,35 @@ - + {{ t('languageSection') }} + + + {{ t('languageLabel') }} - {{ currentLanguageLabel }} + + {{ currentLanguageLabel }} + › - +