Files
Mycontent/miniprogram/pages/profile-edit/profile-edit.wxss
乘风 c78a0d531f feat: enhance login modal and avatar selection process
- Updated the login modal to include a user agreement section with clickable links to the user agreement and privacy policy.
- Improved button styling and layout for better user experience.
- Refactored avatar selection process to utilize local image paths, enhancing compatibility and reliability across different environments.
- Added utility functions for resolving avatar file paths and selecting images from the gallery or camera.

This update aims to streamline user interactions during login and avatar selection, ensuring a smoother experience.
2026-05-06 17:21:10 +08:00

353 lines
9.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 资料编辑 - comprehensive_profile_editor_v1_1 | 配色 enhancedinput/textarea 用 view 包裹 */
.page {
background: #050B14; min-height: 100vh; color: #fff;
width: 100%; box-sizing: border-box; overflow-x: hidden;
}
.nav-bar {
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
display: flex; align-items: center; justify-content: space-between;
height: 44px; padding: 0 16rpx 0 8rpx;
background: rgba(5,11,20,0.9); backdrop-filter: blur(8rpx);
border-bottom: 1rpx solid rgba(255,255,255,0.08);
}
.nav-back { width: 56rpx; padding: 16rpx 8rpx; flex-shrink: 0; }
.back-icon { font-size: 44rpx; color: #5EEAD4; }
.nav-title {
flex: 1; min-width: 0; font-size: 32rpx; font-weight: 600;
text-align: center; padding: 0 8rpx;
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.nav-right { width: 56rpx; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; }
.nav-right-spacer { width: 100%; height: 1px; }
.nav-gear { padding: 12rpx 8rpx; }
.nav-gear-hover { opacity: 0.75; }
.gear-icon { display: block; }
.loading { padding: 96rpx; text-align: center; color: #94A3B8; }
.scroll-main { width: 100%; height: calc(100vh - 88rpx); padding: 24rpx; box-sizing: border-box; overflow-x: hidden; }
.tip-card {
display: flex; align-items: flex-start; gap: 24rpx;
padding: 32rpx;
background: rgba(94,234,212,0.08); border: 1rpx solid rgba(94,234,212,0.25);
border-radius: 24rpx; margin-bottom: 48rpx;
}
.tip-card-highlight {
background: rgba(94,234,212,0.12); border-color: rgba(94,234,212,0.4);
}
.tip-icon { font-size: 40rpx; color: #5EEAD4; flex-shrink: 0; }
.tip-text { font-size: 26rpx; color: rgba(94,234,212,0.95); line-height: 1.6; }
.avatar-section { display: flex; flex-direction: column; align-items: center; margin-bottom: 48rpx; }
/* 头像点击区(原 chooseAvatar button现为 view + chooseMedia */
.avatar-wrap-btn {
display: flex; align-items: center; justify-content: center;
padding: 0; margin: 0; background: transparent;
width: 192rpx; height: 192rpx; border-radius: 50%; overflow: visible;
}
.avatar-wrap {
position: relative; width: 192rpx; height: 192rpx; border-radius: 50%;
border: 4rpx solid #5EEAD4; box-shadow: 0 0 30rpx rgba(94,234,212,0.3);
}
.avatar-inner {
width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; display: block; }
.avatar-placeholder {
width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
font-size: 72rpx; font-weight: bold; color: #5EEAD4; background: rgba(94,234,212,0.2);
}
.avatar-camera {
position: absolute; bottom: -8rpx; right: -8rpx;
width: 56rpx; height: 56rpx; background: #5EEAD4; color: #000;
border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28rpx;
border: 4rpx solid #050B14; box-sizing: border-box;
}
.avatar-change { font-size: 28rpx; color: #5EEAD4; font-weight: 500; margin-top: 16rpx; }
.section {
margin-bottom: 48rpx; padding-top: 32rpx;
border-top: 1rpx solid rgba(255,255,255,0.08);
}
.section-title { display: flex; align-items: center; gap: 16rpx; font-size: 32rpx; font-weight: 600; margin-bottom: 32rpx; }
.section-icon { font-size: 40rpx; }
.form-row { margin-bottom: 32rpx; }
.form-row:last-child { margin-bottom: 0; }
.form-row-2 { display: flex; gap: 24rpx; }
.form-row-2 .form-item { flex: 1; min-width: 0; }
.form-label { display: block; font-size: 24rpx; color: #94A3B8; margin-bottom: 12rpx; margin-left: 8rpx; }
.required-mark { color: #F87171; margin-left: 4rpx; }
/* input/textarea 用 view 包裹padding 写在 view 上 */
.form-input-wrap {
padding: 24rpx 32rpx;
background: #17212F; border: 1rpx solid rgba(255,255,255,0.08);
border-radius: 24rpx;
box-sizing: border-box; min-width: 0; width: 100%;
}
/* 地区等带后缀图标的输入框:与 MBTI 同高,图标垂直居中 */
.form-input-suffix {
position: relative;
padding-right: 64rpx;
display: flex;
align-items: center;
min-height: 88rpx;
}
.form-input-suffix .form-input-inner {
flex: 1;
min-height: 40rpx;
line-height: 40rpx;
}
.form-input-suffix .form-suffix {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
font-size: 32rpx;
color: #94A3B8;
pointer-events: none;
}
/* form-row-2 下两列统一最小高度,与 MBTI 一致 */
.form-row-2 .form-input-wrap,
.form-row-2 .form-picker {
min-height: 88rpx;
display: flex;
align-items: center;
}
.form-row-2 .form-picker {
color: #fff;
}
.form-input-inner {
width: 100%; max-width: 100%; font-size: 28rpx; color: #fff; background: transparent;
box-sizing: border-box; display: block;
}
.form-picker { color: #fff; }
.form-textarea-wrap {
padding: 24rpx 32rpx;
background: #17212F; border: 1rpx solid rgba(255,255,255,0.08);
border-radius: 24rpx; min-height: 160rpx;
box-sizing: border-box; min-width: 0; width: 100%;
}
.form-textarea-wrap.form-textarea-lg { min-height: 240rpx; }
.form-textarea-inner {
width: 100%; max-width: 100%; min-height: 112rpx; font-size: 28rpx; color: #fff;
background: transparent; line-height: 1.5; box-sizing: border-box; display: block;
}
.form-textarea-lg .form-textarea-inner { min-height: 192rpx; }
.save-btn {
width: 100%; height: 96rpx; line-height: 96rpx; text-align: center;
background: #5EEAD4; color: #050B14; font-size: 36rpx; font-weight: bold;
border-radius: 24rpx; margin-top: 48rpx; margin-bottom: 48rpx;
}
.save-btn[disabled] { opacity: 0.6; }
.bottom-space { height: 120rpx; }
/* 分享图绘制用 canvas仅用于离屏生成不在页面可见 */
.share-card-canvas {
position: fixed;
left: -9999px;
top: -9999px;
opacity: 0;
pointer-events: none;
}
/* 昵称提示文案 */
.input-tip {
margin-top: 8rpx;
font-size: 22rpx;
color: #94A3B8;
margin-left: 8rpx;
}
/* 头像弹窗样式,复用我的页风格 */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.6);
backdrop-filter: blur(16rpx);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 48rpx;
box-sizing: border-box;
}
.modal-content {
width: 100%;
max-width: 640rpx;
background: #0b1220;
border-radius: 32rpx;
padding: 48rpx;
position: relative;
box-sizing: border-box;
}
.modal-close {
position: absolute;
top: 24rpx;
right: 24rpx;
width: 56rpx;
height: 56rpx;
border-radius: 50%;
background: rgba(255,255,255,0.08);
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: rgba(255,255,255,0.7);
}
.avatar-modal-title {
display: block;
font-size: 36rpx;
font-weight: 700;
text-align: center;
margin-bottom: 12rpx;
}
.avatar-modal-desc {
display: block;
font-size: 26rpx;
color: #94A3B8;
text-align: center;
margin-bottom: 32rpx;
}
.btn-choose-avatar {
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #5EEAD4;
color: #050B14;
font-size: 30rpx;
font-weight: 600;
border-radius: 44rpx;
border: none;
}
.btn-choose-avatar::after {
border: none;
}
.btn-choose-album {
width: 100%;
height: 88rpx;
margin-top: 24rpx;
display: flex;
align-items: center;
justify-content: center;
background: rgba(94, 234, 212, 0.15);
color: #5EEAD4;
font-size: 30rpx;
font-weight: 600;
border-radius: 44rpx;
border: 2rpx solid #5EEAD4;
}
.avatar-modal-cancel {
margin-top: 24rpx;
text-align: center;
font-size: 28rpx;
color: #9CA3AF;
}
/* 昵称隐私授权弹窗(单一定义,避免样式冲突) */
.privacy-mask {
position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9999;
display: flex; align-items: center; justify-content: center; padding: 48rpx;
}
.privacy-modal {
width: 100%; max-width: 600rpx; background: #1E293B; border-radius: 24rpx; padding: 48rpx;
}
.privacy-title { font-size: 36rpx; font-weight: 700; display: block; margin-bottom: 16rpx; }
.privacy-desc { font-size: 28rpx; color: #94A3B8; line-height: 1.5; display: block; margin-bottom: 32rpx; }
.privacy-btn { width: 100%; height: 88rpx; line-height: 88rpx; background: #5EEAD4; color: #050B14; font-size: 30rpx; font-weight: 600; border-radius: 44rpx; border: none; }
.privacy-btn::after { border: none; }
.privacy-cancel { text-align: center; margin-top: 24rpx; font-size: 28rpx; color: #94A3B8; }
/* —— 三步向导 —— */
.wizard-bar {
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
margin-bottom: 20rpx;
padding: 0 16rpx;
}
.wizard-step {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
font-weight: 700;
color: #64748b;
background: rgba(148, 163, 184, 0.15);
border: 2rpx solid rgba(148, 163, 184, 0.25);
}
.wizard-step-on {
color: #042f2e;
background: linear-gradient(135deg, #5eead4, #2dd4bf);
border-color: transparent;
}
.wizard-line {
width: 48rpx;
height: 4rpx;
border-radius: 4rpx;
background: rgba(148, 163, 184, 0.2);
}
.wizard-line-on {
background: linear-gradient(90deg, #5eead4, #2dd4bf);
}
.wizard-sub {
display: block;
font-size: 24rpx;
color: #94a3b8;
line-height: 1.5;
text-align: center;
margin-bottom: 32rpx;
padding: 0 12rpx;
}
.tip-card-wizard {
margin-bottom: 32rpx;
}
.section-wizard {
border-top: none;
padding-top: 0;
margin-bottom: 32rpx;
}
.wizard-actions {
display: flex;
flex-direction: row;
gap: 24rpx;
margin-top: 24rpx;
margin-bottom: 24rpx;
}
.wizard-btn-secondary {
flex: 1;
text-align: center;
padding: 28rpx 24rpx;
border-radius: 48rpx;
font-size: 30rpx;
font-weight: 600;
color: #94a3b8;
border: 2rpx solid rgba(148, 163, 184, 0.35);
background: transparent;
}
.wizard-btn-primary {
flex: 1;
text-align: center;
padding: 28rpx 24rpx;
border-radius: 48rpx;
font-size: 30rpx;
font-weight: 700;
color: #042f2e;
background: linear-gradient(135deg, #5eead4, #2dd4bf);
box-shadow: 0 8rpx 24rpx rgba(45, 212, 191, 0.25);
}
.wizard-btn-full {
flex: none;
width: 100%;
}