feat:数字首页

This commit is contained in:
R524809
2025-11-25 17:52:18 +08:00
parent ec773a650c
commit 61e7781bf8
56 changed files with 827 additions and 3403 deletions
+98
View File
@@ -0,0 +1,98 @@
Page({
data: {
functionList: [
{
id: 'number-find-color',
page: 'numberColor',
title: '看数字,涂一涂',
desc: '给一个数字,找一找下面相同的数字,涂上颜色',
icon: '🔍',
},
{
id: 'number-coloring',
title: '数字涂色卡',
desc: '一边写数字、一边学数数,数字和卡通图片一一对应',
icon: '🎨',
},
{
id: 'counting-matching',
title: '数一数,连一连',
desc: '通过连线配对数字和对应的数量图形',
icon: '🔗',
},
{
id: 'missing-number',
title: '填上缺少的数字',
desc: '在数字序列中找出并填写缺失的数字',
icon: '❓',
},
{
id: 'compare',
title: '数一数,比大小',
desc: '通过数数比较两组物品的数量大小',
icon: '⚖️',
},
{
id: 'counting-select',
title: '数一数,选一选',
desc: '数出物品数量,从多个选项中选择正确答案',
icon: '✓',
},
{
id: 'counting-fill',
title: '数一数,填一填',
desc: '数出物品数量,填写对应的数字',
icon: '✏️',
},
{
id: 'addition-5',
title: '5以内加法',
desc: '练习5以内的加法运算,图形化展示',
icon: '',
},
{
id: 'addition-10',
title: '10以内加法',
desc: '练习10以内的加法运算,图形化展示',
icon: '',
},
{
id: 'addition-subtraction-10',
title: '10以内加减法',
desc: '练习10以内的加法和减法混合运算',
icon: '±',
},
],
},
onLoad() {
// 页面加载
},
/**
* 打开数学功能页面
*/
openMathFunction(e: WechatMiniprogram.TouchEvent) {
const functionId = e.currentTarget.dataset.function;
const functionItem = this.data.functionList.find(
(item) => item.id === functionId,
);
if (!functionItem) {
return;
}
// 如果有page字段,跳转到对应页面
if (functionItem.page) {
wx.navigateTo({
url: `/mathPages/${functionItem.page}/${functionItem.page}?id=${functionId}`,
});
} else {
wx.showToast({
title: `即将打开:${functionItem.title}`,
icon: 'none',
duration: 2000,
});
}
},
});