feat: 完成分龄页开发

This commit is contained in:
R524809
2026-05-06 17:28:51 +08:00
parent 50394154f7
commit 9bdf850f20
54 changed files with 3499 additions and 1021 deletions
@@ -22,6 +22,7 @@ import {
} from '../shared/data/fontProfiles';
import { loadLetterFont } from '../shared/draw/drawTools';
import type { DebugPublishMeta } from '../../utils/debugPublish';
import { incrementWorksheetLikes } from '../../utils/worksheetStats';
/** 三字母精练分组:26 字母每 3 个一组 */
const TRIPLE_GROUPS: { title: string; letters: string[] }[] = [];
@@ -271,9 +272,12 @@ createPage(
this.drawCanvas();
},
onPreviewFavorite() {
async onPreviewFavorite() {
const next = !this.data.isPreviewFavorite;
this.setData({ isPreviewFavorite: next });
if (next) {
incrementWorksheetLikes(this.data.worksheetId);
}
wx.showToast({
title: next ? '收藏成功' : '已取消收藏',
icon: 'none',
@@ -354,6 +358,7 @@ createPage(
worksheetId,
functionId: worksheetId,
traceMode,
isPreviewFavorite: false,
selectedLetter,
selectedLetterPair: `${selectedLetter}${selectedLetter.toLowerCase()}`,
letterCaseLower,