fix: 使用微信原生底部导航

This commit is contained in:
que01 committed 2026-09-19 16:15:31 +08:00
1 parent 3da24ede37
commit c919d7a866
9 files changed
+9 -5

No files matched your search

+6 -1
View File
@@ -1,4 +1,9 @@
{
"pages": ["pages/index/index", "pages/services/index", "pages/booking/index", "pages/bookings/index"],
"window": { "navigationBarTitleText": "个人品牌", "navigationBarBackgroundColor": "#FBF7F1", "navigationBarTextStyle": "black", "backgroundColor": "#FBF7F1" }
"window": { "navigationBarTitleText": "个人品牌", "navigationBarBackgroundColor": "#FBF7F1", "navigationBarTextStyle": "black", "backgroundColor": "#FBF7F1" },
"tabBar": { "color": "#7A4A2B", "selectedColor": "#B54A2C", "backgroundColor": "#FFFFFF", "borderStyle": "white", "list": [
{ "pagePath": "pages/index/index", "text": "首页", "iconPath": "assets/tab/home.png", "selectedIconPath": "assets/tab/home-selected.png" },
{ "pagePath": "pages/services/index", "text": "服务", "iconPath": "assets/tab/briefcase.png", "selectedIconPath": "assets/tab/briefcase-selected.png" },
{ "pagePath": "pages/bookings/index", "text": "我的", "iconPath": "assets/tab/user.png", "selectedIconPath": "assets/tab/user-selected.png" }
] }
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

+3 -3
View File
@@ -15,9 +15,9 @@ Page({
}).catch(() => this.setData({ loading: false, error: '暂时无法加载内容' }));
},
selectService(event) { wx.navigateTo({ url: '/pages/booking/index?serviceId=' + encodeURIComponent(event.currentTarget.dataset.id) }); },
goServices() { wx.navigateTo({ url: '/pages/services/index' }); },
goServices() { wx.switchTab({ url: '/pages/services/index' }); },
goPrivateChef() { wx.navigateTo({ url: '/pages/booking/index?type=private_chef' }); },
goBooking() { wx.navigateTo({ url: '/pages/booking/index' }); },
goBookings() { wx.navigateTo({ url: '/pages/bookings/index' }); },
goHome() { wx.reLaunch({ url: '/pages/index/index' }); },
goBookings() { wx.switchTab({ url: '/pages/bookings/index' }); },
goHome() { wx.switchTab({ url: '/pages/index/index' }); },
});
-1
View File
@@ -10,5 +10,4 @@
<view class="section-title services-title">今日服务</view>
<view wx:for="{{services}}" wx:key="id" class="service" data-id="{{item.id}}" bindtap="selectService"><view><text class="service-name">{{item.name}}</text><text class="description">{{item.description}}</text></view><text class="price">{{item.priceText}}</text></view>
</block>
<view class="tabbar"><view class="tab active" bindtap="goHome">⌂<text>首页</text></view><view class="tab" bindtap="goServices">▦<text>服务</text></view><view class="tab" bindtap="goBooking">▤<text>预约</text></view><view class="tab" bindtap="goBookings">♙<text>我的</text></view></view>
</view>