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:
2026-07-15 15:36:51 +08:00
commit 0a07538dce
37 changed files with 2550 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
{
"component": true
}

22
custom-tab-bar/index.ts Normal file
View 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 })
}
}
})

14
custom-tab-bar/index.wxml Normal file
View File

@@ -0,0 +1,14 @@
<view class="tabbar" role="tablist">
<view
wx:for="{{tabItems}}"
wx:key="pagePath"
class="tab-item {{selected === index ? 'tab-item-active' : ''}}"
data-index="{{index}}"
data-path="{{item.pagePath}}"
bindtap="switchTab"
role="tab"
>
<text class="tab-glyph">{{item.glyph}}</text>
<text class="tab-label">{{item.text}}</text>
</view>
</view>

38
custom-tab-bar/index.wxss Normal file
View File

@@ -0,0 +1,38 @@
.tabbar {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 100;
display: flex;
min-height: 112rpx;
padding-bottom: env(safe-area-inset-bottom);
border-top: 1rpx solid #edf1f6;
background: #ffffff;
}
.tab-item {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6rpx;
min-height: 112rpx;
color: #8995a5;
}
.tab-item-active {
color: #2b67e8;
}
.tab-glyph {
font-size: 42rpx;
font-weight: 500;
line-height: 1;
}
.tab-label {
font-size: 24rpx;
line-height: 1.2;
}