Files
shz-backend/docs/app-outdoor-fair-h5-api.md

82 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 户外招聘会公共接口
基础路径:`/app/outdoor-fair`
## 1. 扫码进入企业 H5
**请求方式:** `GET`
**请求路径:** `/company-page`
**请求参数:**
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| deviceCode | String | 是 | 后台设备码绑定企业后生成的扫码参数 |
**响应字段:**
| 字段 | 说明 |
| --- | --- |
| fair | 户外招聘会信息 |
| company | 企业信息 |
| booth | 企业展位信息,未分配展位时为空 |
| jobs | 当前企业在本场招聘会下的岗位列表 |
| fairH5Url | 本场招聘会 H5 链接 |
| companyH5Url | 当前企业 H5 链接 |
| qrCodeContent | 二维码内容,前端用该值生成二维码 |
| deviceId | 绑定设备码 ID |
| deviceCode | 绑定设备码 |
## 2. 通过招聘会和企业获取 H5 数据
**请求方式:** `GET`
**请求路径:** `/{fairId}/companies/{companyId}/page`
用于未绑定设备码或后台预览企业 H5 页面。
## 3. 获取招聘会公共详情
**请求方式:** `GET`
**请求路径:** `/{fairId}`
返回 `fair`、参会企业 `companies``fairH5Url`。登录用户对应的 `fair.checkedIn` 表示当前用户是否已在本场招聘会签到。
## 4. 移动端用户一键签到
**请求方式:** `POST`
**请求路径:** `/check-in`
**请求头:** 需要移动端登录态 `Authorization`
**请求参数:**
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| fairId | Long | 是 | 招聘会 ID |
接口从当前登录用户读取姓名、手机号和地址,签到记录关联 `app_user.user_id`,不再接受前端传入的姓名和手机号。招聘会开始后,同一用户在同一场招聘会只能签到一次。
## 5. 后台参会企业二维码入口
后台接口 `GET /cms/outdoor-fair/{fairId}/companies` 的每行企业现在额外返回:
| 字段 | 说明 |
| --- | --- |
| deviceId | 已绑定设备码 ID未绑定为空 |
| deviceCode | 已绑定设备码,未绑定为空 |
| h5Url | 企业 H5 链接,格式为 `/h5/outdoor-fair/company.html?fairId={fairId}&companyId={companyId}` |
| qrCodeContent | 二维码内容,前端点击“查看二维码”时用该值生成二维码 |
也可以调用 `GET /cms/outdoor-fair/{fairId}/companies/{companyId}/qrcode` 单独获取某个参会企业的二维码内容。
## 6. 已提供的静态 H5
| 页面 | 说明 |
| --- | --- |
| `/h5/outdoor-fair/company.html?fairId={fairId}&companyId={companyId}` | 扫码后的参会企业公共页 |
| `/h5/outdoor-fair/detail.html?fairId={fairId}` | 招聘会公共详情页 |