From bea5a8282567864ca8d6a48bcdf728316f5ad319 Mon Sep 17 00:00:00 2001 From: lzh Date: Wed, 18 Mar 2026 15:19:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(@vben/web-antd):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E7=94=A8=E6=88=B7=E8=B5=84?= =?UTF-8?q?=E6=96=99=E4=B8=8E=E7=A4=BE=E4=BA=A4=E7=BB=91=E5=AE=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 用户资料页改为卡片式布局,头像居中展示角色标签 - 社交绑定页替换表格为卡片列表,支持已绑定详情展开 - 新增微信小程序社交类型枚举,小程序端绑定入口置灰提示 - 头像上传兼容 server/client 两种模式的返回值 - 社交绑定列表增加类型安全(SocialBindItem interface) - 隐藏暂不支持的钉钉和企业微信绑定入口 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../_core/profile/modules/profile-user.vue | 216 +++++++------ .../_core/profile/modules/user-social.vue | 287 ++++++++++-------- packages/constants/src/biz-system-enum.ts | 6 + 3 files changed, 292 insertions(+), 217 deletions(-) diff --git a/apps/web-antd/src/views/_core/profile/modules/profile-user.vue b/apps/web-antd/src/views/_core/profile/modules/profile-user.vue index 57384e3ee..1a058cef5 100644 --- a/apps/web-antd/src/views/_core/profile/modules/profile-user.vue +++ b/apps/web-antd/src/views/_core/profile/modules/profile-user.vue @@ -7,7 +7,7 @@ import { IconifyIcon } from '@vben/icons'; import { preferences } from '@vben/preferences'; import { formatDateTime } from '@vben/utils'; -import { Descriptions, DescriptionsItem, Tooltip } from 'ant-design-vue'; +import { Divider, Tag, Tooltip } from 'ant-design-vue'; import { updateUserProfile } from '#/api/system/user/profile'; import { CropperAvatar } from '#/components/cropper'; @@ -36,113 +36,155 @@ async function handelUpload({ const { httpRequest } = useUpload(); // 将 Blob 转换为 File const fileObj = new File([file], filename, { type: file.type }); - const avatar = await httpRequest(fileObj); + const result = await httpRequest(fileObj); // 2. 更新用户头像 - await updateUserProfile({ avatar }); + const avatarUrl = typeof result === 'string' ? result : result?.url; + if (avatarUrl) { + await updateUserProfile({ avatar: avatarUrl }); + } } + + diff --git a/apps/web-antd/src/views/_core/profile/modules/user-social.vue b/apps/web-antd/src/views/_core/profile/modules/user-social.vue index 8a34b1779..002dadec1 100644 --- a/apps/web-antd/src/views/_core/profile/modules/user-social.vue +++ b/apps/web-antd/src/views/_core/profile/modules/user-social.vue @@ -1,5 +1,4 @@ -