跳到主要内容

官网前台 App-API

基础路径:/app-api/website 认证:除用户中心外,其他接口均为公开接口

统一响应格式 CommonResult<T>,前端 useApi 自动解包返回 data 字段。


1. 首页模块

GET /home/data

获取首页聚合数据(无需参数)。

响应AppHomeDataRespVO

字段类型说明
statsList<StatItem>统计数字(label, value, icon, numericVal, suffix)
solutionsList<SolutionItem>推荐方案(前6个)
productsList<SolutionItem>核心产品(前4个)
partnersObject合作伙伴(JSON)
bannersObject轮播图(JSON)
heroObjectHero配置(JSON)
advantagesObject核心优势(JSON)
ctaObjectCTA配置(JSON)

前端引用pages/index.vue


2. 产品中心模块

GET /product/list

产品列表。参数:categoryId(分类筛选)。

响应List<AppProductListRespVO>(id, title, subtitle, thumbnail, categoryId, categoryName, description, tags, demoUrl, sortOrder)

GET /product/&#123;id&#125;

产品详情。路径参数: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/&#123;id&#125;/reviews

产品评价(分页)。参数:pageNo, pageSize。响应:PageResult<AppProductReviewRespVO>

GET /product/&#123;id&#125;/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/&#123;id&#125;

方案详情。路径参数:id

GET /solution/&#123;id&#125;/related

相关方案。

GET /solution/categories

分类树。响应:List<IndustryCategoryRespVO>(树形,含 children 嵌套)

字段说明
id分类编号
parentId父级编号
name分类名称
level层级
sortOrder排序
icon图标
description描述
status0正常 1停用
children子分类列表

4. 源码下载模块

GET /source/list

源码包列表。响应:List<AppSourceListRespVO>

字段说明
id, name, version, icon基本信息
description描述
envTags环境标签列表
updateTime更新时间
fileSize大小(字节)
downloadCount下载次数
categoryId, categoryName分类

GET /source/&#123;id&#125;

源码包详情。增加字段:changelog(JSON), envRequirements(JSON)。

GET /source/&#123;id&#125;/download

获取下载链接。返回纯字符串(预签名 URL,有效期5分钟)。

前端 useApi 解包后直接得到 URL 字符串,使用 window.open(url)<a> 标签下载。


5. 关于我们模块

GET /about/company

公司信息。响应:AppAboutCompanyRespVO(id, hero, advantages, timeline, partners)

GET /about/contact

联系方式。响应:AppAboutContactRespVO(companyName, slogan, address, phone, email, workingHours, mapLat, mapLng, qrCodeUrl)

GET /about/team

团队成员。响应:List<AppTeamMemberRespVO>(id, name, title, avatar, description, sort)

POST /about/message

提交留言。请求体:name, email, subject, message。返回:Boolean


6. 演示环境模块

GET /demo/list

演示环境列表。响应:List<DemoEnvironmentRespVO>

字段说明
id, productId编号
name环境名称
demoUrl, adminUrl地址
username, password账号密码
description描述
status状态
sortOrder排序
screenshot截图 URL
accounts账号数组[{label, value}]
createTime创建时间

当 accounts JSON 为空时,后端自动从 username/password/demoUrl/adminUrl 构建 accounts 数组。


7. 授权查询模块

GET /license/verify

授权验证。参数(二选一):domainNameauthorizationNo

响应Map<String, Object>(exists, domainName, authorizationNo, companyName, expirationTime, message)

返回动态 Map 而非固定 VO,前端通过 exists 判断授权有效性。


8. 微信认证模块

GET /auth/qrcode

获取登录二维码。参数:redirectUri。响应:sessionId, qrcodeUrl

GET /auth/check

轮询扫码状态。参数:sessionId。响应:

字段说明
status0=等待 1=已扫码 2=已确认 3=已过期
accessToken登录成功返回
refreshToken登录成功返回
expiresIn过期时间(秒)

GET /auth/callback

微信回调(由微信服务器调用,非前端直接调用)。参数:code, state


9. 用户中心模块

以下接口需在请求头携带有效 Authorization: Bearer &#123;token&#125;

GET /user/profile

用户资料。响应:id, nickname, avatar, mobile, level, companyName

GET /user/licenses

我的授权。响应:List<AppUserLicenseRespVO>(id, authorizationNo, productId, productName, domainName, companyName, status, authorizeTime, expirationTime)

GET /user/downloads

下载记录(分页)。参数:pageNo, pageSize。响应:PageResult<AppDownloadLogRespVO>


10. 站点配置模块

GET /config/site-info

站点公开配置。响应:AppSiteInfoRespVO

字段说明
logoLogo URL
companyName公司名称
phone联系电话
email联系邮箱
address地址
icpICP备案号
policeIcp公安备案号
wxQrcode公众号二维码
serviceQrcode客服微信二维码
socialLinks社交媒体链接(JSON)

11. 政策文档模块

GET /policy/get-by-type

获取政策文档。参数:policyType(privacy / terms)。响应:id, policyType, title, version, content, effectiveDate


12. 数据采集模块

plugins/analytics.client.ts 自动调用。

POST /analytics/collect

批量事件采集。请求体:{ events: EventItem[] }

EventItem:type(pv/event), visitorId, sessionId, pagePath, pageTitle, eventType(click/submit/download/demo_try), eventTarget, eventLabel, metadata, referrer, utmSource, utmMedium, deviceType

POST /analytics/heartbeat

心跳上报。请求体:visitorId, sessionId, pagePath, duration

POST /analytics/path

访问路径上报。请求体:visitorId, userId, sessionId, pathSequence, entryPage, exitPage, totalPages, totalDuration, converted, conversionType