From ae569d0ca6c914181b8a4551e06e571d0c654a0b Mon Sep 17 00:00:00 2001 From: xcbyy <2578898740@qq.com> Date: Mon, 19 Oct 2026 15:27:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BC=98=E6=83=A0=E5=88=B8=E9=A1=B5?= =?UTF-8?q?/=E6=B6=88=E6=81=AF=E9=A1=B5=E4=B8=BB=E9=A2=98=E9=85=8D?= =?UTF-8?q?=E8=89=B2=E8=B7=9F=E9=9A=8F=E5=85=A8=E5=B1=80=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - coupons.vue / notifications.vue 由写死深色改为复用全局 CSS 变量(--bg-primary/--bg-surface/--color-brand-gradient/--text-*/--border-subtle/--nav-bg),随 theme-warm(暖阳晨曦)与默认冷光暗夜自动适配 - 大神工作台新增的服务包表单样式同步复用主题变量 - 新增回归护栏 theme-consistency.spec.ts(97 套件/673 用例全绿) --- pwuniapp/pages/expert/workspace.vue | 14 ++--- pwuniapp/pages/user/coupons.vue | 78 +++++++++++++++----------- pwuniapp/pages/user/notifications.vue | 31 +++++----- server/tests/theme-consistency.spec.ts | 43 ++++++++++++++ 4 files changed, 112 insertions(+), 54 deletions(-) create mode 100644 server/tests/theme-consistency.spec.ts diff --git a/pwuniapp/pages/expert/workspace.vue b/pwuniapp/pages/expert/workspace.vue index 669d014..e12557b 100644 --- a/pwuniapp/pages/expert/workspace.vue +++ b/pwuniapp/pages/expert/workspace.vue @@ -2166,7 +2166,7 @@ const switchBackToPlayer = () => { } .srv-op { font-size: 24rpx; - color: #6366F1; + color: var(--color-brand, #6366F1); padding: 4rpx 8rpx; } .srv-op-danger { @@ -2185,7 +2185,7 @@ const switchBackToPlayer = () => { .form-label { width: 180rpx; font-size: 26rpx; - color: #94A3B8; + color: var(--text-secondary, #94A3B8); flex-shrink: 0; } .form-input { @@ -2193,8 +2193,8 @@ const switchBackToPlayer = () => { height: 68rpx; padding: 0 16rpx; border-radius: 12rpx; - background: rgba(255, 255, 255, 0.06); - color: #E2E8F0; + background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.06)); + color: var(--text-primary, #E2E8F0); font-size: 26rpx; } .form-textarea { @@ -2202,14 +2202,14 @@ const switchBackToPlayer = () => { min-height: 120rpx; padding: 12rpx 16rpx; border-radius: 12rpx; - background: rgba(255, 255, 255, 0.06); - color: #E2E8F0; + background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.06)); + color: var(--text-primary, #E2E8F0); font-size: 26rpx; } .form-hint { display: block; font-size: 22rpx; - color: #64748B; + color: var(--text-muted, #64748B); line-height: 1.6; } diff --git a/pwuniapp/pages/user/coupons.vue b/pwuniapp/pages/user/coupons.vue index ab11344..fa3058b 100644 --- a/pwuniapp/pages/user/coupons.vue +++ b/pwuniapp/pages/user/coupons.vue @@ -34,10 +34,10 @@ - 加载中… + 加载中… 暂无可领取优惠券 - 平台会不定期发放新人券与品类券,敬请关注 + 平台会不定期发放新人券与品类券,敬请关注 @@ -74,7 +74,7 @@ 暂无优惠券 - 去「券中心」领取平台优惠券吧 + 去「券中心」领取平台优惠券吧 { }; const loadCenter = async () => { - const list = await getMarketingCoupons(); - centerList.value = Array.isArray(list) ? list : []; + try { + const list = await getMarketingCoupons(); + centerList.value = Array.isArray(list) ? list : []; + } catch (_) { + centerList.value = []; + } }; const loadMine = async () => { @@ -152,17 +156,19 @@ const loadMine = async () => { mineList.value = []; return; } - const res = await getMyCoupons(uid); - const all = Array.isArray(res?.list) ? res.list : []; - mineList.value = all.filter((x) => x.status === mineFilter.value); + try { + const res = await getMyCoupons(uid); + const all = Array.isArray(res?.list) ? res.list : []; + mineList.value = all.filter((x) => x.status === mineFilter.value); + } catch (_) { + mineList.value = []; + } }; const reloadAll = async () => { isLoading.value = true; try { await Promise.all([loadCenter(), loadMine()]); - } catch (_) { - // 忽略网络异常 } finally { isLoading.value = false; isRefreshing.value = false; @@ -214,15 +220,16 @@ onShow(() => {