Commit c5118ec4 authored by junmeng huang's avatar junmeng huang
Browse files

fix(web): 修复 Tailwind 未生效、接口前缀与响应信封、401 跳转

Tailwind 方面:
- 依赖装的是 tailwindcss v4,但缺少 v4 所需的 @tailwindcss/postcss,postcss 插件被注释掉,
  index.css 里仍是 v3 的 @tailwind 指令,构建产物只有 500 多字节的未编译指令,布局全塌
- 改用 @tailwindcss/postcss 插件,index.css 换成 v4 的 @import "tailwindcss"
- 移除 index.css 中未分层的 *{margin:0;padding:0} —— v4 工具类在 @layer 内,未分层规则会压掉所有间距
- antd 运行时样式会盖掉 Header 的 bg-white/px-6,用 v4 的 ! 后缀提权

接口方面:
- web/nginx.conf 补 /tenpages/api/* -> /v1/* 前缀映射(前端约定 /api/*,后端路由在 /v1/*)
  /api/auth/me 例外,映射到后端的 /v1/users/me
- client.ts 统一剥掉后端 {success,data} 信封,401 跳转改为应用子路径
parent 0b8dd9ad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment