feat: 提交多个新UI组件模块spec和相关属性设定,包括卡片封装、渐变卡片、列式布局组件等,重写了readme.md,用于AI Coding
Some checks are pending
Call HTTPS API / build (push) Waiting to run
Some checks are pending
Call HTTPS API / build (push) Waiting to run
This commit is contained in:
34
AI-Coding/openspec-lite/modules/api-system.yaml
Normal file
34
AI-Coding/openspec-lite/modules/api-system.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
# Module Spec:api-system(src/api + axios request 封装)
|
||||
|
||||
module:
|
||||
id: api-system
|
||||
name: API 层(src/api 域拆分 + src/utils/request.ts)
|
||||
type: core
|
||||
entrypoints:
|
||||
- src/api/
|
||||
- src/utils/request.ts
|
||||
|
||||
public_api:
|
||||
concept:
|
||||
- "src/api/<domain>.ts:按业务域拆分 API 函数"
|
||||
- "src/utils/request.ts:axios 实例 + 拦截器 + 统一错误处理 + token 注入"
|
||||
|
||||
dependency_closure:
|
||||
runtime:
|
||||
- "axios(instance + interceptors)"
|
||||
- "qs(x-www-form-urlencoded 序列化)"
|
||||
- "store/user:token 注入、401/402 时 resetAll / refresh token"
|
||||
- "plugin-vab:gp.$baseMessage / gp.$baseLoading(loading 与错误提示)"
|
||||
- "plugin-errorlog:needErrorLog/addErrorLog(请求异常入库)"
|
||||
- "router:401/403 跳转"
|
||||
- "config:baseURL/requestTimeout/contentType/successCode/statusName/messageName/debounce 等"
|
||||
- "api/refreshToken:402 刷新 token 重试队列"
|
||||
|
||||
acceptance:
|
||||
- "正常接口返回 code=200 时返回 data"
|
||||
- "401 跳转 /login 且 resetAll 执行"
|
||||
- "402 触发 refreshToken 并重放队列请求"
|
||||
|
||||
pitfalls:
|
||||
- "request.ts 强依赖 gp(全局注入)与 user store;抽取到新项目需明确入口安装顺序"
|
||||
- "successCode/statusName/messageName 等与后端协议强耦合,迁移时先在规格声明差异"
|
||||
Reference in New Issue
Block a user