feat: 更改自定义顶栏样式;设置app主题色;更改底部导航栏图标;

This commit is contained in:
jqtmviyu 2025-04-20 10:35:13 +08:00
parent 889c5048ee
commit 29538282c1
12 changed files with 11 additions and 25 deletions

View File

@ -60,7 +60,7 @@
// TabBar https://uniapp.dcloud.net.cn/collocation/pages.html#tabbar // TabBar https://uniapp.dcloud.net.cn/collocation/pages.html#tabbar
"tabBar": { "tabBar": {
"color": "#333", "color": "#333",
"selectedColor": "#18c7ff", "selectedColor": "#27BA9B",
"backgroundColor": "#fff", "backgroundColor": "#fff",
"borderStyle": "white", "borderStyle": "white",
"spacing": "5px", "spacing": "5px",

View File

@ -6,10 +6,7 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
<template> <template>
<view class="navbar" :style="{ paddingTop: safeAreaInsets!.top + 10 + 'px' }"> <view class="navbar" :style="{ paddingTop: safeAreaInsets!.top + 10 + 'px' }">
<!-- logo文字 --> <!-- logo文字 -->
<view class="logo"> <view class="logo"> 金佰川微商城 </view>
<image class="logo-image" src="@/static/images/logo.png"></image>
<text class="logo-text">新鲜 · 亲民 · 快捷</text>
</view>
<!-- 搜索条 --> <!-- 搜索条 -->
<view class="search"> <view class="search">
<text class="icon-search">搜索商品</text> <text class="icon-search">搜索商品</text>
@ -21,30 +18,17 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
<style lang="scss"> <style lang="scss">
/* 自定义导航条 */ /* 自定义导航条 */
.navbar { .navbar {
background-image: url(@/static/images/navigator_bg.png); background-color: $uni-color-app;
background-size: cover;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: 20px; padding-top: 20px;
.logo { .logo {
display: flex; height: 50rpx;
align-items: center; line-height: 50rpx;
height: 64rpx;
padding-left: 30rpx;
.logo-image {
width: 166rpx;
height: 39rpx;
}
.logo-text {
flex: 1;
line-height: 28rpx;
color: #fff;
margin: 2rpx 0 0 20rpx;
padding-left: 20rpx;
border-left: 1rpx solid #fff;
font-size: 26rpx; font-size: 26rpx;
} color: #fff;
text-align: center;
} }
.search { .search {
display: flex; display: flex;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 858 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -74,3 +74,5 @@ $uni-color-subtitle: #555; // 二级标题颜色
$uni-font-size-subtitle: 18px; $uni-font-size-subtitle: 18px;
$uni-color-paragraph: #3f536e; // 文章段落颜色 $uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px; $uni-font-size-paragraph: 15px;
$uni-color-app: #27BA9B;