feat(me): 个人信息支持编辑姓名、性别、生日与地区

保存走 user/update 并回写全局用户(保留 token);取消编辑丢弃修改;修正生日默认值显示为 1970-01-01 的问题。
This commit is contained in:
lik
2026-11-10 21:13:37 +08:00
parent 1d8af0cb26
commit b200d0a1ab
3 changed files with 299 additions and 6 deletions
+79 -1
View File
@@ -51,6 +51,8 @@ page {
margin-left: 28rpx;
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
.user-name {
@@ -60,10 +62,26 @@ page {
.user-mobile {
margin-top: 10rpx;
font-size: 26rpx;
font-size: 28rpx;
opacity: 0.9;
}
/* === 编辑入口 === */
.edit-entry {
flex-shrink: 0;
margin-left: 16rpx;
padding: 10rpx 24rpx;
border-radius: 28rpx;
background-color: rgba(255, 255, 255, 0.16);
border: 1rpx solid rgba(255, 255, 255, 0.4);
font-size: 26rpx;
color: #ffffff;
&:active {
background-color: rgba(255, 255, 255, 0.28);
}
}
/* === 详细信息卡 === */
.info-card {
margin-top: 24rpx;
@@ -117,3 +135,63 @@ page {
font-size: 32rpx;
color: #C9BFB5;
}
/* === 编辑态表单 === */
.edit-input {
flex: 1;
height: 48rpx;
min-height: 48rpx;
text-align: right;
}
.edit-placeholder {
color: #C7BDB2;
}
.sex-edit {
display: flex;
align-items: center;
gap: 16rpx;
}
.sex-chip {
padding: 6rpx 32rpx;
border-radius: 24rpx;
background-color: #F4EFE9;
border: 1rpx solid transparent;
font-size: 26rpx;
color: #6F655C;
transition: all 0.2s ease;
&.active {
background-color: rgba(194, 106, 46, 0.1);
border-color: #C26A2E;
color: #C26A2E;
font-weight: 600;
}
}
/* === 保存按钮 === */
.save-bar {
margin-top: 32rpx;
}
.save-btn {
height: 96rpx;
line-height: 96rpx;
text-align: center;
border-radius: 48rpx;
background-color: #C26A2E;
color: #ffffff;
font-size: 30rpx;
font-weight: 600;
box-shadow: 0 8rpx 24rpx rgba(180, 85, 42, 0.25);
&::after {
border: none;
}
&:active {
opacity: 0.9;
}
}