- miniprogram/config.js: BASE_URL 指向 http://192.227.237.8:3001 - 动作标题中文化(nameZh),搜索匹配 name/nameZh/nameEn - 新增计划/收藏/我的 等页面与组件 - 后端 Docker 化(Dockerfile/.dockerignore)与翻译脚本 - .gitignore 补充 .DS_Store
22 lines
713 B
JavaScript
22 lines
713 B
JavaScript
Component({
|
|
properties: {
|
|
active: { type: String, value: 'home' } // 'home' | 'category' | 'mine'
|
|
},
|
|
data: {
|
|
items: [
|
|
{ key: 'home', label: '首页', emoji: '🏠', page: '/pages/index/index' },
|
|
{ key: 'category', label: '分类', emoji: '📚', page: '/pages/category/category' },
|
|
{ key: 'plans', label: '计划', emoji: '📋', page: '/pages/my-plans/my-plans' },
|
|
{ key: 'mine', label: '我的', emoji: '👤', page: '/pages/profile/profile' }
|
|
]
|
|
},
|
|
methods: {
|
|
onTap(e) {
|
|
const page = e.currentTarget.dataset.page;
|
|
if (!page) return;
|
|
// 使用 reLaunch 重置页面栈,避免页面层级堆叠
|
|
wx.reLaunch({ url: page });
|
|
}
|
|
}
|
|
});
|