diff --git a/miniapp/components/UserCard/index.vue b/miniapp/components/UserCard/index.vue index c81d2fe..f115691 100644 --- a/miniapp/components/UserCard/index.vue +++ b/miniapp/components/UserCard/index.vue @@ -1,474 +1,479 @@ + .member-icon { + width: auto; + height: 42rpx; + vertical-align: middle; + } + + .tag { + display: inline-block; + font-size: 22rpx; + padding: 6rpx 16rpx; + border-radius: 8rpx; + height: 36rpx; + line-height: 24rpx; + box-sizing: border-box; + vertical-align: middle; + + &.tag-realname { + background: #3d4a4a; + color: #fff; + } + + &.tag-member { + background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); + color: #ff9800; + } + } + } + } + + // 不公开照片样式 + .card-no-photo { + .info-grid { + display: flex; + flex-wrap: wrap; + + .info-item { + width: 50%; + display: flex; + align-items: center; + margin-bottom: 20rpx; + + .label { + font-size: 28rpx; + color: #999; + width: 80rpx; + flex-shrink: 0; + } + + .value { + font-size: 28rpx; + color: #333; + margin-left: 16rpx; + } + } + } + } + + // 公开照片样式 + .card-with-photo { + .content-row { + display: flex; + justify-content: space-between; + + .info-left { + flex: 1; + + .info-item { + display: flex; + align-items: center; + margin-bottom: 20rpx; + + &:last-child { + margin-bottom: 0; + } + + .label { + font-size: 28rpx; + color: #999; + width: 80rpx; + flex-shrink: 0; + } + + .value { + font-size: 28rpx; + color: #333; + margin-left: 16rpx; + } + } + } + + .photo-right { + width: 200rpx; + height: 200rpx; + margin-left: 24rpx; + flex-shrink: 0; + + .user-photo { + width: 100%; + height: 100%; + border-radius: 16rpx; + } + } + } + } + + // 简介区域 + .intro-section { + margin-top: 24rpx; + padding-top: 24rpx; + border-top: 1rpx solid #f5f5f5; + + .intro-text { + font-size: 28rpx; + color: #666; + line-height: 1.6; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + } + } + + // 操作按钮 + .action-buttons { + display: flex; + gap: 24rpx; + margin-top: 32rpx; + + button { + flex: 1; + height: 80rpx; + line-height: 80rpx; + font-size: 30rpx; + border-radius: 40rpx; + border: none; + + &::after { + border: none; + } + } + + .btn-detail { + background: #fff; + color: #333; + border: 2rpx solid #FFCBCB; + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: -2rpx; + left: -2rpx; + right: -2rpx; + bottom: -2rpx; + background: linear-gradient(to right, #FFCBCB, #FF7B7B); + z-index: -1; + border-radius: 40rpx; + } + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: #fff; + z-index: -1; + border-radius: 38rpx; + } + } + + .btn-contact { + background: linear-gradient(to right, #FFBDC2, #FF8A93); + color: #fff; + } + } + \ No newline at end of file diff --git a/miniapp/config/index.js b/miniapp/config/index.js index 7794e45..6bdbd8d 100644 --- a/miniapp/config/index.js +++ b/miniapp/config/index.js @@ -23,7 +23,7 @@ const ENV = { } // 当前环境 - 开发时使用 development,打包时改为 production -const CURRENT_ENV = 'development' +const CURRENT_ENV = 'production' // 导出配置 export const config = { diff --git a/miniapp/pages/mine/index.vue b/miniapp/pages/mine/index.vue index 818fc65..ad196b4 100644 --- a/miniapp/pages/mine/index.vue +++ b/miniapp/pages/mine/index.vue @@ -27,7 +27,7 @@ {{ userInfo.nickname || '用户名' }} - + 相亲编号:{{ userInfo.xiangQinNo || '未设置' }} @@ -456,32 +456,36 @@ export default { border-radius: 50%; margin-right: 24rpx; border: 4rpx solid rgba(255, 255, 255, 0.5); + flex-shrink: 0; } .user-detail { flex: 1; + overflow: hidden; .user-name-row { display: flex; align-items: center; + flex-direction: row; margin-bottom: 8rpx; .user-nickname { font-size: 36rpx; font-weight: 600; color: #333; - margin-right: 12rpx; + margin-right: 6rpx; } .member-icon { height: 42rpx; - min-width: 80rpx; + width: auto; margin-right: 8rpx; } .edit-icon { font-size: 28rpx; color: #999; + flex-shrink: 0; } } diff --git a/server/src/XiangYi.AppApi/Filters/ValidationFilter.cs b/server/src/XiangYi.AppApi/Filters/ValidationFilter.cs index 2182603..82e142d 100644 --- a/server/src/XiangYi.AppApi/Filters/ValidationFilter.cs +++ b/server/src/XiangYi.AppApi/Filters/ValidationFilter.cs @@ -67,6 +67,10 @@ public static class ValidationFilterExtensions return services.AddControllers(options => { options.Filters.Add(); + }).AddJsonOptions(options => + { + // 使用 camelCase 命名策略 + options.JsonSerializerOptions.PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase; }); } }