From 2d410989d32380d31ae3fe6d42aa3b3ba9e09d00 Mon Sep 17 00:00:00 2001 From: lrj <owen.stl@gmail.com> Date: 星期五, 03 十月 2025 22:13:29 +0800 Subject: [PATCH] UI优化和bug修复: 1.调整小程序消息列表图标样式 2.优化web端比赛晋级页面布局 3.修复小程序消息列表日期显示问题 --- wx/pages/registration/registration.wxss | 969 ++++++++------------------------------------------------ 1 files changed, 149 insertions(+), 820 deletions(-) diff --git a/wx/pages/registration/registration.wxss b/wx/pages/registration/registration.wxss index 36e4507..4085033 100644 --- a/wx/pages/registration/registration.wxss +++ b/wx/pages/registration/registration.wxss @@ -1,189 +1,79 @@ /* pages/registration/registration.wxss */ -/* 瀹瑰櫒鏍峰紡 */ +/* --- 鍏ㄥ眬鍜屽鍣� --- */ .container { min-height: 100vh; background: #f8f9fa; - padding-bottom: 140rpx; + padding: 20rpx; + padding-bottom: 180rpx; /* 涓哄簳閮ㄦ寜閽暀鍑虹┖闂� */ + box-sizing: border-box; } -/* 鍔犺浇鐘舵�佹牱寮� */ +/* --- 鍔犺浇鐘舵�� --- */ .loading-wrapper { display: flex; flex-direction: column; align-items: center; - padding: 120rpx 0; + justify-content: center; + padding-top: 200rpx; } - .loading-text { margin-top: 20rpx; font-size: 28rpx; - color: #999999; + color: #999; } -/* 琛ㄥ崟瀹瑰櫒鏍峰紡 */ +/* --- 琛ㄥ崟瀹瑰櫒鍜屽崱鐗� --- */ .form-container { - padding: 0 30rpx; + width: 100%; } -/* 娲诲姩淇℃伅鏍峰紡 */ -.activity-info { +.card { background: #ffffff; - padding: 30rpx; + border-radius: 16rpx; margin-bottom: 20rpx; - border-radius: 12rpx; - box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); + overflow: hidden; } -.activity-title { - display: block; +.card-title { font-size: 32rpx; font-weight: bold; - color: #333333; - margin-bottom: 16rpx; -} - -.activity-desc { - display: block; - font-size: 26rpx; - color: #666666; - line-height: 1.6; -} - -/* 鐢ㄦ埛淇℃伅鍖哄煙鏍峰紡 */ -.user-info-section { - background: #ffffff; - margin-bottom: 20rpx; - border-radius: 12rpx; - overflow: hidden; - box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); -} - -.user-info-card { - padding: 30rpx; - display: flex; - align-items: center; - gap: 24rpx; -} - -.user-avatar-wrapper { - flex-shrink: 0; -} - -.user-avatar { - width: 120rpx; - height: 120rpx; - border-radius: 60rpx; - border: 4rpx solid #f0f0f0; -} - -.user-avatar-placeholder { - width: 120rpx; - height: 120rpx; - border-radius: 60rpx; - background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%); - display: flex; - align-items: center; - justify-content: center; - border: 4rpx solid #f0f0f0; -} - -.avatar-text { - color: #ffffff; - font-size: 48rpx; - font-weight: bold; -} - -.user-details { - flex: 1; - min-width: 0; -} - -.user-name { - font-size: 32rpx; - font-weight: bold; - color: #333333; - margin-bottom: 16rpx; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.user-info-row { - display: flex; - align-items: center; - margin-bottom: 8rpx; - font-size: 26rpx; -} - -.info-label { - color: #666666; - min-width: 100rpx; - margin-right: 12rpx; -} - -.info-value { - color: #333333; - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* 琛ㄥ崟鍖哄煙鏍峰紡 */ -.form-section { - background: #ffffff; - margin-bottom: 20rpx; - border-radius: 12rpx; - overflow: hidden; - box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); -} - -.section-title { - padding: 30rpx; - font-size: 30rpx; - font-weight: bold; - color: #333333; - background: #f8f9fa; - border-bottom: 1rpx solid #e9ecef; -} - -/* 琛ㄥ崟椤规牱寮� */ -.form-item { + color: #333; padding: 30rpx; border-bottom: 1rpx solid #f0f0f0; - position: relative; - display: flex; - align-items: center; - gap: 20rpx; } -.form-item:last-child { +/* --- 琛ㄥ崟椤� --- */ +.form-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 30rpx; + margin: 0 30rpx; + border-bottom: 1rpx solid #f0f0f0; + position: relative; +} +.card .form-item:last-child { border-bottom: none; } -.form-item.error { - border-left: 6rpx solid #ff4757; -} - +/* 鍨傜洿甯冨眬鐨勮〃鍗曢」 (濡傜畝浠�) */ .form-item.vertical-layout { flex-direction: column; align-items: flex-start; } - .form-item.vertical-layout .label { - margin-bottom: 16rpx; + margin-bottom: 20rpx; +} +.form-item.vertical-layout .input-wrapper { + width: 100%; } .label { font-size: 28rpx; - color: #333333; - font-weight: 500; - min-width: 120rpx; + color: #333; flex-shrink: 0; } - .label.required::after { content: '*'; color: #ff4757; @@ -193,756 +83,195 @@ .input-wrapper { flex: 1; display: flex; - flex-direction: column; -} - -.label-row { - display: flex; - justify-content: space-between; align-items: center; - margin-bottom: 16rpx; + justify-content: flex-end; + min-width: 0; } -/* 杈撳叆妗嗘牱寮� */ -.input, -.textarea { +/* --- 杈撳叆鎺т欢 --- */ +.input, .picker, .textarea { width: 100%; - height: 80rpx; - padding: 20rpx; - border: 2rpx solid #e9ecef; - border-radius: 8rpx; font-size: 28rpx; - color: #333333; - background: #ffffff; - box-sizing: border-box; - line-height: 1.4; - display: flex; - align-items: center; + color: #333; + text-align: right; + border: none; + background-color: transparent; + padding: 0; + margin: 0; } - -.input:focus, -.textarea:focus { - border-color: #1976d2; - outline: none; -} - .textarea { - height: auto; - min-height: 120rpx; - resize: none; - align-items: flex-start; - padding-top: 20rpx; -} - -/* 閫夋嫨鍣ㄦ牱寮� */ -.picker { - width: 100%; -} - -.picker-text { - width: 100%; - height: 80rpx; + text-align: left; + background-color: #f8f9fa; padding: 20rpx; - border: 2rpx solid #e9ecef; border-radius: 8rpx; - font-size: 28rpx; - color: #333333; - background: #ffffff; - box-sizing: border-box; - line-height: 1.4; - display: flex; - align-items: center; + min-height: 150rpx; + margin-top: 10rpx; } - +.placeholder-class { + color: #999; + font-size: 28rpx; +} .picker-text.placeholder { - color: #999999; + color: #999; } -/* 鎵嬫満鍙锋巿鏉冩牱寮� */ +/* --- 鐗瑰畾鎺т欢鏍峰紡 --- */ +/* 鎵嬫満鍙� */ .phone-container { display: flex; align-items: center; - gap: 16rpx; + justify-content: flex-end; width: 100%; } - .phone-display { - flex: 1; - height: 80rpx; - padding: 20rpx; - border: 2rpx solid #e9ecef; - border-radius: 8rpx; + color: #333; font-size: 28rpx; - color: #333333; - background: #f8f9fa; - box-sizing: border-box; - line-height: 1.4; - display: flex; - align-items: center; } - .phone-display.placeholder { - color: #999999; + color: #999; +} +.phone-auth-btn, .phone-change-btn { + color: #1976d2; + font-size: 28rpx; + background-color: transparent; + border: none; + padding: 0; + margin: 0 0 0 20rpx; + line-height: 1; +} +.phone-auth-btn::after, .phone-change-btn::after { + display: none; } -.phone-auth-btn, -.phone-change-btn { - padding: 0 24rpx; - height: 80rpx; - border-radius: 8rpx; - font-size: 24rpx; - font-weight: 500; - border: none; +/* 澶村儚 */ +.avatar-wrapper { display: flex; align-items: center; - justify-content: center; - white-space: nowrap; - flex-shrink: 0; +} +.avatar-image { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + margin-left: 20rpx; +} +.arrow-icon { + width: 16rpx; + height: 28rpx; + margin-left: 10rpx; } -.phone-auth-btn { - background: #1976d2; - color: #ffffff; +/* 闄勪欢 */ +.attachment-upload-area { + padding: 30rpx; } - -.phone-auth-btn:active { - background: #1565c0; -} - -.phone-change-btn { - background: #f5f5f5; - color: #666666; - border: 2rpx solid #e0e0e0; -} - -.phone-change-btn:active { - background: #eeeeee; -} - -/* 閿欒鎻愮ず鏍峰紡 */ -.error-text { - display: block; - margin-top: 8rpx; - font-size: 22rpx; - color: #ff4757; - line-height: 1.4; -} - -/* 鏂囦欢涓婁紶鏍峰紡 */ -.upload-section { - margin-top: 16rpx; -} - .upload-btn { + border: 2rpx dashed #d0d7de; + border-radius: 12rpx; + background: #fafbfc; + padding: 40rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; - width: 200rpx; - height: 200rpx; - border: 2rpx dashed #d0d7de; - border-radius: 12rpx; - background: #f8f9fa; - color: #666666; - transition: all 0.3s ease; + margin-bottom: 20rpx; } - -.upload-btn:active { - background: #e9ecef; - border-color: #1976d2; -} - -.upload-btn.file-upload { - width: 100%; - height: 120rpx; - flex-direction: row; -} - .upload-icon { font-size: 48rpx; - margin-bottom: 12rpx; + margin-bottom: 10rpx; } - -.file-upload .upload-icon { - margin-bottom: 0; - margin-right: 16rpx; -} - .upload-text { - font-size: 24rpx; - color: #666666; + font-size: 28rpx; + color: #333; + font-weight: 500; } - -/* 宸蹭笂浼犳枃浠舵牱寮� */ -.uploaded-file { - position: relative; - width: 200rpx; - height: 200rpx; - border-radius: 12rpx; - overflow: hidden; +.upload-hint { + font-size: 22rpx; + color: #999; + margin-top: 8rpx; } - -.uploaded-image { - width: 100%; - height: 100%; +.attachment-list { + margin-top: 20rpx; } - -.uploaded-file-info { +.attachment-item { display: flex; align-items: center; - justify-content: space-between; padding: 20rpx; background: #f8f9fa; border-radius: 8rpx; - border: 2rpx solid #e9ecef; + margin-bottom: 12rpx; } - -.file-name { - font-size: 26rpx; - color: #333333; -} - -.delete-btn { - position: absolute; - top: 8rpx; - right: 8rpx; - width: 40rpx; - height: 40rpx; - background: rgba(0, 0, 0, 0.7); - color: #ffffff; - border-radius: 50%; +.attachment-info { + flex: 1; display: flex; align-items: center; - justify-content: center; - font-size: 24rpx; - font-weight: bold; + min-width: 0; } - -.uploaded-file-info .delete-btn { - position: static; - background: #ff4757; - color: #ffffff; - padding: 8rpx 16rpx; - border-radius: 6rpx; +.attachment-icon { + font-size: 32rpx; + margin-right: 16rpx; +} +.attachment-details { + flex: 1; + min-width: 0; +} +.attachment-name { + font-size: 26rpx; + color: #333; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.attachment-size { font-size: 22rpx; + color: #999; +} +.attachment-actions .delete-btn { + color: #ff4757; + font-size: 28rpx; + padding: 10rpx; + margin-left: 20rpx; } -/* 鍥㈤槦鎴愬憳鏍峰紡 */ +/* --- 閿欒鎻愮ず --- */ +.error-text { + position: absolute; + bottom: 0; + left: 30rpx; + font-size: 22rpx; + color: #ff4757; +} +.form-item.error { + padding-bottom: 30rpx; /* 涓洪敊璇俊鎭暀鍑虹┖闂� */ +} - -/* 搴曢儴鎿嶄綔鏍忔牱寮� */ +/* --- 搴曢儴鎿嶄綔鏍� --- */ .bottom-actions { position: fixed; bottom: 0; left: 0; right: 0; background: #ffffff; - border-top: 1rpx solid #f0f0f0; padding: 20rpx 30rpx; - display: flex; - box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.1); + padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); + border-top: 1rpx solid #f0f0f0; z-index: 100; } - .submit-btn { - flex: 1; - padding: 24rpx 0; - background: linear-gradient(90deg, #1976d2, #42a5f5); + width: 100%; + height: 88rpx; + line-height: 88rpx; + background: #1976d2; color: #ffffff; border-radius: 12rpx; font-size: 32rpx; font-weight: bold; text-align: center; - box-shadow: 0 4rpx 12rpx rgba(25, 118, 210, 0.3); } - .submit-btn.disabled { background: #cccccc; - box-shadow: none; - color: #999999; + color: #999; } - -/* 寮圭獥鏍峰紡 */ -.modal-overlay { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: rgba(0, 0, 0, 0.5); - display: flex; - align-items: center; - justify-content: center; - z-index: 1000; - padding: 40rpx; -} - -.modal-content { - background: #ffffff; - border-radius: 16rpx; - width: 100%; - max-width: 600rpx; - max-height: 80vh; - overflow: hidden; - display: flex; - flex-direction: column; -} - -.modal-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 30rpx; - border-bottom: 1rpx solid #f0f0f0; -} - -.modal-title { - font-size: 32rpx; - font-weight: bold; - color: #333333; -} - -.modal-close { - width: 48rpx; - height: 48rpx; - display: flex; - align-items: center; - justify-content: center; - font-size: 32rpx; - color: #666666; - font-weight: bold; -} - -.modal-body { - flex: 1; - padding: 30rpx; - overflow-y: auto; -} - -.modal-body .form-item { - padding: 0; - margin-bottom: 30rpx; - border-bottom: none; -} - -.modal-body .form-item:last-child { - margin-bottom: 0; -} - -.modal-footer { - display: flex; - gap: 20rpx; - padding: 30rpx; - border-top: 1rpx solid #f0f0f0; -} - -.cancel-btn, -.confirm-btn { - flex: 1; - padding: 24rpx 0; - border-radius: 12rpx; - font-size: 28rpx; - font-weight: bold; - text-align: center; -} - -.cancel-btn { - background: #f8f9fa; - color: #666666; - border: 2rpx solid #e9ecef; -} - -.confirm-btn { - background: linear-gradient(90deg, #1976d2, #42a5f5); - color: #ffffff; -} - -/* 鍝嶅簲寮忛�傞厤 */ -@media screen and (max-width: 375px) { - .form-container { - padding: 0 20rpx; - } - - .form-item { - padding: 24rpx; - } - - .section-title { - padding: 24rpx; - font-size: 28rpx; - } - - .bottom-actions { - padding: 16rpx 20rpx; - } - - .submit-btn, - .draft-btn { - padding: 20rpx 24rpx; - font-size: 26rpx; - } -} - -@media screen and (min-width: 414px) { - .upload-btn { - width: 240rpx; - height: 240rpx; - } - - .uploaded-file { - width: 240rpx; - height: 240rpx; - } -} - -/* 澶村儚涓婁紶鏍峰紡 */ -.avatar-upload-container { - display: flex; - flex-direction: column; - align-items: center; - gap: 20rpx; -} - -.avatar-upload-btn { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - width: 200rpx; - height: 200rpx; - border: 2rpx dashed #d0d7de; - border-radius: 50%; - background: #f8f9fa; - position: relative; - transition: all 0.3s ease; -} - -.avatar-upload-btn:active { - transform: scale(0.95); - background: #e9ecef; - border-color: #1976d2; -} - -.avatar-upload-btn.uploading { - border-color: #1976d2; - background: #f0f8ff; -} - -.upload-icon { - font-family: "icon"; - font-size: 60rpx; - color: #999999; - margin-bottom: 8rpx; - transition: color 0.3s ease; -} - -.avatar-upload-btn:active .upload-icon { - color: #1976d2; -} - -.upload-text { - font-size: 22rpx; - color: #666666; - text-align: center; - transition: color 0.3s ease; -} - -.avatar-upload-btn:active .upload-text { - color: #1976d2; -} - -.avatar-preview { - display: flex; - flex-direction: column; - align-items: center; - gap: 16rpx; -} - -.avatar-image { - width: 200rpx; - height: 200rpx; - border-radius: 50%; - border: 2rpx solid #e9ecef; - box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); - transition: transform 0.3s ease; -} - -.avatar-image:active { - transform: scale(0.95); -} - -.avatar-actions { - display: flex; - gap: 20rpx; -} - -.action-btn { - padding: 12rpx 24rpx; - font-size: 24rpx; - border-radius: 12rpx; - border: 1rpx solid #1976d2; - color: #1976d2; - background: #ffffff; - text-align: center; - transition: all 0.3s ease; - box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); -} - -.action-btn:active { - transform: translateY(2rpx); - background: #f0f8ff; - box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.1); -} - -.action-btn.delete { - border-color: #ff4757; - color: #ff4757; -} - -.action-btn.delete:active { - background: #fff5f5; -} - -.upload-progress { - width: 100%; - max-width: 300rpx; -} - -.progress-text { - display: block; - font-size: 24rpx; - color: #666666; - text-align: center; - margin-bottom: 12rpx; -} - -.progress-bar { - width: 100%; - height: 8rpx; - background: #e9ecef; - border-radius: 4rpx; - overflow: hidden; - box-shadow: inset 0 1rpx 2rpx rgba(0, 0, 0, 0.1); -} - -.progress-fill { - height: 100%; - background: linear-gradient(90deg, #1976d2, #42a5f5); - border-radius: 4rpx; - transition: width 0.3s ease; -} - -/* 涓婁紶鐘舵�佹寚绀哄櫒 */ -.avatar-uploading-indicator { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 60rpx; - height: 60rpx; - border: 4rpx solid #f0f0f0; - border-top: 4rpx solid #1976d2; - border-radius: 50%; - animation: spin 1s linear infinite; -} - -@keyframes spin { - 0% { transform: translate(-50%, -50%) rotate(0deg); } - 100% { transform: translate(-50%, -50%) rotate(360deg); } -} - -/* 澶村儚涓婁紶鎻愮ず鏂囧瓧 */ -.avatar-upload-hint { - font-size: 22rpx; - color: #999999; - text-align: center; - margin-top: 10rpx; - line-height: 1.4; -} - -/* 閿欒鐘舵�佹牱寮� */ -.avatar-upload-container.error .avatar-upload-btn { - border-color: #ff4757; - background: #fff5f5; -} - -.avatar-upload-container.error .upload-icon { - color: #ff4757; -} - -/* 闄勪欢涓婁紶鏍峰紡 */ -.attachment-upload-area { - margin-top: 20rpx; -} - -.upload-btn { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 40rpx 20rpx; - border: 2rpx dashed #d0d7de; - border-radius: 12rpx; - background: #fafbfc; - transition: all 0.3s ease; - margin-bottom: 20rpx; -} - -.upload-btn:active { - background: #f1f3f4; - border-color: #1976d2; -} - -.upload-icon { - font-size: 48rpx; - margin-bottom: 10rpx; -} - -.upload-text { - font-size: 28rpx; - color: #333333; - font-weight: 500; - margin-bottom: 8rpx; -} - -.upload-hint { - font-size: 22rpx; - color: #666666; - text-align: center; - line-height: 1.4; -} - -/* 闄勪欢鍒楄〃鏍峰紡 */ -.attachment-list { - margin-top: 20rpx; -} - -.attachment-item { - display: flex; - align-items: center; - justify-content: space-between; - padding: 20rpx; - background: #ffffff; - border-radius: 12rpx; - margin-bottom: 12rpx; - box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); - transition: all 0.3s ease; -} - -.attachment-item.uploading { - background: #f8f9fa; - border: 1rpx solid #e9ecef; -} - -.attachment-info { - display: flex; - align-items: center; - flex: 1; -} - -.attachment-icon { - font-size: 32rpx; - margin-right: 16rpx; - width: 40rpx; - text-align: center; -} - -.attachment-details { - flex: 1; -} - -.attachment-name { - display: block; - font-size: 26rpx; - color: #333333; - font-weight: 500; - margin-bottom: 4rpx; - word-break: break-all; -} - -.attachment-size { - display: block; - font-size: 22rpx; - color: #666666; -} - -.upload-progress { - display: flex; - align-items: center; - margin-top: 8rpx; -} - -.progress-bar { - flex: 1; - height: 6rpx; - background: #e9ecef; - border-radius: 3rpx; - overflow: hidden; - margin-right: 12rpx; -} - -.progress-bar .progress-fill { - height: 100%; - background: linear-gradient(90deg, #1976d2, #42a5f5); - border-radius: 3rpx; - transition: width 0.3s ease; -} - -.progress-text { - font-size: 20rpx; - color: #666666; - min-width: 60rpx; - text-align: right; -} - -.upload-status { - display: block; - font-size: 22rpx; - margin-top: 4rpx; -} - -.upload-status.success { - color: #28a745; -} - -.upload-status.error { - color: #dc3545; -} - -.attachment-actions { - margin-left: 16rpx; -} - -.attachment-actions .action-btn { - font-size: 24rpx; - color: #666666; - padding: 8rpx 16rpx; - border-radius: 6rpx; - background: #f8f9fa; - transition: all 0.3s ease; -} - -.attachment-actions .action-btn.preview { - color: #1976d2; - background: #f3f8ff; - margin-right: 8rpx; -} - -.attachment-actions .action-btn.delete { - color: #dc3545; - background: #fff5f5; -} - -.attachment-actions .action-btn:active { - opacity: 0.7; -} - -.attachment-count { - font-size: 24rpx; - color: #666666; - text-align: center; - margin-top: 16rpx; - padding: 12rpx; - background: #f8f9fa; - border-radius: 8rpx; +.submit-btn::after { + display: none; } \ No newline at end of file -- Gitblit v1.8.0