From f4c2a64f8df1bb67c17bcdcb483509f20022603c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Thu, 4 Jun 2026 16:05:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(customer):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E5=92=8C?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=AD=97=E6=AE=B5=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除新增客户页面对手机号的必填和格式校验 - 修改手机号字段标签为“手机号/微信号”,取消必填和长度限制 - 新增判断当前用户是否为超级管理员逻辑 - 抽取并统一构建客户查询参数方法,根据权限动态设置筛选条件 - 优化客户列表数据获取逻辑,支持超级管理员查看全部客户 - 调整依赖项,更新使用了新构建的查询参数函数 - 增强状态统计接口参数构建,统一调用参数生成函数 - 优化副作用 Hook 依赖,保证数据加载时机正确 --- src/pages/user/components/UserCard.tsx | 2 +- src/pages/user/user.config.ts | 3 +- src/pages/user/user.scss | 27 +++++++++-------- src/pages/user/user.tsx | 42 ++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/src/pages/user/components/UserCard.tsx b/src/pages/user/components/UserCard.tsx index a1dc10e..1decac6 100644 --- a/src/pages/user/components/UserCard.tsx +++ b/src/pages/user/components/UserCard.tsx @@ -174,7 +174,7 @@ function UserCard() { ) } - {getDisplayName()} + {getDisplayName()} {isLoggedIn ? ( {getRoleName()} diff --git a/src/pages/user/user.config.ts b/src/pages/user/user.config.ts index 090f19c..2bd0633 100644 --- a/src/pages/user/user.config.ts +++ b/src/pages/user/user.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '我的', - navigationBarBackgroundColor: '#e9fff2' + navigationBarTitleText: '我的' }) diff --git a/src/pages/user/user.scss b/src/pages/user/user.scss index 2f683d0..00b8897 100644 --- a/src/pages/user/user.scss +++ b/src/pages/user/user.scss @@ -7,19 +7,20 @@ position: relative; overflow: hidden; padding-top: 12px; - background: - linear-gradient(90deg, rgba(34, 197, 94, 0.14) 0%, rgba(56, 189, 248, 0.12) 52%, rgba(245, 158, 11, 0.08) 100%), - linear-gradient(135deg, #e8f8ef 0%, #eef7ff 58%, #f9fafb 100%); + background: transparent; } -.header-bg::before { +/* 右上角光晕点缀 */ +.header-bg::after { content: ''; position: absolute; - top: 0; - left: 0; - right: 0; - height: 4px; - background: linear-gradient(90deg, #22c55e 0%, #38bdf8 55%, #f59e0b 100%); + top: -40px; + right: -40px; + width: 180px; + height: 180px; + border-radius: 50%; + background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.1) 55%, transparent 75%); + z-index: 0; } .user-card-wrap { @@ -29,10 +30,10 @@ } .user-card { - border: 1px solid rgba(148, 163, 184, 0.18); + border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 18px !important; background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 252, 255, 0.94) 100%); - box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); + box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18); } .user-card-header { @@ -46,9 +47,9 @@ } .user-card__name { - max-width: 150px; + max-width: 300px; overflow: hidden; - color: #0f172a; + color: #ffffff; text-overflow: ellipsis; white-space: nowrap; } diff --git a/src/pages/user/user.tsx b/src/pages/user/user.tsx index 237ff85..72bf5a1 100644 --- a/src/pages/user/user.tsx +++ b/src/pages/user/user.tsx @@ -29,6 +29,27 @@ function User() { if (isAdmin()) { return <>
+ {/* 装饰性背景 - 深蓝色渐变 + 圆点装饰 */} +
+
+
+
+
{/**/} @@ -62,6 +83,27 @@ function User() { {/* 我的*/} {/**/}
+ {/* 装饰性背景 - 深蓝色渐变 + 圆点装饰 */} +
+
+
+
+
{/**/}