frontend-api
Installation
SKILL.md
前端 API 对接规范
API 组织结构
API 按照功能模块分组收敛于 apps/web-antd/src/api/ 目录结构下:
api/
├── core/ # 核心鉴权相关API
├── request.ts # requestClient 的网络请求实例配置与拦截器
└── {模块}/ # 跟随业务划分的模块 (如 system, bpm, member 等)
├── {业务域}/
│ └── index.ts # 该域下的具体网络请求定义
示例:用户模块的 API 文件应存放在 apps/web-antd/src/api/system/user/index.ts。
请求封装与使用
所有 HTTP 请求均必须使用基于 @vben/request 封装提供的 requestClient(在 #/api/request 中定义)。
Related skills
More from kevinqpeng/proxy-skills
proxy-backend-api-design
>-
6proxy-backend-database
>-
5proxy-backend-global
>-
4proxy-backend-impl-workflow
>-
4proxy-app-global
Proxy2.0 移动端全局编码规范:uni-app + Vue 3 项目结构、命名规范、组件规范、API 封装、Store 管理、页面路由、多端适配。Use when: (1) Creating or modifying any code in proxy2.0-app project, (2) Writing pages, components, API files, or store modules, (3) Configuring pages.json or manifest.json, (4) Working with uni-app multi-platform features (H5/小程序/App), (5) Following project structure and coding standards.
2frontend-store
前端数据状态流转规范,包含 Pinia Setup Store 与 Options Store 两种范式、持久化配置、状态边界约束。适用于基于 vue-vben-admin v5 + Pinia 的项目。当需要新建或修改 Store、管理全局状态、配置状态持久化时使用此技能。
2