官网前台 App-API
基础路径:
/app-api/website认证:除用户中心外,其他接口均为公开接口
统一响应格式 CommonResult<T>,前端 useApi 自动解包返回 data 字段。
1. 首页模块
GET /home/data
获取首页聚合数据(无需参数)。
响应:AppHomeDataRespVO
| 字段 | 类型 | 说明 |
|---|---|---|
| stats | List<StatItem> | 统计数字(label, value, icon, numericVal, suffix) |
| solutions | List<SolutionItem> | 推荐方案(前6个) |
| products | List<SolutionItem> | 核心产品(前4个) |
| partners | Object | 合作伙伴(JSON) |
| banners | Object | 轮播图(JSON) |
| hero | Object | Hero配置(JSON) |
| advantages | Object | 核心优势(JSON) |
| cta | Object | CTA配置(JSON) |
前端引用:pages/index.vue
2. 产品中心模块
GET /product/list
产品列表。参数:categoryId(分类筛选)。
响应:List<AppProductListRespVO>(id, title, subtitle, thumbnail, categoryId, categoryName, description, tags, demoUrl, sortOrder)
GET /product/{id}
产品详情。路径参数:id。
响应:AppProductDetailRespVO(id, title, subtitle, thumbnail, description, detailContent, categoryId, categoryName, gallery(Object), tags, techTags, stats, pricingPlans, features, techStack, changelog, envRequirements, seoTitle, seoDescription, demoUrl, createTime)
GET /product/{id}/reviews
产品评价(分页)。参数:pageNo, pageSize。响应:PageResult<AppProductReviewRespVO>
GET /product/{id}/related
相关产品。响应:List<AppProductListRespVO>
3. 解决方案模块
GET /solution/list
方案列表。参数:categoryId, deployType, keyword。
响应:List<AppSolutionListRespVO>(id, title, subtitle, thumbnail, description, categoryId, categoryName, deployType, isHot, version, tags, demoUrl, sortOrder)
GET /solution/{id}
方案详情。路径参数:id。
GET /solution/{id}/related
相关方案。
GET /solution/categories
分类树。响应:List<IndustryCategoryRespVO>(树形,含 children 嵌套)
| 字段 | 说明 |
|---|---|
| id | 分类编号 |
| parentId | 父级编号 |
| name | 分类名称 |
| level | 层级 |
| sortOrder | 排序 |
| icon | 图标 |
| description | 描述 |
| status | 0正常 1停用 |
| children | 子分类列表 |
4. 源码下载模块
GET /source/list
源码包列表。响应:List<AppSourceListRespVO>
| 字段 | 说明 |
|---|---|
| id, name, version, icon | 基本信息 |
| description | 描述 |
| envTags | 环境标签列表 |
| updateTime | 更新时间 |
| fileSize | 大小(字节) |
| downloadCount | 下载次数 |
| categoryId, categoryName | 分类 |
GET /source/{id}
源码包详情。增加字段:changelog(JSON), envRequirements(JSON)。
GET /source/{id}/download
获取下载链接。返回纯字符串(预签名 URL,有效期5分钟)。
前端
useApi解包后直接得到 URL 字符串,使用window.open(url)或<a>标签下载。
5. 关于我们模块
GET /about/company
公司信息。响应:AppAboutCompanyRespVO(id, hero, advantages, timeline, partners)