修改页面tabbar

This commit is contained in:
wangxiaowei
2025-12-12 22:47:01 +08:00
parent 23cbc1625d
commit 63b6abc5f7
8 changed files with 14 additions and 26 deletions

20
main.js
View File

@ -461,31 +461,25 @@ Vue.prototype.setTabBarLinks = function(vars, theme) {
]
uni.setTabBarStyle({
color: '#333333',
selectedColor: color[theme],
selectedColor: '#365A9A',
})
uni.setTabBarItem({
index: 0,
text: '首页',
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/home_' + theme + '.png'
iconPath: 'static/tabbar/home_7.png',
selectedIconPath: 'static/tabbar/home_8.png'
})
uni.setTabBarItem({
index: 1,
text: '分类',
iconPath: 'static/tabbar/category.png',
selectedIconPath: 'static/tabbar/category_' + theme + '.png'
iconPath: 'static/tabbar/category_7.png',
selectedIconPath: 'static/tabbar/category_8.png'
})
uni.setTabBarItem({
index: 2,
text: '购物车',
iconPath: 'static/tabbar/cart.png',
selectedIconPath: 'static/tabbar/cart_' + theme + '.png'
})
uni.setTabBarItem({
index: 3,
text: '我的',
iconPath: 'static/tabbar/user.png',
selectedIconPath: 'static/tabbar/user_' + theme + '.png'
iconPath: 'static/tabbar/user_7.png',
selectedIconPath: 'static/tabbar/user_8.png'
})
} else {
uni.hideTabBar();

View File

@ -572,31 +572,25 @@ export default {
let color = ['#ff5704', '#19ad57', '#ffcc00', '#1774ff', '#e4e4e4', '#c8ba97', '#623ceb'];
uni.setTabBarStyle({
color: '#333333',
selectedColor: color[theme]
selectedColor: '#365A9A'
});
uni.setTabBarItem({
index: 0,
text: '首页',
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/home_' + theme + '.png'
iconPath: 'static/tabbar/home_7.png',
selectedIconPath: 'static/tabbar/home_8.png'
});
uni.setTabBarItem({
index: 1,
text: '分类',
iconPath: 'static/tabbar/category.png',
selectedIconPath: 'static/tabbar/category_' + theme + '.png'
iconPath: 'static/tabbar/category_7.png',
selectedIconPath: 'static/tabbar/category_8.png'
});
uni.setTabBarItem({
index: 2,
text: '购物车',
iconPath: 'static/tabbar/cart.png',
selectedIconPath: 'static/tabbar/cart_' + theme + '.png'
});
uni.setTabBarItem({
index: 3,
text: '我的',
iconPath: 'static/tabbar/user.png',
selectedIconPath: 'static/tabbar/user_' + theme + '.png'
iconPath: 'static/tabbar/user_7.png',
selectedIconPath: 'static/tabbar/user_8.png'
});
} else {
setTimeout(function() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/tabbar/home_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/tabbar/home_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/tabbar/user_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/tabbar/user_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB