/* pages/customer/index.less */ // 颜色变量 @bg-primary: #f5f6fa; @bg-secondary: #ffffff; @bg-card: #ffffff; @accent-primary: #4c6ef5; @accent-secondary: #6b7aff; @accent-gradient-start: #4c6ef5; @accent-gradient-end: #748ffc; @text-primary: #1a1a2e; @text-secondary: #6b7280; @text-muted: #9ca3af; @border-color: #e5e7eb; @male-color: #4c6ef5; @female-color: #ff6b6b; @divider-color: #f3f4f6; page { background-color: @bg-primary; color: @text-primary; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } .customer-page { display: flex; flex-direction: column; height: 100vh; background-color: @bg-primary; } // ========== 搜索区域 ========== .search-section { display: flex; align-items: center; gap: 16rpx; padding: 20rpx 24rpx; background-color: @bg-secondary; border-bottom: 1rpx solid @border-color; } .search-bar { flex: 1; display: flex; align-items: center; gap: 12rpx; padding: 16rpx 24rpx; background-color: @bg-primary; border-radius: 32rpx; border: 1rpx solid @border-color; } .search-input { flex: 1; font-size: 28rpx; color: @text-primary; height: 40rpx; line-height: 40rpx; &::placeholder { color: @text-muted; } } .search-clear { display: flex; align-items: center; justify-content: center; padding: 4rpx; } .search-btn { padding: 16rpx 28rpx; background: linear-gradient(135deg, @accent-gradient-start, @accent-gradient-end); color: #ffffff; font-size: 26rpx; font-weight: 500; border-radius: 32rpx; white-space: nowrap; box-shadow: 0 4rpx 16rpx rgba(76, 110, 245, 0.25); &:active { opacity: 0.9; transform: scale(0.98); } } // ========== 统计区域 ========== .stats-section { padding: 20rpx 24rpx 0; } .stats-card { display: flex; align-items: center; justify-content: space-around; padding: 28rpx 24rpx; background-color: @bg-card; border-radius: 24rpx; border: 1rpx solid @border-color; box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04); } .stats-item { display: flex; flex-direction: column; align-items: center; gap: 8rpx; } .stats-value { font-size: 40rpx; font-weight: 700; color: @text-primary; &.male { color: @male-color; } &.female { color: @female-color; } } .stats-label { font-size: 24rpx; color: @text-secondary; } .stats-divider { width: 1rpx; height: 60rpx; background-color: @divider-color; } // ========== 客户列表区域 ========== .customer-list { flex: 1; overflow: hidden; padding: 20rpx 24rpx 0; } .customer-scroll { height: 100%; } .loading-container, .empty-container { display: flex; align-items: center; justify-content: center; padding: 200rpx 40rpx; } .loading-text { color: @text-secondary !important; font-size: 26rpx !important; } .empty-text { color: @text-secondary !important; font-size: 28rpx !important; } .empty-action { margin-top: 30rpx; padding: 16rpx 48rpx; background: linear-gradient(135deg, @accent-gradient-start, @accent-gradient-end); color: #ffffff; font-size: 28rpx; border-radius: 32rpx; display: inline-block; } // ========== 客户卡片 ========== .customer-cards { padding-bottom: 40rpx; } .customer-card { display: flex; align-items: center; gap: 24rpx; margin-bottom: 20rpx; padding: 28rpx; background-color: @bg-card; border-radius: 24rpx; border: 1rpx solid @border-color; box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04); transition: transform 0.2s ease, box-shadow 0.2s ease; &:active { transform: scale(0.98); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); } } // 头像 .customer-avatar { flex-shrink: 0; } .avatar-img { width: 96rpx; height: 96rpx; border-radius: 50%; object-fit: cover; } .avatar-placeholder { width: 96rpx; height: 96rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, @accent-gradient-start, @accent-gradient-end); box-shadow: 0 4rpx 12rpx rgba(76, 110, 245, 0.25); &.male { background: linear-gradient(135deg, #4c6ef5, #748ffc); } &.female { background: linear-gradient(135deg, #ff6b6b, #ff8787); } } .avatar-text { font-size: 36rpx; font-weight: 600; color: #ffffff; } // 客户信息 .customer-info { flex: 1; display: flex; flex-direction: column; gap: 12rpx; min-width: 0; } .info-row { display: flex; align-items: center; gap: 16rpx; flex-wrap: wrap; } .customer-name { font-size: 32rpx; font-weight: 600; color: @text-primary; } .gender-tag { display: inline-flex; align-items: center; padding: 4rpx 14rpx; border-radius: 10rpx; font-size: 22rpx; font-weight: 500; &.male { background-color: rgba(76, 110, 245, 0.1); color: @male-color; } &.female { background-color: rgba(255, 107, 107, 0.1); color: @female-color; } } .customer-date { font-size: 22rpx; color: @text-muted; margin-left: auto; } .customer-phone { font-size: 26rpx; color: @text-secondary; } .customer-location { font-size: 24rpx; color: @text-muted; } // 操作按钮 .customer-action { flex-shrink: 0; } .action-btn { display: flex; align-items: center; justify-content: center; width: 72rpx; height: 72rpx; border-radius: 50%; background-color: rgba(76, 110, 245, 0.08); transition: all 0.2s ease; &:active { background-color: rgba(76, 110, 245, 0.15); transform: scale(0.95); } &.call { background-color: rgba(76, 110, 245, 0.08); } } // ========== 加载更多 ========== .load-more { display: flex; align-items: center; justify-content: center; padding: 40rpx 20rpx; } .no-more { font-size: 24rpx; color: @text-muted; }