- backend: NestJS service with exercise/plan data - miniprogram: WeChat mini program client - exclude node_modules, dist, runtime data-store, local env
21 lines
629 B
JavaScript
21 lines
629 B
JavaScript
Component({
|
|
properties: {
|
|
active: { type: String, value: 'home' } // 'home' | 'category' | 'plan'
|
|
},
|
|
data: {
|
|
items: [
|
|
{ key: 'home', label: '首页', emoji: '🏠', page: '/pages/index/index' },
|
|
{ key: 'category', label: '分类', emoji: '📚', page: '/pages/category/category' },
|
|
{ key: 'plan', label: '计划', emoji: '📋', page: '/pages/collection/collection' }
|
|
]
|
|
},
|
|
methods: {
|
|
onTap(e) {
|
|
const page = e.currentTarget.dataset.page;
|
|
if (!page) return;
|
|
// 使用 reLaunch 重置页面栈,避免页面层级堆叠
|
|
wx.reLaunch({ url: page });
|
|
}
|
|
}
|
|
});
|