feat: init fitness-coach (backend + miniprogram)
- backend: NestJS service with exercise/plan data - miniprogram: WeChat mini program client - exclude node_modules, dist, runtime data-store, local env
This commit is contained in:
20
miniprogram/components/bottom-nav/index.js
Normal file
20
miniprogram/components/bottom-nav/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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 });
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user