feat: 3.5版本规划

This commit is contained in:
R524809
2026-09-24 17:14:38 +08:00
parent f82ac4d89d
commit 08d9a2792a
19 changed files with 769 additions and 45 deletions
+22
View File
@@ -4,6 +4,7 @@ import {
parseMiniProgramUrl,
stashPendingCategoryTabId,
} from '../../utils/index';
import tracker from '../../utils/tracker';
import {
HOME_DAILY_CHECKIN_ITEMS,
HOME_NOTICES,
@@ -124,6 +125,23 @@ function navigateByPath(path?: string, fallbackTitle?: string) {
});
}
function worksheetIdFromPath(path?: string): string {
if (!path) return '';
return String(parseMiniProgramUrl(path).query.id || '');
}
function trackWorksheetClick(
path: string | undefined,
title: string | undefined,
source: string,
) {
tracker.reportWorksheetClick('pages/home/home', {
worksheet_id: worksheetIdFromPath(path),
worksheet_title: title || '',
source,
});
}
// ── Skeleton data ──
function skeletonItem(id: string): HomeDisplayItemView {
@@ -196,6 +214,7 @@ Page({
},
onLoad() {
tracker.reportPageView('pages/home/home');
void this.initData();
},
@@ -274,12 +293,14 @@ Page({
onTapFeatured(e: WechatMiniprogram.TouchEvent) {
const path = e.currentTarget.dataset.path as string | undefined;
const title = e.currentTarget.dataset.title as string | undefined;
trackWorksheetClick(path, title, 'home_featured');
navigateByPath(path, title);
},
onTapHotRecommend(e: WechatMiniprogram.TouchEvent) {
const path = e.currentTarget.dataset.path as string | undefined;
const title = e.currentTarget.dataset.title as string | undefined;
trackWorksheetClick(path, title, 'home_hot');
navigateByPath(path, title);
},
@@ -310,6 +331,7 @@ Page({
const title =
detail.title ||
(e.currentTarget.dataset.title as string | undefined);
trackWorksheetClick(path, title, 'home_section');
navigateByPath(path, title);
},