Browse Source

减小商品评价和联系人区域之间的空白

pull/19/head
徐飞洋 2 months ago
parent
commit
6b93657815
  1. 4
      pages/goods-detail/goods-detail.wxss
  2. 20
      pages/index/index.js
  3. 6
      pages/index/index.wxml
  4. 110
      pages/index/index.wxss

4
pages/goods-detail/goods-detail.wxss

@ -76,7 +76,7 @@
/* 商品详情内容区域 */ /* 商品详情内容区域 */
.goods-detail-content { .goods-detail-content {
padding-top: 0; /* 移除顶部内边距,消除空白 */ padding-top: 0; /* 移除顶部内边距,消除空白 */
padding-bottom: 90px; /* 减小底部内边距 */ padding-bottom: 10px; /* 大幅减小底部内边距,减小与评论区的空白 */
} }
/* 商品图片轮播 */ /* 商品图片轮播 */
@ -1044,7 +1044,7 @@ video.slider-media .wx-video-volume-icon {
/* 评论区样式 */ /* 评论区样式 */
.comments-section { .comments-section {
background-color: #ffffff; background-color: #ffffff;
margin: 8px 0 90px; margin: 0 0 90px; /* 移除顶部margin,进一步减小与联系人区域的空白 */
padding: 16px; padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
} }

20
pages/index/index.js

@ -55,6 +55,7 @@ Page({
name: '', name: '',
showAuthModal: false, showAuthModal: false,
showOneKeyLoginModal: false, showOneKeyLoginModal: false,
showAddToHomeModal: false,
userInfo: {}, userInfo: {},
needPhoneAuth: false, needPhoneAuth: false,
testMode: true, testMode: true,
@ -2277,6 +2278,25 @@ Page({
}) })
}, },
// 显示添加桌面引导框
showAddToHomeModal: function () {
this.setData({
showAddToHomeModal: true
});
},
// 隐藏添加桌面引导框
hideAddToHomeModal: function () {
this.setData({
showAddToHomeModal: false
});
},
// 阻止事件冒泡
stopPropagation: function (e) {
e.stopPropagation();
},
// 跳转到货源管理页面 // 跳转到货源管理页面
navigateToGoods: function () { navigateToGoods: function () {
this.setData({ this.setData({

6
pages/index/index.wxml

@ -173,7 +173,7 @@
<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-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-icon">📣</text>
@ -183,10 +183,6 @@
<text class="function-btn-icon">🚻</text> <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">
<text class="function-btn-icon">🚻</text>
<text class="function-btn-text">添加桌面</text>
</view>
</view> </view>
<!-- 广告走马灯轮播图 --> <!-- 广告走马灯轮播图 -->

110
pages/index/index.wxss

@ -2309,8 +2309,116 @@ video.product-media {
to { transform: translateY(0); } to { transform: translateY(0); }
} }
/* 淡入动画 */ /* 娣″叆鍔ㄧ敾 */
@keyframes fadeIn { @keyframes fadeIn {
from { opacity: 0; } from { opacity: 0; }
to { opacity: 1; } to { opacity: 1; }
} }
/* 添加桌面引导框样式 */
.add-to-home-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.modal-content {
background-color: #ffffff;
border-radius: 12rpx;
padding: 40rpx;
width: 80%;
max-width: 500rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.2);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.modal-title {
font-size: 32rpx;
font-weight: 700;
color: #262626;
}
.modal-close {
font-size: 40rpx;
color: #999;
cursor: pointer;
line-height: 1;
}
.modal-body {
margin-bottom: 40rpx;
}
.modal-text {
font-size: 28rpx;
color: #666;
line-height: 1.6;
margin-bottom: 30rpx;
display: block;
}
.step {
display: flex;
align-items: center;
margin-bottom: 24rpx;
}
.step-number {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background-color: #1890ff;
color: #ffffff;
font-size: 24rpx;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
flex-shrink: 0;
}
.step-text {
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.modal-footer {
display: flex;
justify-content: center;
}
.modal-button {
background-color: #1890ff;
color: #ffffff;
border-radius: 8rpx;
padding: 0 48rpx;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-weight: 700;
border: none;
outline: none;
cursor: pointer;
transition: background-color 0.3s;
}
.modal-button:active {
background-color: #40a9ff;
}

Loading…
Cancel
Save