feat(navBar): 新增自定义导航栏组件,接入详细报告与我的页面

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-08-20 08:42:21 +08:00
co-authored by Claude Opus 4.7
parent 48ac39f0e0
commit f13edf31b7
16 changed files with 714 additions and 8 deletions
+4 -2
View File
@@ -1,4 +1,6 @@
{
"usingComponents": {},
"navigationStyle": "custom"
"usingComponents": {
"navBar": "/components/navBar/navBar"
},
"navigationStyle": "custom"
}
+11 -1
View File
@@ -5,7 +5,8 @@ Page({
* 页面的初始数据
*/
data: {
// 导航栏背景色,根据滚动位置动态变化
navBgColor: 'rgba(255,255,255,0)',
},
/**
@@ -15,6 +16,15 @@ Page({
},
// 滚动时导航栏背景渐显
onScroll(e: WechatMiniprogram.ScrollViewScroll) {
const scrollTop = e.detail.scrollTop;
const opacity = Math.min(Math.max(scrollTop / 300, 0), 1);
this.setData({
navBgColor: `rgba(255,255,255,${opacity})`,
});
},
onTapPersonalInfo() {
wx.navigateTo({ url: '/pages/personalInformation/personalInformation' })
},
+2
View File
@@ -1,3 +1,5 @@
<navBar title="我的" fixed="{{true}}" bgColor="{{navBgColor}}" />
<view class="my">
<view class="header">
<view class="bg">