251 lines
3.9 KiB
Text
251 lines
3.9 KiB
Text
/* WebSocket测试页面样式 */
|
|
.container {
|
|
min-height: 100vh;
|
|
background-color: #f5f5f5;
|
|
padding-bottom: 20rpx;
|
|
}
|
|
|
|
/* 标题栏 */
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
height: 88rpx;
|
|
background-color: #667eea;
|
|
color: white;
|
|
padding: 0 30rpx;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.header-left, .header-right {
|
|
width: 60rpx;
|
|
height: 60rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 36rpx;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.back-icon, .detail-icon {
|
|
font-size: 32rpx;
|
|
}
|
|
|
|
/* 状态区域 */
|
|
.status-section {
|
|
padding: 30rpx;
|
|
}
|
|
|
|
.status-card {
|
|
background-color: white;
|
|
border-radius: 20rpx;
|
|
padding: 40rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.status-indicator {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
border-radius: 50%;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.status-indicator.connected {
|
|
background-color: #52c41a;
|
|
box-shadow: 0 0 20rpx rgba(82, 196, 26, 0.5);
|
|
}
|
|
|
|
.status-indicator.disconnected {
|
|
background-color: #ff4d4f;
|
|
box-shadow: 0 0 20rpx rgba(255, 77, 79, 0.5);
|
|
}
|
|
|
|
.status-text {
|
|
font-size: 36rpx;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.status-info {
|
|
display: flex;
|
|
gap: 30rpx;
|
|
}
|
|
|
|
.info-item {
|
|
font-size: 24rpx;
|
|
color: #666;
|
|
background-color: #f0f0f0;
|
|
padding: 8rpx 16rpx;
|
|
border-radius: 12rpx;
|
|
}
|
|
|
|
/* 操作区域 */
|
|
.action-section {
|
|
padding: 0 30rpx 30rpx;
|
|
}
|
|
|
|
.button-row {
|
|
display: flex;
|
|
gap: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.action-btn {
|
|
flex: 1;
|
|
height: 80rpx;
|
|
border-radius: 16rpx;
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
border: none;
|
|
color: white;
|
|
}
|
|
|
|
.connect-btn {
|
|
background: linear-gradient(135deg, #52c41a, #73d13d);
|
|
}
|
|
|
|
.disconnect-btn {
|
|
background: linear-gradient(135deg, #ff4d4f, #ff7875);
|
|
}
|
|
|
|
.heartbeat-btn {
|
|
background: linear-gradient(135deg, #1890ff, #40a9ff);
|
|
}
|
|
|
|
.clear-btn {
|
|
background: linear-gradient(135deg, #faad14, #ffc53d);
|
|
}
|
|
|
|
.action-btn:disabled {
|
|
background: #d9d9d9 !important;
|
|
color: #999 !important;
|
|
}
|
|
|
|
/* 消息区域 */
|
|
.message-section {
|
|
padding: 0 30rpx 30rpx;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 32rpx;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.input-row {
|
|
display: flex;
|
|
gap: 20rpx;
|
|
align-items: center;
|
|
}
|
|
|
|
.message-input {
|
|
flex: 1;
|
|
height: 80rpx;
|
|
background-color: white;
|
|
border-radius: 16rpx;
|
|
padding: 0 24rpx;
|
|
font-size: 28rpx;
|
|
border: 2rpx solid #e8e8e8;
|
|
}
|
|
|
|
.send-btn {
|
|
width: 120rpx;
|
|
height: 80rpx;
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
color: white;
|
|
border-radius: 16rpx;
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
border: none;
|
|
}
|
|
|
|
.send-btn:disabled {
|
|
background: #d9d9d9 !important;
|
|
color: #999 !important;
|
|
}
|
|
|
|
/* 日志区域 */
|
|
.log-section {
|
|
padding: 0 30rpx 30rpx;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.copy-btn {
|
|
font-size: 24rpx;
|
|
color: #667eea;
|
|
padding: 8rpx 16rpx;
|
|
background-color: rgba(102, 126, 234, 0.1);
|
|
border-radius: 12rpx;
|
|
}
|
|
|
|
.log-container {
|
|
height: 400rpx;
|
|
background-color: #1e1e1e;
|
|
border-radius: 16rpx;
|
|
padding: 20rpx;
|
|
}
|
|
|
|
.log-item {
|
|
font-size: 24rpx;
|
|
color: #e8e8e8;
|
|
line-height: 1.5;
|
|
margin-bottom: 8rpx;
|
|
font-family: 'Courier New', monospace;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.empty-logs {
|
|
color: #666;
|
|
text-align: center;
|
|
padding: 60rpx 0;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
/* 统计区域 */
|
|
.stats-section {
|
|
padding: 0 30rpx;
|
|
}
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 20rpx;
|
|
}
|
|
|
|
.stat-item {
|
|
background-color: white;
|
|
border-radius: 16rpx;
|
|
padding: 30rpx;
|
|
text-align: center;
|
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 36rpx;
|
|
font-weight: 600;
|
|
color: #667eea;
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 24rpx;
|
|
color: #666;
|
|
}
|