comet_change: refine-weapp-ui-style role: technical-design
在不动业务逻辑和胶囊安全布局的前提下,借鉴 V21-SOP 原型提升小程序视觉品质与交互流畅度。核心方向:统一卡片/按钮/标签视觉语言、增强首页头部品牌感、强化任务状态识别、增加点击反馈。
bg-gradient-to-r from-blue-500 to-blue-600。bg-white/20,与渐变头部融合。StatusBar 组件计算,渐变背景从状态栏下方开始或覆盖整个顶部区域(视组件结构而定)。bg-white rounded-xl shadow-sm。gap-y-4(16px)。p-4(16px)。style="background: linear-gradient(...)",避免 Tailwind 配置扩展。bg-*-50 text-*-500 rounded px-2 py-0.5 text-xs。
bg-primary text-white rounded-xl py-3。bg-white border border-gray-200 text-gray-600 rounded-xl。border-l-4 border-red-500。bg-green-50。active:scale-95 transition-transform。bg-white rounded-xl shadow-sm p-4。bg-primary text-white rounded-lg。bg-blue-50 text-primary rounded-lg。w-1.5 h-1.5 rounded-full bg-primary(不使用 Tailwind 小数类时改用 w-2 h-2)。bg-gradient-to-br from-blue-900 to-blue-800。bg-white/20 rounded-full。bg-white rounded-xl shadow-sm,列表项带右侧箭头。bg-red-500 text-white rounded-xl。active:scale-95 transition-transform duration-150。active:opacity-80 transition-opacity 或 active:bg-*-600。active:scale-95。src/components/common/TopBar.vue — 支持渐变背景模式src/components/common/StatusTag.vue — 统一配色src/components/home/SalesHome.vuesrc/components/home/DispatchHome.vuesrc/components/home/ConstructionHome.vuesrc/components/task/TaskListView.vuesrc/components/task/SalesTaskCard.vuesrc/components/task/DispatchTaskCard.vuesrc/components/task/ConstructionTaskCard.vuesrc/components/dispatch/ScheduleView.vuesrc/components/my/ProfileView.vue| 风险 | 缓解 |
|---|---|
| 渐变背景与自定义导航栏高度配合不当 | 仅替换 TopBar 背景类,不改动高度计算逻辑 |
| Tailwind 任意值/小数类导致 WXSS 编译失败 | 特殊尺寸使用内联 style,禁用 w-1.5、max-h-[80vh] 等类 |
| uni-card 组件自带样式冲突 | 优先通过外层容器覆盖,必要时改用自定义 view |
| 全站改动范围广导致视觉回归 | 按页面模块分任务,每个任务后运行 build 检查 |
npm run type-check 无 TS 错误。npm run build:mp-weixin 构建通过,WXSS 无转义选择器。