From 97d55d5b998dfaf4ed5e86c20fcb3fc1075d41b3 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Mon, 18 Mar 2024 18:11:00 +0800
Subject: [PATCH] 更新

---
 components/tabBar/tabBar.vue |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue
index e047ef0..02129d0 100644
--- a/components/tabBar/tabBar.vue
+++ b/components/tabBar/tabBar.vue
@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-tabbar class="custom-tabbar" zIndex="100" :value="currentTab" :fixed="true" :active-color="activeColor"
+		<u-tabbar class="custom-tabbar" zIndex="100" :value="current" :fixed="true" :active-color="activeColor"
 			:inactive-color="inactiveColor" @change='change'>
 			<u-tabbar-item v-for="(item,index) in curTabList" :icon="item.icon" :key="index" :text="item.name">
 			</u-tabbar-item>
@@ -11,7 +11,7 @@
 <script>
 	export default {
 		props: {
-			currentTab: {},
+			current: Number,
 		},
 		data() {
 			return {
@@ -21,16 +21,33 @@
 
 				curTabList: [{
 						name: '首页',
-						iconPathSelected: '',
-						iconPath: '',
-						icon: "home",
+						iconPathSelected: '/static/img/tabbar-01-selected.png',
+						iconPath: '/static/img/tabbar-01.png',
+						// icon: "home",
+						url: '/pages/home/index'
+					},
+
+					{
+						name: '圈子',
+						iconPathSelected: 'static/img/tabbar-02-selected.png',
+						iconPath: 'static/img/tabbar-02.png',
+						// icon: "home",
 						url: '/pages/home/index'
 					},
 					{
+						name: '驾驶舱',
+						iconPathSelected: 'static/img/tabbar-02-selected.png',
+						iconPath: 'static/img/tabbar-02.png',
+						// icon: "home",
+						url: '/pages/statistics/index'
+					},
+
+
+					{
 						name: '个人中心',
-						iconPathSelected: '',
-						iconPath: '',
-						icon: "account-fill",
+						iconPathSelected: '/static/img/tabbar-03-selected.png',
+						iconPath: '/static/img/tabbar-03.png',
+						// icon: "account-fill",
 						url: '/pages/user/center'
 					}
 				]
@@ -62,7 +79,10 @@
 		},
 		methods: {
 			change(e) {
-				this.$emit("change", this.curTabList[e].url)
+				uni.switchTab({
+					url: '/' + this.curTabList[e].path
+				})
+				// this.$emit("change", this.curTabList[e].url)
 			},
 
 		}

--
Gitblit v1.9.3