feat: 3.5版本规划
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { appSharePageMethods } from '../../base/pageMixin';
|
||||
import { CATEGORY_LIST_WITH_ALL } from '../../core/data/categories';
|
||||
import { takePendingCategoryTabId } from '../../utils/index';
|
||||
import { parseMiniProgramUrl, takePendingCategoryTabId } from '../../utils/index';
|
||||
import tracker from '../../utils/tracker';
|
||||
import { CATEGORY_DATA, type CategoryItem } from './category.data';
|
||||
|
||||
type CategoryTab = {
|
||||
@@ -224,6 +225,7 @@ Page({
|
||||
_defaultCategoryId: 'all',
|
||||
|
||||
onLoad(options: Record<string, string>) {
|
||||
tracker.reportPageView('pages/category/category');
|
||||
if (options.id && options.id !== 'all') {
|
||||
this._defaultCategoryId = options.id;
|
||||
this.setData({ activeCategoryId: options.id });
|
||||
@@ -285,6 +287,9 @@ Page({
|
||||
displayItems: filtered,
|
||||
scrollIntoViewId: '',
|
||||
});
|
||||
tracker.report('category_select', 'pages/category/category', {
|
||||
category_id: id,
|
||||
});
|
||||
},
|
||||
|
||||
onSearchInput(e: WechatMiniprogram.Input) {
|
||||
@@ -319,6 +324,13 @@ Page({
|
||||
return;
|
||||
}
|
||||
|
||||
tracker.reportWorksheetClick('pages/category/category', {
|
||||
worksheet_id: String(parseMiniProgramUrl(path).query.id || ''),
|
||||
worksheet_title: title || '',
|
||||
category_id: this.data.activeCategoryId,
|
||||
source: 'category_list',
|
||||
});
|
||||
|
||||
if (TAB_BAR_PATHS.has(path)) {
|
||||
wx.switchTab({ url: path });
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user