From 4894b41ca691a754a010d6e8002c035040d2e634 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 02 Jul 2021 09:30:18 +0800
Subject: [PATCH] 底部导航栏修改
---
pages/home/home.vue | 6 ++
pages/article/article.vue | 6 ++
pages/business/business.vue | 6 ++
pages/myself/myself.vue | 6 ++
pages/index/index.vue | 14 ++++++
store/state.js | 30 ++++++++++++++
6 files changed, 62 insertions(+), 6 deletions(-)
diff --git a/pages/article/article.vue b/pages/article/article.vue
index 32cd362..a865b2d 100644
--- a/pages/article/article.vue
+++ b/pages/article/article.vue
@@ -37,6 +37,9 @@
</view>
</view>
</view>
+
+ <!-- 底部导航条 -->
+ <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
</view>
</template>
@@ -60,7 +63,8 @@
titleNum: 0,
articleTabArr: ['全部', '视频', '社会', '经济', '热点'],
articleTabNum: 0,
- navbarTopHeight: "10px"
+ navbarTopHeight: "10px",
+ tabbar:this.$store.state.tabbar
}
},
mounted() {
diff --git a/pages/business/business.vue b/pages/business/business.vue
index f1265ab..10903a0 100644
--- a/pages/business/business.vue
+++ b/pages/business/business.vue
@@ -30,6 +30,9 @@
</navigator>
</view>
</view>
+ <!-- 底部导航条 -->
+ <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
+
</view>
</template>
@@ -45,7 +48,8 @@
title: '设备提交',
imgSrc: '../../static/img/cancel.png',
goHref: '../equipment/equipment'
- }]
+ }],
+ tabbar:this.$store.state.tabbar
}
}
}
diff --git a/pages/home/home.vue b/pages/home/home.vue
index d503d90..93b5058 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -111,6 +111,9 @@
</view>
<!-- 新闻模块 end -->
</view>
+
+ <!-- 底部导航条 -->
+ <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
</view>
</template>
@@ -136,7 +139,8 @@
noticeList: [],
newsList: [{}, {}],
navButton: [],
- serviceButton: []
+ serviceButton: [],
+ tabbar:this.$store.state.tabbar
};
},
onLoad() {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f985cd7..c3d4f7d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -5,6 +5,7 @@
<text class="title">{{title}}__{{userName}}1.4</text>
<button type="default" @click="cc"></button>
</view>
+ <u-tabbar v-model="current" :list="list"></u-tabbar>
</view>
</template>
@@ -12,7 +13,18 @@
export default {
data() {
return {
- title: 'Hello'
+ title: 'Hello',
+ current:0,
+ list:[
+ {
+ iconPath: "home",
+ selectedIconPath: "home-fill",
+ text: '首页',
+ count: 2,
+ isDot: true,
+
+ }
+ ]
}
},
onLoad() {
diff --git a/pages/myself/myself.vue b/pages/myself/myself.vue
index 2d13e41..64950b4 100644
--- a/pages/myself/myself.vue
+++ b/pages/myself/myself.vue
@@ -36,6 +36,9 @@
</view>
<uniPopup :textmsg="textmsg" @cancel='operation(1)' @confirm='operation(2)' v-show="showTextmsg">
</uniPopup>
+
+ <!-- 底部导航条 -->
+ <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
</view>
</template>
@@ -90,7 +93,8 @@
open: 'outIn',
},
- ]
+ ],
+ tabbar:this.$store.state.tabbar
}
},
components: {
diff --git a/store/state.js b/store/state.js
index 93b8c35..83c37e6 100644
--- a/store/state.js
+++ b/store/state.js
@@ -10,7 +10,35 @@
puserID: '',
puserIphone:'',
avatar:"../../static/logo.png",
- UserData: {}
+ UserData: {},
+ tabbar:[{
+ iconPath: "/static/tabbar/index01.png",
+ selectedIconPath: "/static/tabbar/index02.png",
+ text: '首页',
+
+ pagePath: "/pages/home/home"
+ },
+ {
+ iconPath: "/static/tabbar/article.png",
+ selectedIconPath: "/static/tabbar/articleH.png",
+ text: '资讯',
+ pagePath: "/pages/article/article"
+ },
+ {
+ iconPath: "/static/tabbar/workbench.png",
+ selectedIconPath: "/static/tabbar/workbenchH.png",
+ text: '工作台',
+ count: 2,
+ isDot: false,
+ pagePath: "/pages/business/business"
+ },
+ {
+ iconPath: "/static/tabbar/my.png",
+ selectedIconPath: "/static/tabbar/my-blue.png",
+ text: '我的',
+ pagePath: "/pages/myself/myself"
+ },
+ ]
}
export default state
--
Gitblit v1.9.3