miniprogramme/pages/social/search/search.wxss

471 lines
6.5 KiB
Text
Raw Normal View History

2025-09-12 16:08:17 +08:00
/* 搜索用户页面样式 */
.search-container {
height: 100vh;
background-color: #f8f9fa;
display: flex;
flex-direction: column;
}
/* 自定义导航栏 */
.custom-nav-bar {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
}
.nav-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
height: 88rpx;
}
.nav-left {
width: 80rpx;
display: flex;
align-items: center;
}
.back-icon {
font-size: 40rpx;
color: white;
font-weight: bold;
}
.nav-center {
flex: 1;
text-align: center;
}
.nav-title {
font-size: 36rpx;
font-weight: 600;
color: white;
}
.nav-right {
width: 80rpx;
}
/* 搜索区域 */
.search-section {
margin-top: 176rpx;
padding: 32rpx;
background: white;
border-bottom: 1px solid #f0f0f0;
}
.search-box {
display: flex;
align-items: center;
gap: 24rpx;
margin-bottom: 32rpx;
}
.search-input-wrapper {
flex: 1;
position: relative;
background: #f8f9fa;
border-radius: 50rpx;
padding: 0 32rpx;
display: flex;
align-items: center;
height: 88rpx;
}
.search-icon {
font-size: 32rpx;
color: #999;
margin-right: 16rpx;
}
.search-input {
flex: 1;
font-size: 32rpx;
color: #333;
}
.clear-btn {
opacity: 0;
transition: opacity 0.3s;
padding: 8rpx;
}
.clear-btn.show {
opacity: 1;
}
.clear-icon {
font-size: 28rpx;
color: #999;
}
.search-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 50rpx;
padding: 0 32rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
}
.search-btn-text {
color: white;
font-size: 32rpx;
font-weight: 600;
}
/* 搜索类型 */
.search-types {
display: flex;
gap: 16rpx;
}
.type-item {
padding: 16rpx 32rpx;
border-radius: 50rpx;
background: #f8f9fa;
border: 2rpx solid transparent;
transition: all 0.3s;
}
.type-item.active {
background: #e3f2fd;
border-color: #2196f3;
}
.type-text {
font-size: 28rpx;
color: #666;
}
.type-item.active .type-text {
color: #2196f3;
font-weight: 600;
}
/* 结果容器 */
.results-container {
flex: 1;
padding: 0 32rpx;
}
/* 加载中 */
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.loading-spinner {
width: 60rpx;
height: 60rpx;
border: 4rpx solid #f3f3f3;
border-top: 4rpx solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 24rpx;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-text {
font-size: 28rpx;
color: #999;
}
/* 搜索提示 */
.search-tips {
display: flex;
flex-direction: column;
align-items: center;
padding: 120rpx 0;
text-align: center;
}
.tips-icon {
font-size: 120rpx;
margin-bottom: 32rpx;
opacity: 0.6;
}
.tips-title {
font-size: 36rpx;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
}
.tips-desc {
font-size: 28rpx;
color: #666;
margin-bottom: 48rpx;
}
.tips-list {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.tip-item {
font-size: 26rpx;
color: #999;
text-align: left;
}
/* 无结果 */
.no-results {
display: flex;
flex-direction: column;
align-items: center;
padding: 120rpx 0;
text-align: center;
}
.no-results-icon {
font-size: 120rpx;
margin-bottom: 32rpx;
opacity: 0.6;
}
.no-results-title {
font-size: 36rpx;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
}
.no-results-desc {
font-size: 28rpx;
color: #666;
}
/* 结果列表 */
.results-list {
padding: 32rpx 0;
}
.result-item {
background: white;
border-radius: 24rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
display: flex;
align-items: center;
justify-content: space-between;
}
/* 用户信息 */
.user-info {
display: flex;
align-items: center;
flex: 1;
margin-right: 24rpx;
}
.user-avatar {
position: relative;
margin-right: 24rpx;
}
.avatar-image {
width: 96rpx;
height: 96rpx;
border-radius: 48rpx;
}
.avatar-placeholder {
width: 96rpx;
height: 96rpx;
border-radius: 48rpx;
background: #e0e0e0;
display: flex;
align-items: center;
justify-content: center;
}
.avatar-text {
font-size: 36rpx;
font-weight: 600;
color: #666;
}
.member-badge {
position: absolute;
bottom: -4rpx;
right: -4rpx;
background: linear-gradient(135deg, #ffd700, #ffb300);
border-radius: 20rpx;
padding: 4rpx 8rpx;
}
.member-text {
font-size: 20rpx;
color: white;
font-weight: 600;
}
.user-details {
flex: 1;
}
.user-name-row {
display: flex;
align-items: center;
margin-bottom: 8rpx;
}
.user-nickname {
font-size: 32rpx;
font-weight: 600;
color: #333;
margin-right: 16rpx;
}
.gender-icon {
width: 32rpx;
height: 32rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
background: #2196f3;
}
.gender-text {
font-size: 20rpx;
color: white;
font-weight: 600;
}
.user-meta {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 8rpx;
}
.user-id {
font-size: 24rpx;
color: #999;
}
.match-type {
font-size: 24rpx;
color: #2196f3;
background: #e3f2fd;
padding: 4rpx 12rpx;
border-radius: 12rpx;
}
.user-bio {
font-size: 26rpx;
color: #666;
margin-bottom: 8rpx;
}
.status-message {
font-size: 24rpx;
color: #999;
}
/* 操作按钮 */
.action-buttons {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.action-btn {
padding: 16rpx 32rpx;
border-radius: 50rpx;
text-align: center;
min-width: 120rpx;
}
.add-btn.enabled {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.add-btn.disabled {
background: #f0f0f0;
}
.pending-btn {
background: #fff3e0;
border: 2rpx solid #ff9800;
}
.friend-btn {
background: #e8f5e8;
border: 2rpx solid #4caf50;
}
.message-btn {
background: #e3f2fd;
border: 2rpx solid #2196f3;
}
.btn-text {
font-size: 26rpx;
font-weight: 600;
}
.add-btn.enabled .btn-text {
color: white;
}
.add-btn.disabled .btn-text {
color: #999;
}
.pending-btn .btn-text {
color: #ff9800;
}
.friend-btn .btn-text {
color: #4caf50;
}
.message-btn .btn-text {
color: #2196f3;
}
/* 加载更多 */
.load-more {
display: flex;
align-items: center;
justify-content: center;
padding: 32rpx 0;
gap: 16rpx;
}
.load-more-text {
font-size: 28rpx;
color: #999;
}
.no-more {
display: flex;
justify-content: center;
padding: 32rpx 0;
}
.no-more-text {
font-size: 28rpx;
color: #ccc;
}