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-btn" bindtap="navigateToSettlement">
<text class="function-btn-icon">🏠</text>
<text class="function-btn-text">入驻</text>
</view>
<view class="function-btn" bindtap="navigateToCooperation">
<text class="function-btn-icon">📣</text>
<text class="function-btn-text">招商</text>
</view>
<view class="function-btn" bindtap="navigateToGoods">
<text class="function-btn-icon">📊</text>
<text class="function-btn-text">管理</text>
</view>
</view>

82
pages/index/index.wxss

@ -56,7 +56,7 @@ page {
background: #ffffff;
backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx);
padding: 20rpx 0 30rpx;
padding: 20rpx 0 0rpx;
margin-top: 140rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
border-bottom: 1rpx solid #e0e0e0;
@ -95,41 +95,83 @@ page {
/* 功能按钮样式 */
.function-buttons {
display: flex;
justify-content: space-between;
justify-content: space-around;
align-items: center;
padding: 10rpx 30rpx;
padding: 15rpx 20rpx;
width: 100%;
max-width: 850rpx;
box-sizing: border-box;
background: transparent;
background: #ffffff;
margin: 0 auto;
gap: 5rpx;
border-radius: 12rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
}
.function-btn {
flex: 1;
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx);
border-radius: 22rpx;
padding: 12rpx 0;
margin: 0 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15rpx 0;
margin: 0;
text-align: center;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
border: 1rpx solid rgba(255, 255, 255, 0.5);
background: #ffffff;
border-radius: 12rpx;
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 {
transform: scale(0.95);
opacity: 0.8;
transform: translateY(0rpx) scale(0.96);
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 {
font-size: 24rpx;
color: #333;
font-size: 20rpx;
color: #333333;
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;
box-sizing: border-box;
box-shadow: none;
margin: 0 auto 10rpx;
margin: 0 auto 0rpx;
}
/* iOS专用修复 */
@ -971,7 +1013,7 @@ wx-button:not([size=mini]) {
}
.goods-list-container {
padding: 20rpx 24rpx;
padding: 0rpx 24rpx;
padding-bottom: 20rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 140rpx);
}

Loading…
Cancel
Save