Browse Source

Merge pull request '优化功能按钮样式:添加图标,采用垂直布局,调整尺寸和颜色,增强交互效果' (#16) from ly1 into Xfy

Reviewed-on: http://8.137.125.67:4000/SwtTt29/Mini-Program/pulls/16
pull/19/head
hzj 2 months ago
parent
commit
77227bb2b0
  1. 3
      pages/index/index.wxml
  2. 82
      pages/index/index.wxss

3
pages/index/index.wxml

@ -93,12 +93,15 @@
<!-- 功能按钮区域 --> <!-- 功能按钮区域 -->
<view class="function-buttons"> <view class="function-buttons">
<view class="function-btn" bindtap="navigateToSettlement"> <view class="function-btn" bindtap="navigateToSettlement">
<text class="function-btn-icon">🏠</text>
<text class="function-btn-text">入驻</text> <text class="function-btn-text">入驻</text>
</view> </view>
<view class="function-btn" bindtap="navigateToCooperation"> <view class="function-btn" bindtap="navigateToCooperation">
<text class="function-btn-icon">📣</text>
<text class="function-btn-text">招商</text> <text class="function-btn-text">招商</text>
</view> </view>
<view class="function-btn" bindtap="navigateToGoods"> <view class="function-btn" bindtap="navigateToGoods">
<text class="function-btn-icon">📊</text>
<text class="function-btn-text">管理</text> <text class="function-btn-text">管理</text>
</view> </view>
</view> </view>

82
pages/index/index.wxss

@ -56,7 +56,7 @@ page {
background: #ffffff; background: #ffffff;
backdrop-filter: blur(10rpx); backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx);
padding: 20rpx 0 30rpx; padding: 20rpx 0 0rpx;
margin-top: 140rpx; margin-top: 140rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1); box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
border-bottom: 1rpx solid #e0e0e0; border-bottom: 1rpx solid #e0e0e0;
@ -95,41 +95,83 @@ page {
/* 功能按钮样式 */ /* 功能按钮样式 */
.function-buttons { .function-buttons {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
align-items: center; align-items: center;
padding: 10rpx 30rpx; padding: 15rpx 20rpx;
width: 100%; width: 100%;
max-width: 850rpx; max-width: 850rpx;
box-sizing: border-box; box-sizing: border-box;
background: transparent; background: #ffffff;
margin: 0 auto; margin: 0 auto;
gap: 5rpx;
border-radius: 12rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
} }
.function-btn { .function-btn {
flex: 1; flex: 1;
background: rgba(255, 255, 255, 0.9); display: flex;
backdrop-filter: blur(10rpx); flex-direction: column;
-webkit-backdrop-filter: blur(10rpx); align-items: center;
border-radius: 22rpx; justify-content: center;
padding: 12rpx 0; padding: 15rpx 0;
margin: 0 8rpx; margin: 0;
text-align: center; text-align: center;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); background: #ffffff;
border: 1rpx solid rgba(255, 255, 255, 0.5); border-radius: 12rpx;
transition: all 0.3s ease; transition: all 0.3s ease;
min-width: 100rpx; min-width: 90rpx;
border: none;
box-shadow: none;
}
.function-btn:hover {
transform: translateY(-3rpx);
background: #f5f5f5;
box-shadow: 0 3rpx 10rpx rgba(0, 0, 0, 0.1);
} }
.function-btn:active { .function-btn:active {
transform: scale(0.95); transform: translateY(0rpx) scale(0.96);
opacity: 0.8; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15);
}
.function-btn-icon {
font-size: 48rpx;
margin-bottom: 8rpx;
transition: all 0.3s ease;
display: block;
}
.function-btn:nth-child(1) .function-btn-icon {
color: #1677ff;
}
.function-btn:nth-child(2) .function-btn-icon {
color: #52c41a;
}
.function-btn:nth-child(3) .function-btn-icon {
color: #faad14;
} }
.function-btn-text { .function-btn-text {
font-size: 24rpx; font-size: 20rpx;
color: #333; color: #333333;
font-weight: 600; font-weight: 600;
letter-spacing: 1rpx; letter-spacing: 0;
text-shadow: none;
position: relative;
z-index: 1;
transition: all 0.3s ease;
}
.function-btn:hover .function-btn-icon {
transform: scale(1.05);
}
.function-btn:hover .function-btn-text {
color: #1677ff;
} }
/* 确保所有主要区域背景一致 */ /* 确保所有主要区域背景一致 */
@ -208,7 +250,7 @@ page {
min-height: 70rpx; min-height: 70rpx;
box-sizing: border-box; box-sizing: border-box;
box-shadow: none; box-shadow: none;
margin: 0 auto 10rpx; margin: 0 auto 0rpx;
} }
/* iOS专用修复 */ /* iOS专用修复 */
@ -971,7 +1013,7 @@ wx-button:not([size=mini]) {
} }
.goods-list-container { .goods-list-container {
padding: 20rpx 24rpx; padding: 0rpx 24rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 140rpx); padding-bottom: calc(env(safe-area-inset-bottom) + 140rpx);
} }

Loading…
Cancel
Save