feat: establish teaching feedback mini program
Connect student profiles, defaults, and feedback records to the Rust API. Configure the WeChat AppID, custom tab bar, and local development workflow for version 0.1.0.
This commit is contained in:
22
custom-tab-bar/index.ts
Normal file
22
custom-tab-bar/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
const tabItems = [
|
||||
{ pagePath: '/pages/feedback/index', text: '反馈生成', glyph: '✦' },
|
||||
{ pagePath: '/pages/students/index', text: '学生档案', glyph: '◎' },
|
||||
{ pagePath: '/pages/records/index', text: '反馈记录', glyph: '◴' },
|
||||
{ pagePath: '/pages/profile/index', text: '我的', glyph: '◉' }
|
||||
]
|
||||
|
||||
Component({
|
||||
data: {
|
||||
selected: 0,
|
||||
tabItems
|
||||
},
|
||||
methods: {
|
||||
switchTab(event: WechatMiniprogram.TouchEvent) {
|
||||
const { index, path } = event.currentTarget.dataset as { index: number; path: string }
|
||||
if (!path) return
|
||||
if (index === this.data.selected) return
|
||||
this.setData({ selected: index })
|
||||
wx.switchTab({ url: path })
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user