数据库文档编写,开发规范文档,数据库接入
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="page" @click="closeMoreMenu">
|
||||
<view class="page" @click.self="closeMoreMenu">
|
||||
<!-- 固定顶部导航栏 -->
|
||||
<AnalyticsTopBar
|
||||
:title="'数据分析中心'"
|
||||
@@ -275,6 +275,8 @@
|
||||
|
||||
<script setup lang="uts">
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ensureAnalyticsLogin } from '@/services/analytics/authGuard.uts'
|
||||
|
||||
import AnalyticsComboChart from '@/components/analytics/AnalyticsComboChart.uvue'
|
||||
import AnalyticsSidebarMenu from '@/components/analytics/AnalyticsSidebarMenu.uvue'
|
||||
@@ -684,6 +686,12 @@ async function initDashboard() {
|
||||
|
||||
async function selectPeriod(p: string) {
|
||||
selectedPeriod.value = p
|
||||
|
||||
// 切换到快捷时间段时,退出自定义范围
|
||||
customRangeEnabled.value = false
|
||||
selectedStartDate.value = ''
|
||||
selectedEndDate.value = ''
|
||||
|
||||
loading.value = true
|
||||
try {
|
||||
await Promise.all([loadTrend(), loadUserSegments(), loadTrafficSources(), loadTopProducts(), loadTopMerchants()])
|
||||
@@ -852,7 +860,8 @@ function exportReport() {
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
initDashboard()
|
||||
if (!ensureAnalyticsLogin({ toastTitle: '请先登录后查看数据分析' })) return
|
||||
initDashboard()
|
||||
})
|
||||
|
||||
onUnload(() => {
|
||||
|
||||
Reference in New Issue
Block a user