优化细节
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="statistic-page">
|
||||
<!-- 筛选栏 -->
|
||||
<!-- 绛涢€夋爮 -->
|
||||
<view class="filter-card">
|
||||
<view class="filter-item">
|
||||
<text class="filter-label">用户渠道:</text>
|
||||
<text class="filter-label">鐢ㄦ埛娓犻亾锛?/text>
|
||||
<view class="select-box">
|
||||
<text class="select-text">全部</text>
|
||||
<text class="select-arrow">▼</text>
|
||||
<text class="select-text">鍏ㄩ儴</text>
|
||||
<text class="select-arrow">鈻?/text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="filter-item">
|
||||
<text class="filter-label">选择时间:</text>
|
||||
<text class="filter-label">閫夋嫨鏃堕棿锛?/text>
|
||||
<view class="date-picker-box">
|
||||
<text class="date-icon">📅</text>
|
||||
<text class="date-icon">馃搮</text>
|
||||
<text class="date-text">2026/01/04 - 2026/02/02</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="filter-btns">
|
||||
<button class="btn primary" @click="onSearch">查询</button>
|
||||
<button class="btn" @click="onExport">导出</button>
|
||||
<button class="btn primary" @click="onSearch">鏌ヨ</button>
|
||||
<button class="btn" @click="onExport">瀵煎嚭</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户概况卡片区 (使用 6-2-1 响应式网格) -->
|
||||
<!-- 鐢ㄦ埛姒傚喌鍗$墖鍖?(浣跨敤 6-2-1 鍝嶅簲寮忕綉鏍? -->
|
||||
<view class="section-card">
|
||||
<view class="section-header">
|
||||
<text class="section-title">用户概况</text>
|
||||
<text class="info-icon">❓</text>
|
||||
<text class="section-title">鐢ㄦ埛姒傚喌</text>
|
||||
<text class="info-icon">鉂?/text>
|
||||
</view>
|
||||
|
||||
<view class="kpi-grid-6">
|
||||
@@ -40,22 +40,22 @@
|
||||
<text class="kpi-label">{{ item.title }}</text>
|
||||
<text class="kpi-value">{{ item.value }}</text>
|
||||
<view class="kpi-meta">
|
||||
<text class="meta-label">环比增长:</text>
|
||||
<text class="meta-label">鐜瘮澧為暱锛?/text>
|
||||
<text class="meta-value" :class="item.trend">
|
||||
{{ item.percent }}
|
||||
<text class="trend-icon">{{ item.trend === 'up' ? '▲' : '▼' }}</text>
|
||||
<text class="trend-icon">{{ item.trend === 'up' ? '鈻? : '鈻? }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 图表区 -->
|
||||
<!-- 鍥捐〃鍖?-->
|
||||
<view class="chart-container">
|
||||
<view class="chart-header">
|
||||
<view class="header-left"></view>
|
||||
<view class="header-right">
|
||||
<text class="download-icon">📥</text>
|
||||
<text class="download-icon">馃摜</text>
|
||||
</view>
|
||||
</view>
|
||||
<AnalyticsMultiLineChart
|
||||
@@ -66,7 +66,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 地域分布与性别比例 -->
|
||||
<!-- 鍦板煙鍒嗗竷涓庢€у埆姣斾緥 -->
|
||||
<view class="analysis-row">
|
||||
<view class="map-col">
|
||||
<AnalyticsUserMapTable />
|
||||
@@ -85,39 +85,39 @@ import AnalyticsUserMapTable from '@/components/analytics/AnalyticsUserMapTable.
|
||||
import AnalyticsUserGenderSection from '@/components/analytics/AnalyticsUserGenderSection.uvue'
|
||||
|
||||
const kpiData = [
|
||||
{ title: '累计用户', value: '80887', percent: '0.79%', trend: 'up', icon: '👥', bg: '#efebff' },
|
||||
{ title: '访客数', value: '1076', percent: '11.65%', trend: 'down', icon: '👤', bg: '#e8f4ff' },
|
||||
{ title: '浏览量', value: '8843', percent: '12.09%', trend: 'down', icon: '📁', bg: '#e6fff1' },
|
||||
{ title: '新增用户数', value: '635', percent: '14.65%', trend: 'down', icon: '👤', bg: '#fff7e6' },
|
||||
{ title: '成交用户数', value: '122', percent: '0.81%', trend: 'down', icon: '👥', bg: '#f2f0ff' },
|
||||
{ title: '付费会员数', value: '76', percent: '13.63%', trend: 'down', icon: '💎', bg: '#f2f0ff' }
|
||||
{ title: '绱鐢ㄦ埛', value: '80887', percent: '0.79%', trend: 'up', icon: '馃懃', bg: '#efebff' },
|
||||
{ title: '璁垮鏁?, value: '1076', percent: '11.65%', trend: 'down', icon: '馃懁', bg: '#e8f4ff' },
|
||||
{ title: '娴忚閲?, value: '8843', percent: '12.09%', trend: 'down', icon: '馃搧', bg: '#e6fff1' },
|
||||
{ title: '鏂板鐢ㄦ埛鏁?, value: '635', percent: '14.65%', trend: 'down', icon: '馃懁', bg: '#fff7e6' },
|
||||
{ title: '鎴愪氦鐢ㄦ埛鏁?, value: '122', percent: '0.81%', trend: 'down', icon: '馃懃', bg: '#f2f0ff' },
|
||||
{ title: '浠樿垂浼氬憳鏁?, value: '76', percent: '13.63%', trend: 'down', icon: '馃拵', bg: '#f2f0ff' }
|
||||
]
|
||||
|
||||
const chartData = {
|
||||
x: ['01-04', '01-05', '01-06', '01-07', '01-08', '01-09', '01-10', '01-11', '01-12', '01-13', '01-14', '01-15', '01-16', '01-17', '01-18', '01-19', '01-20', '01-21', '01-22', '01-23', '01-24', '01-25', '01-26', '01-27', '01-28', '01-29', '01-30', '01-31', '02-01', '02-02'],
|
||||
series: [
|
||||
{ name: '新增用户数', color: '#1890ff', data: [40, 30, 25, 30, 22, 10, 20, 32, 28, 15, 8, 12, 18, 22, 15, 12, 25, 30, 28, 25, 35, 20, 18, 22, 20, 15, 10, 8, 15, 38] },
|
||||
{ name: '访客数', color: '#52c41a', data: [70, 75, 65, 55, 65, 50, 45, 35, 50, 68, 72, 65, 50, 48, 55, 65, 75, 62, 58, 85, 70, 55, 48, 58, 65, 72, 68, 60, 45, 50] },
|
||||
{ name: '浏览量', color: '#fa8c16', data: [520, 500, 420, 280, 580, 180, 220, 100, 180, 450, 500, 400, 320, 340, 150, 280, 450, 320, 440, 460, 320, 260, 320, 280, 380, 400, 320, 330, 250, 300] },
|
||||
{ name: '成交用户数', color: '#722ed1', data: [15, 12, 10, 8, 18, 5, 8, 4, 6, 12, 15, 10, 8, 9, 4, 10, 12, 8, 10, 12, 8, 6, 10, 8, 12, 14, 10, 8, 5, 8] },
|
||||
{ name: '新增付费用户数', color: '#f5222d', data: [5, 4, 3, 2, 6, 1, 2, 1, 2, 4, 5, 3, 2, 3, 1, 3, 4, 2, 3, 4, 2, 2, 3, 2, 4, 5, 3, 2, 1, 3] }
|
||||
{ name: '鏂板鐢ㄦ埛鏁?, color: '#1890ff', data: [40, 30, 25, 30, 22, 10, 20, 32, 28, 15, 8, 12, 18, 22, 15, 12, 25, 30, 28, 25, 35, 20, 18, 22, 20, 15, 10, 8, 15, 38] },
|
||||
{ name: '璁垮鏁?, color: '#52c41a', data: [70, 75, 65, 55, 65, 50, 45, 35, 50, 68, 72, 65, 50, 48, 55, 65, 75, 62, 58, 85, 70, 55, 48, 58, 65, 72, 68, 60, 45, 50] },
|
||||
{ name: '娴忚閲?, color: '#fa8c16', data: [520, 500, 420, 280, 580, 180, 220, 100, 180, 450, 500, 400, 320, 340, 150, 280, 450, 320, 440, 460, 320, 260, 320, 280, 380, 400, 320, 330, 250, 300] },
|
||||
{ name: '鎴愪氦鐢ㄦ埛鏁?, color: '#722ed1', data: [15, 12, 10, 8, 18, 5, 8, 4, 6, 12, 15, 10, 8, 9, 4, 10, 12, 8, 10, 12, 8, 6, 10, 8, 12, 14, 10, 8, 5, 8] },
|
||||
{ name: '鏂板浠樿垂鐢ㄦ埛鏁?, color: '#f5222d', data: [5, 4, 3, 2, 6, 1, 2, 1, 2, 4, 5, 3, 2, 3, 1, 3, 4, 2, 3, 4, 2, 2, 3, 2, 4, 5, 3, 2, 1, 3] }
|
||||
]
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '搜索中...' })
|
||||
uni.showToast({ title: '鎼滅储涓?..' })
|
||||
}
|
||||
|
||||
function onExport() {
|
||||
uni.showToast({ title: '导出中...' })
|
||||
uni.showToast({ title: '瀵煎嚭涓?..' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.statistic-page {
|
||||
padding: 16px;
|
||||
background-color: #f0f2f5;
|
||||
min-height: 100vh;
|
||||
/* padding removed */
|
||||
|
||||
|
||||
}
|
||||
|
||||
.filter-card {
|
||||
@@ -226,7 +226,7 @@ function onExport() {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* kpi-row 已废弃,采用全局 kpi-grid-6 */
|
||||
/* kpi-row 宸插簾寮冿紝閲囩敤鍏ㄥ眬 kpi-grid-6 */
|
||||
.kpi-card {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -329,3 +329,4 @@ function onExport() {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user