You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

471 lines
7.6 KiB

3 months ago
/* pages/buyer/index.wxss */
.container {
min-height: 100vh;
background-color: #f5f5f5;
}
.title {
font-size: 36rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
width: 100%;
text-align: center;
}
.card {
background: white;
border-radius: 12rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
overflow: hidden;
margin-bottom: 20rpx;
}
.image-swiper {
width: 100%;
height: 100%;
}
/* 弹窗样式 */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: flex-end;
z-index: 9999;
overflow: hidden;
}
.modal-container {
background: white;
padding: 40rpx;
border-radius: 16rpx;
width: 80%;
max-width: 500rpx;
text-align: center;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 30rpx;
color: #333;
}
.modal-content {
font-size: 28rpx;
color: #666;
margin-bottom: 40rpx;
line-height: 1.5;
}
.modal-buttons {
text-align: center;
}
/* 商品详情弹窗 - 商务风格 */
.goods-detail-modal {
background: white;
padding: 0;
border-radius: 20rpx 20rpx 0 0;
width: 100%;
height: 100vh; /* 改为全屏高度 */
max-height: 100vh; /* 确保不超过屏幕高度 */
overflow: hidden;
box-shadow: 0 -8rpx 40rpx rgba(0, 0, 0, 0.15);
display: flex;
flex-direction: column;
margin-bottom: 0; /* 导航栏已隐藏,无需间距 */
z-index: 9999;
position: absolute; /* 确保弹窗位于遮罩层内 */
top: 0;
left: 0;
}
.goods-detail-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 40rpx;
border-bottom: 1rpx solid #f0f0f0;
background-color: white;
position: sticky;
top: 0;
z-index: 10000;
}
.goods-detail-title {
font-size: 36rpx;
font-weight: 600;
color: #2c3e50;
margin: 0;
}
.goods-detail-close {
font-size: 44rpx;
color: #909399;
cursor: pointer;
transition: color 0.3s;
position: sticky;
top: 32rpx;
z-index: 10001;
}
.goods-detail-close:hover {
color: #606266;
}
.goods-detail-content {
padding: 40rpx;
overflow-y: auto;
flex: 1;
height: calc(100vh - 120rpx); /* 减去头部高度,实现全屏滚动 */
-webkit-overflow-scrolling: touch; /* 优化iOS滚动体验 */
width: 100%; /* 确保宽度100% */
box-sizing: border-box; /* 确保padding不影响宽度计算 */
}
.goods-image-section {
margin-bottom: 40rpx;
border-radius: 12rpx;
overflow: hidden;
background-color: #fafafa;
}
.goods-image-swiper {
width: 100%;
height: 440rpx;
}
.goods-image-item {
width: 100%;
height: 100%;
}
.goods-image {
width: 100%;
height: 100%;
display: block;
}
.goods-info-section {
text-align: left;
}
.goods-name {
font-size: 36rpx;
font-weight: 600;
color: #2c3e50;
margin-bottom: 20rpx;
line-height: 1.4;
}
.goods-price {
font-size: 42rpx;
font-weight: 700;
color: #e64340;
margin-bottom: 32rpx;
}
.goods-info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24rpx;
margin-bottom: 40rpx;
padding: 24rpx;
background-color: #f8f9fa;
border-radius: 12rpx;
}
.goods-info-item {
display: flex;
flex-direction: column;
}
.goods-info-label {
font-size: 24rpx;
color: #909399;
margin-bottom: 8rpx;
}
.goods-info-value {
font-size: 28rpx;
color: #2c3e50;
font-weight: 500;
}
.goods-contact-section {
text-align: left;
padding: 24rpx;
background-color: #e8f4fd;
border-radius: 12rpx;
margin-bottom: 40rpx;
border-left: 8rpx solid #1677ff;
}
.goods-contact-title {
font-size: 30rpx;
font-weight: 600;
color: #2c3e50;
margin-bottom: 20rpx;
}
.goods-contact-item {
display: flex;
align-items: center;
margin-bottom: 16rpx;
font-size: 28rpx;
color: #2c3e50;
}
.goods-contact-item:last-child {
margin-bottom: 0;
justify-content: space-between;
}
.goods-contact-icon {
margin-right: 16rpx;
color: #1677ff;
}
.call-phone-button {
background-color: white;
color: black;
font-size: 24rpx;
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
padding: 0;
border-radius: 20rpx;
border: 1rpx solid #d9d9d9;
transition: all 0.3s;
white-space: nowrap;
text-align: center;
}
.call-phone-button:hover {
background-color: #f5f5f5;
transform: translateY(-1rpx);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.call-phone-button:active {
transform: translateY(0);
}
.goods-action-section {
padding: 32rpx 40rpx;
border-top: 1rpx solid #f0f0f0;
}
.goods-action-button {
width: 100%;
height: 96rpx;
line-height: 96rpx;
font-size: 32rpx;
font-weight: 600;
border-radius: 12rpx;
transition: all 0.3s;
border: none;
background-color: #1677ff;
color: white;
}
.goods-action-button:hover {
background-color: #4096ff;
transform: translateY(-2rpx);
box-shadow: 0 4rpx 12rpx rgba(22, 119, 255, 0.3);
}
.goods-action-button:active {
transform: translateY(0);
}
.goods-action-button.reserved {
background-color: #52c41a;
}
.goods-action-button.reserved:hover {
background-color: #73d13d;
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.goods-detail-modal {
width: 96%;
}
.goods-detail-content {
padding: 32rpx;
}
.goods-info-grid {
grid-template-columns: 1fr;
gap: 16rpx;
}
}
.primary-button {
background-color: #1677ff;
color: white;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
margin-bottom: 20rpx;
border: none;
width: 100%;
}
.cancel-button {
background-color: #f5f5f5;
color: #333;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
border: none;
width: 100%;
}
/* 头像选择样式 */
.avatar-section {
margin-bottom: 30rpx;
}
.avatar-wrapper {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background: none;
padding: 0;
margin: 0 auto;
border: none;
}
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
/* 表单样式 */
.form-group {
margin-bottom: 30rpx;
}
.form-input {
width: 100%;
padding: 20rpx;
border: 1rpx solid #ddd;
border-radius: 8rpx;
box-sizing: border-box;
font-size: 28rpx;
}
.form-actions {
text-align: center;
margin-bottom: 20rpx;
}
.confirm-button {
background-color: #1677ff;
color: white;
font-size: 28rpx;
line-height: 80rpx;
border-radius: 8rpx;
border: none;
width: 100%;
}
/* 自定义弹窗样式 */
.custom-toast-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.custom-toast {
background: white;
padding: 40rpx 60rpx;
border-radius: 12rpx;
text-align: center;
transform-origin: center center;
}
/* 图片预览样式 */
.image-preview-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.9);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
/* 按钮样式优化 */
button {
border: none;
outline: none;
}
button:after {
border: none;
}
/* 加载状态样式 */
.loading-more {
padding: 20rpx 0;
text-align: center;
font-size: 26rpx;
color: #999;
}
.no-more-data {
padding: 20rpx 0;
text-align: center;
font-size: 26rpx;
color: #999;
}
/* 搜索无结果样式 */
.no-results {
text-align: center;
color: #999;
margin-top: 50rpx;
font-size: 28rpx;
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.modal-container {
width: 90%;
padding: 30rpx;
}
.card {
margin-bottom: 16rpx;
}
}
/* 四分之一页空白页样式 */
.quarter-page-blank {
height: 25vh;
width: 100%;
box-sizing: border-box;
3 months ago
}