fix(ui): 下单页背景/卡片/文字跟随全局主题(修复暖色主题下仍是深色底)

- create.vue 原先把整套深色配色写死,仅局部有 .theme-warm 覆盖 → 暖色主题下页面底色/卡片仍是深色
- 统一改用全局主题变量:容器 var(--bg-primary)、卡片 var(--bg-surface)、次级面 var(--bg-surface-elevated)、文字 --text-primary/secondary/muted、描边 --border-subtle、品牌 --color-brand(-gradient)、底部支付栏 --bg-surface-glass
- 替换 15 处深色时代的中性半透明白(rgba(255,255,255,0.03~0.1))为对应主题变量,暖色下不再白上白
- 主按钮渐变改用 var(--color-brand-gradient),暖色下自动变为橙色渐变
- theme-consistency.spec.ts 增加下单页断言(99 套件/682 用例全绿)
这个提交包含在:
xcbyy
2026-10-20 14:00:27 +08:00
父节点 4119bfc303
当前提交 dde3cce562
共有 2 个文件被更改,包括 70 次插入 和 55 次删除

查看文件

@@ -45,6 +45,21 @@ describe('第八十一批主题一致性闸门', () => {
}
});
it('下单页(create)底色/卡片/文字全部走全局主题变量', () => {
const create = read('pwuniapp/pages/order/create.vue');
expect(create).toContain('background-color: var(--bg-primary)');
expect(create).toContain('background-color: var(--bg-surface)');
expect(create).toContain('var(--bg-surface-glass');
expect(create).toContain('border: 1px solid var(--border-subtle)');
expect(create).toContain('color: var(--text-primary)');
expect(create).toContain('color: var(--text-muted)');
// 不得残留深色时代的中性硬编码(否则暖色主题下白上白/底色不一致)
expect(create).not.toContain('background-color: rgba(21, 29, 48');
expect(create).not.toContain('background-color: #0A0F1D');
expect(create).not.toContain('rgba(255, 255, 255, 0.0');
expect(create).toContain("'theme-warm': currentThemeKey === 'warm'");
});
it('全局主题变量在 App.vue 中按主题定义', () => {
const app = read('pwuniapp/App.vue');
expect(app).toContain(':root, page {');