发布台 · 接口文档

由路由表和控制器注释自动生成 · 前台页面 · 管理后台

发布台(35)

GET /api/publish/activities 需登录 jwt.auth

活动列表(仅已发布,带当前用户的报名状态)

参数类型位置必填说明
keyword string Query 否 可选,按标题或地点搜索

200 {"data":{"list":[{"id":"1","title":"中秋酒搭子","description":"一起过中秋","start_time":"2026-10-30 19:00:00","end_time":"2026-10-30 22:00:00","location":"某某小酒馆","max_people":12,"reward":"","join_count":3,"remaining_seats":9,"joins_locked":false,"can_join":true,"my_join":{"id":"1","seq":3,"status":"joined","status_label":"已报名","remark":"","created_at":"2026-10-21 09:30:00"}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/activities/{id} 需登录 jwt.auth

活动详情(含接龙名单与我的报名)

参数类型位置必填说明
id int 路径 必填 活动ID

200 {"data":{"detail":{"id":"1","title":"中秋酒搭子","max_people":12,"join_count":3,"remaining_seats":9,"can_join":true,"my_join":{"id":"1","seq":3,"status":"joined","status_label":"已报名"},"joins_total":3,"joins":[{"id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"seq":1,"status":"joined","status_label":"已报名","remark":"带一瓶酒","created_at":"2026-10-21 09:30:00"}]}}}

404 {"msg":"活动不存在或已下架"}

POST /api/publish/activities/{id}/joins 需登录 jwt.auth

报名 / 接龙(占一个名额,达到人数上限即拒绝)

取消后重新报名会重新排到队尾;名单锁定后不能再报名。

参数类型位置必填说明
id int 路径 必填 活动ID
remark string Body 否 可选,接龙留言(≤200)

200 {"message":"报名成功","data":{"detail":{"id":"1","seq":3,"status":"joined","status_label":"已报名","remark":"带一瓶酒"},"activity":{"id":"1","title":"中秋酒搭子","join_count":3,"remaining_seats":9,"can_join":true}}}

404 {"msg":"活动不存在或已下架"}

422 {"msg":"人数已满,无法报名"}

POST /api/publish/activities/{id}/joins/cancel 需登录 jwt.auth

取消我的报名(名单锁定后不允许,取消即释放名额)

参数类型位置必填说明
id int 路径 必填 活动ID

200 {"message":"已取消报名","data":{"detail":{"id":"1","status":"cancelled","status_label":"已取消","cancel_by":"user"},"activity":{"id":"1","join_count":2,"remaining_seats":10,"can_join":true}}}

422 {"msg":"报名名单已确认锁定,只能由管理员取消"}

GET /api/publish/activities/{id}/joins/mine 需登录 jwt.auth

我在该活动的报名(未报名返回 null)

参数类型位置必填说明
id int 路径 必填 活动ID

200 {"data":{"detail":{"id":"1","seq":3,"status":"joined","status_label":"已报名","remark":"带一瓶酒"}}}

GET /api/publish/ads 需登录 jwt.auth

广告列表(仅已发布)

参数类型位置必填说明
keyword string Query 否 可选,按标题搜索
on_air integer Query 否 可选,1 只看今天在投放期内的

200 {"data":{"list":[{"id":"1","title":"中秋活动广告","content":"中秋酒搭子活动广告位","link":"https://example.com/a","start_date":"2026-10-01","end_date":"2026-10-31","budget":300000,"budget_text":"3000.00","image_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","on_air":true,"publisher":{"id":"9477","name":"测试管理员","avatar":""}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/ads/{id} 需登录 jwt.auth

广告详情

参数类型位置必填说明
id int 路径 必填 广告ID

200 {"data":{"detail":{"id":"1","title":"中秋活动广告","status":"published","on_air":true}}}

404 {"msg":"广告不存在或已下架"}

GET /api/publish/applications/mine 需登录 jwt.auth

我的投递

无参数

200 {"data":{"list":[{"id":"1","job_id":"1","job_name":"前端工程师","company":"某某科技","name":"张小明","phone":"13800001111","message":"三年经验","resume_url":"https://hiddcdn.zhiliao123.net/words/1.pdf","created_at":"2026-10-21 09:30:00","job":{"id":"1","job_name":"前端工程师","status":"published"}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/categories 需登录 jwt.auth

内容分类列表

无参数

200 {"data":[{"key":"ad","label":"广告","icon":"📢","desc":"发布广告内容","title":"广告","submit_text":"发布","sub_options":[]},{"key":"novel","label":"AI小说","icon":"📖","desc":"跳转H5阅读","title":"小说","submit_text":"发布","sub_options":[{"value":"city","label":"都市"},{"value":"fantasy","label":"玄幻"}]}]}

GET /api/publish/course-purchases/mine 需登录 jwt.auth

我的解锁订单

参数类型位置必填说明
status string Query 否 可选,pending_pay/paid

200 {"data":{"list":[{"id":"1","purchase_no":"FBP20261021093000ABCD1234","course_id":"1","course_name":"零基础短视频剪辑","price":3900,"price_text":"39.00","status":"paid","status_label":"已解锁","pay_type":"jsapi","pay_type_label":"小程序支付","paid_at":"2026-10-21 09:31:00","course":{"id":"1","name":"零基础短视频剪辑","is_free":false,"video_url":"https://hiddcdn.zhiliao123.net/videos/1.mp4"}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/course-purchases/{id} 需登录 jwt.auth

解锁订单详情(仅本人)

参数类型位置必填说明
id int 路径 必填 解锁订单ID

200 {"data":{"detail":{"id":"1","purchase_no":"FBP20261021093000ABCD1234","status":"pending_pay","status_label":"待支付","price_text":"39.00","course":{"id":"1","name":"零基础短视频剪辑","is_free":false}}}}

404 {"msg":"解锁订单不存在"}

POST /api/publish/course-purchases/{id}/pay 需登录 jwt.auth

发起支付(pay_type=native 扫码付返回二维码,jsapi 小程序拉起支付返回 config)

参数类型位置必填说明
id int 路径 必填 解锁订单ID
pay_type string Body 否 可选,native(默认,扫码付)/ jsapi(小程序内拉起支付,需 openid)

200 {"data":{"purchase_no":"FBP20261021093000ABCD1234","amount":3900,"amount_text":"39.00","pay_type":"native","pay_type_label":"扫码付","code_url":"weixin://wxpay/bizpayurl?pr=xxxx","qr_image":"data:image/png;base64,....","config":null}}

200 {"data":{"pay_type":"jsapi","config":{"appId":"...","package":"prepay_id=...","paySign":"..."}}}

404 {"msg":"解锁订单不存在"}

422 {"msg":"该订单不是待支付状态"}

GET /api/publish/course-purchases/{id}/pay-status 需登录 jwt.auth

支付状态查询(支付后前端轮询兜底,回调丢失时主动查单)

参数类型位置必填说明
id int 路径 必填 解锁订单ID

200 {"data":{"status":"paid","status_label":"已解锁","course":{"id":"1","name":"零基础短视频剪辑","unlocked":true,"video_url":"https://hiddcdn.zhiliao123.net/videos/1.mp4"}}}

404 {"msg":"解锁订单不存在"}

GET /api/publish/courses 需登录 jwt.auth

课程列表(仅已发布,付费课带解锁状态)

参数类型位置必填说明
is_free integer Query 否 可选,1 只看免费课,0 只看付费课
keyword string Query 否 可选,按课程名或讲师搜索

200 {"data":{"list":[{"id":"1","name":"零基础短视频剪辑","teacher":"李老师","duration":45,"cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","is_free":false,"price":3900,"price_text":"39.00","unlocked":false,"video_url":""}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/courses/{id} 需登录 jwt.auth

课程详情(未解锁的付费课不返回视频地址)

参数类型位置必填说明
id int 路径 必填 课程ID

200 {"data":{"detail":{"id":"1","name":"零基础短视频剪辑","is_free":false,"price":3900,"price_text":"39.00","unlocked":true,"video_url":"https://hiddcdn.zhiliao123.net/videos/1.mp4"}}}

404 {"msg":"课程不存在或已下架"}

POST /api/publish/courses/{id}/purchase 需登录 jwt.auth

发起解锁(免费课程无需解锁;已解锁直接返回;待支付订单复用并按最新价格刷新)

参数类型位置必填说明
id int 路径 必填 课程ID

200 {"message":"已创建解锁订单,请支付","data":{"purchase":{"id":"1","purchase_no":"FBP20261021093000ABCD1234","price":3900,"price_text":"39.00","status":"pending_pay","status_label":"待支付"},"course":{"id":"1","name":"零基础短视频剪辑","is_free":false,"price":3900}}}

404 {"msg":"课程不存在或已下架"}

422 {"msg":"免费课程无需解锁"}

GET /api/publish/games 需登录 jwt.auth

小游戏列表(仅已发布)

参数类型位置必填说明
category string Query 否 可选,休闲 casual/益智 puzzle/竞技 compete/角色扮演 role
keyword string Query 否 可选,按游戏名称搜索

200 {"data":{"list":[{"id":"1","name":"抢凳子","description":"经典休闲小游戏","url":"https://example.com/game/1","category":"casual","category_label":"休闲","tags":["闯关","简单"],"tags_text":"闯关、简单","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg"}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/games/{id} 需登录 jwt.auth

小游戏详情

参数类型位置必填说明
id int 路径 必填 小游戏ID

200 {"data":{"detail":{"id":"1","name":"抢凳子","url":"https://example.com/game/1","category_label":"休闲"}}}

404 {"msg":"小游戏不存在或已下架"}

GET /api/publish/groupon-orders/mine 需登录 jwt.auth

我的团购订单

参数类型位置必填说明
status string Query 否 可选,pending_pay/paid/cancelled

200 {"data":{"list":[{"id":"1","order_no":"FBO20261021093000ABCD1234","groupon_id":"1","groupon_title":"中秋礼盒 3 人成团","amount":9900,"amount_text":"99.00","status":"pending_pay","status_label":"待支付","pay_type":"native","pay_type_label":"扫码付","paid_at":"","created_at":"2026-10-21 09:30:00","groupon":{"id":"1","stock":48,"sold_count":1,"people_to_group":2,"is_grouped":false}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/groupon-orders/{id} 需登录 jwt.auth

订单详情(仅本人)

参数类型位置必填说明
id int 路径 必填 订单ID

200 {"data":{"detail":{"id":"1","order_no":"FBO20261021093000ABCD1234","status":"paid","status_label":"已支付","amount_text":"99.00","groupon":{"id":"1","title":"中秋礼盒 3 人成团","is_grouped":true,"people_to_group":0}}}}

404 {"msg":"订单不存在"}

POST /api/publish/groupon-orders/{id}/cancel 需登录 jwt.auth

取消订单(仅待支付,取消即释放库存)

参数类型位置必填说明
id int 路径 必填 订单ID

200 {"message":"订单已取消,库存已释放","data":{"detail":{"id":"1","status":"cancelled","status_label":"已取消"},"groupon":{"id":"1","stock":49,"can_order":true}}}

404 {"msg":"订单不存在"}

422 {"msg":"只有待支付订单可以取消"}

POST /api/publish/groupon-orders/{id}/pay 需登录 jwt.auth

发起支付(pay_type=native 扫码付返回二维码,jsapi 小程序拉起支付返回 config)

参数类型位置必填说明
id int 路径 必填 订单ID
pay_type string Body 否 可选,native(默认,扫码付)/ jsapi(小程序内拉起支付,需 openid)

200 {"data":{"order_no":"FBO20261021093000ABCD1234","amount":9900,"amount_text":"99.00","pay_type":"native","pay_type_label":"扫码付","code_url":"weixin://wxpay/bizpayurl?pr=xxxx","qr_image":"data:image/png;base64,....","config":null}}

200 {"data":{"pay_type":"jsapi","config":{"appId":"...","package":"prepay_id=...","paySign":"..."}}}

404 {"msg":"订单不存在"}

422 {"msg":"该订单不是待支付状态"}

GET /api/publish/groupon-orders/{id}/pay-status 需登录 jwt.auth

支付状态查询(支付后前端轮询兜底,回调丢失时主动查单)

参数类型位置必填说明
id int 路径 必填 订单ID

200 {"data":{"status":"paid","status_label":"已支付","groupon":{"id":"1","sold_count":3,"people_to_group":0,"is_grouped":true,"can_order":false}}}

404 {"msg":"订单不存在"}

GET /api/publish/groupons 需登录 jwt.auth

团购列表(仅已发布)

参数类型位置必填说明
keyword string Query 否 可选,按标题搜索
grouping integer Query 否 可选,1 只看凑团中(未成团且有库存)

200 {"data":{"list":[{"id":"1","title":"中秋礼盒 3 人成团","description":"月饼加酒小礼盒","original_price":19900,"original_price_text":"199.00","group_price":9900,"group_price_text":"99.00","min_people":3,"stock":49,"sold_count":1,"people_to_group":2,"is_grouped":false,"image_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","can_order":true}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/groupons/{id} 需登录 jwt.auth

团购详情

参数类型位置必填说明
id int 路径 必填 团购ID

200 {"data":{"detail":{"id":"1","title":"中秋礼盒 3 人成团","group_price_text":"99.00","min_people":3,"sold_count":1,"people_to_group":2,"is_grouped":false,"stock":49,"can_order":true}}}

404 {"msg":"团购不存在或已下架"}

POST /api/publish/groupons/{id}/orders 需登录 jwt.auth

下单(一份一单,下单即占库存;已有待支付订单则直接返回该订单)

参数类型位置必填说明
id int 路径 必填 团购ID

200 {"message":"已创建订单,请支付","data":{"order":{"id":"1","order_no":"FBO20261021093000ABCD1234","amount":9900,"amount_text":"99.00","status":"pending_pay","status_label":"待支付"},"groupon":{"id":"1","title":"中秋礼盒 3 人成团","stock":48,"sold_count":1,"people_to_group":2,"is_grouped":false}}}

404 {"msg":"团购不存在或已下架"}

422 {"msg":"库存不足,暂时无法下单"}

GET /api/publish/jobs 需登录 jwt.auth

岗位列表(仅已发布)

参数类型位置必填说明
keyword string Query 否 可选,按岗位名、公司或城市搜索

200 {"data":{"list":[{"id":"1","job_name":"前端工程师","company":"某某科技","salary":"15k-25k","location":"上海","requirement":"三年及以上经验","description":"负责业务前端开发","contact":"hr@example.com","publisher":{"id":"9477","name":"测试管理员","avatar":""}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/jobs/{id} 需登录 jwt.auth

岗位详情

参数类型位置必填说明
id int 路径 必填 岗位ID

200 {"data":{"detail":{"id":"1","job_name":"前端工程师","company":"某某科技","salary":"15k-25k","location":"上海","contact":"hr@example.com"}}}

404 {"msg":"岗位不存在或已下架"}

POST /api/publish/jobs/{id}/applications 需登录 jwt.auth

投递简历(同一岗位只能投一份,重复投递会更新原投递内容)

简历文件先用 POST api/upload/gettoken 拿 uptoken 直传七牛(words 目录),再把返回的完整 URL 填到 resume。

参数类型位置必填说明
id int 路径 必填 岗位ID
name string Body 必填 联系人姓名(≤50)
phone string Body 必填 联系电话(≤20)
message string Body 否 可选,自我推荐(≤500)
resume string Body 否 可选,简历文件完整 URL(≤500)

200 {"message":"已投递","data":{"detail":{"id":"1","job_id":"1","name":"张小明","phone":"13800001111","message":"三年经验,可月底到岗","resume_url":"https://hiddcdn.zhiliao123.net/words/1.pdf","job":{"id":"1","job_name":"前端工程师","company":"某某科技"}}}}

404 {"msg":"岗位不存在或已下架"}

GET /api/publish/musics 需登录 jwt.auth

音乐列表(仅已发布)

参数类型位置必填说明
keyword string Query 否 可选,按歌名、歌手或专辑搜索

200 {"data":{"list":[{"id":"1","name":"月亮代表我的心","singer":"邓丽君","album":"爱之旅","audio_url":"https://hiddcdn.zhiliao123.net/audios/1.mp3","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","lyrics":"轻风悠悠 月光如水"}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/musics/{id} 需登录 jwt.auth

音乐详情(含歌词)

参数类型位置必填说明
id int 路径 必填 音乐ID

200 {"data":{"detail":{"id":"1","name":"月亮代表我的心","audio_url":"https://hiddcdn.zhiliao123.net/audios/1.mp3","lyrics":"轻风悠悠 月光如水"}}}

404 {"msg":"音乐不存在或已下架"}

GET /api/publish/my/activities 需登录 jwt.auth

我报名过的活动

无参数

200 {"data":{"list":[{"id":"1","activity_id":"1","user_id":"9480","seq":3,"status":"joined","status_label":"已报名","remark":"","created_at":"2026-10-21 09:30:00","activity":{"id":"1","title":"中秋酒搭子","start_time":"2026-10-30 19:00:00","join_count":3,"max_people":12,"joins_locked":false}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/my/courses 需登录 jwt.auth

我已解锁的课程(免费课程无需记录,不在此列)

无参数

200 {"data":{"list":[{"id":"1","purchase_no":"FBP20261021093000ABCD1234","course_id":"1","course_name":"零基础短视频剪辑","price":3900,"price_text":"39.00","status":"paid","status_label":"已解锁","paid_at":"2026-10-21 09:31:00","course":{"id":"1","name":"零基础短视频剪辑","is_free":false,"video_url":"https://hiddcdn.zhiliao123.net/videos/1.mp4"}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/novels 需登录 jwt.auth

小说列表(仅已发布)

参数类型位置必填说明
category string Query 否 可选,都市 city/玄幻 fantasy/仙侠 xianxia/穿越 travel/科幻 scifi/悬疑 suspense
keyword string Query 否 可选,按书名或作者搜索

200 {"data":{"list":[{"id":"1","title":"都市之逆流人生","author":"佚名","category":"city","category_label":"都市","intro":"一个普通人的逆袭故事","url":"https://example.com/novel/1","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg"}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish/novels/{id} 需登录 jwt.auth

小说详情

参数类型位置必填说明
id int 路径 必填 小说ID

200 {"data":{"detail":{"id":"1","title":"都市之逆流人生","category_label":"都市","url":"https://example.com/novel/1"}}}

404 {"msg":"小说不存在或已下架"}

发布台后台(72)

GET /api/publish-admin/activities 需登录 jwt.authpublish.admin

活动列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
keyword string Query 否 可选,按标题、说明或地点搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","title":"中秋酒搭子","description":"一起过中秋","start_time":"2026-10-30 19:00:00","end_time":"2026-10-30 22:00:00","location":"某某小酒馆","max_people":12,"reward":"AA 后由组织者统一结算","join_count":3,"remaining_seats":9,"joins_locked":false,"locked_at":"","can_join":true}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/activities 需登录 jwt.authpublish.admin

发起活动接龙

max_people 是硬上限,报名达到上限后接口不再受理;已锁定名单后也不能再报名。

参数类型位置必填说明
title string Body 必填 活动标题(≤50)
description string Body 必填 活动说明(≤500)
start_time string Body 必填 开始时间(Y-m-d H:i:s)
end_time string Body 必填 结束时间(Y-m-d H:i:s,必须晚于开始时间)
location string Body 必填 活动地点(≤100)
max_people int Body 必填 人数上限(硬限制,≥1)
reward string Body 否 可选,报酬/费用说明(≤200)
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","max_people":12,"remaining_seats":12,"can_join":true}}}

422 {"msg":"接龙结束时间必须晚于开始时间"}

GET /api/publish-admin/activities/{id} 需登录 jwt.authpublish.admin

活动详情

参数类型位置必填说明
id int 路径 必填 活动ID

200 {"data":{"detail":{"id":"1","title":"中秋酒搭子","join_count":3,"remaining_seats":9,"joins_locked":false}}}

404 {"msg":"活动不存在"}

POST /api/publish-admin/activities/{id} 需登录 jwt.authpublish.admin

编辑活动(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

人数上限可以调大;调小到低于已报名人数时,已报名人数保持不变,剩余名额按 0 返回。

参数类型位置必填说明
id int 路径 必填 活动ID
title string Body 否 可选,活动标题
description string Body 否 可选,活动说明
start_time string Body 否 可选,开始时间(Y-m-d H:i:s)
end_time string Body 否 可选,结束时间(Y-m-d H:i:s)
location string Body 否 可选,活动地点
max_people int Body 否 可选,人数上限
reward string Body 否 可选,报酬/费用说明
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","max_people":20,"remaining_seats":17}}}

404 {"msg":"活动不存在"}

POST /api/publish-admin/activities/{id}/audit 需登录 jwt.authpublish.admin

审核活动(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 活动ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/activities/{id}/delete 需登录 jwt.authpublish.admin

删除活动(已有报名记录时拒绝)

参数类型位置必填说明
id int 路径 必填 活动ID

200 {"message":"已删除","data":{"id":"1"}}

422 {"msg":"该活动已有 3 条报名记录,不能删除"}

GET /api/publish-admin/activities/{id}/joins 需登录 jwt.authpublish.admin

某个活动的报名名单(按接龙序号升序)

参数类型位置必填说明
id int 路径 必填 活动ID
status string Query 否 可选,joined/cancelled

200 {"data":{"list":[{"id":"1","activity_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"seq":1,"status":"joined","status_label":"已报名","remark":"带一瓶酒","cancel_by":"","cancelled_at":"","created_at":"2026-10-21 09:30:00"}],"current_page":1,"last_page":1,"total":1}}

404 {"msg":"活动不存在"}

POST /api/publish-admin/activities/{id}/lock 需登录 jwt.authpublish.admin

确认锁定 / 解锁报名名单

锁定后用户不能自取消、也不能再报名,只有管理员能取消具体报名;解锁后恢复。

参数类型位置必填说明
id int 路径 必填 活动ID
locked boolean Body 必填 1 确认锁定,0 解锁

200 {"message":"报名名单已确认锁定","data":{"detail":{"id":"1","joins_locked":true,"locked_at":"2026-10-21 10:00:00","can_join":false}}}

404 {"msg":"活动不存在"}

POST /api/publish-admin/activities/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架活动(下架后用户端不可报名)

参数类型位置必填说明
id int 路径 必填 活动ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","can_join":false}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/activity-joins 需登录 jwt.authpublish.admin

报名记录列表(全站,可按活动与状态筛选)

参数类型位置必填说明
activity_id int Query 否 可选,活动ID
status string Query 否 可选,joined/cancelled
user_id int Query 否 可选,报名人 users.id

200 {"data":{"list":[{"id":"1","activity_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"seq":1,"status":"joined","status_label":"已报名","remark":"带一瓶酒","cancel_by":"","cancelled_at":"","created_at":"2026-10-21 09:30:00","activity":{"id":"1","title":"中秋酒搭子","status":"published","join_count":3,"max_people":12,"joins_locked":false}}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/activity-joins/{id}/cancel 需登录 jwt.authpublish.admin

管理员代取消报名(不受名单锁定限制,取消即释放名额)

参数类型位置必填说明
id int 路径 必填 报名记录ID

200 {"message":"已取消该报名","data":{"detail":{"id":"1","status":"cancelled","status_label":"已取消","cancel_by":"admin"},"activity":{"id":"1","title":"中秋酒搭子","join_count":2,"remaining_seats":10,"joins_locked":true}}}

404 {"msg":"报名记录不存在"}

GET /api/publish-admin/ads 需登录 jwt.authpublish.admin

广告列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
keyword string Query 否 可选,按标题或广告内容搜索
on_air integer Query 否 可选,1 只看今天在投放期内(start_date<=今天<=end_date)的

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","title":"中秋活动广告","content":"中秋酒搭子活动广告位","link":"https://example.com/a","start_date":"2026-10-01","end_date":"2026-10-31","budget":300000,"budget_text":"3000.00","image":"https://hiddcdn.zhiliao123.net/images/1/202610/xxx.jpg","image_url":"https://hiddcdn.zhiliao123.net/images/1/202610/xxx.jpg","on_air":true}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/ads 需登录 jwt.authpublish.admin

发布广告

图片先用 POST api/upload/gettoken 拿 uptoken 直传七牛,再把返回的完整 URL 填到 image。auto_publish 勾选后直接为已发布,不勾选进入待审核。

参数类型位置必填说明
title string Body 必填 广告标题(≤50)
content string Body 必填 广告内容(≤500)
link string Body 否 可选,跳转链接(≤300)
start_date string Body 必填 投放开始日期(Y-m-d)
end_date string Body 必填 投放结束日期(Y-m-d,不早于开始日期)
budget int Body 必填 预算(分)
image string Body 必填 广告图片完整 URL
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","status_label":"已发布"}}}

200 {"message":"已提交,等待审核","data":{"detail":{"id":"2","status":"pending","status_label":"待审核"}}}

422 {"msg":"投放结束日期不能早于开始日期"}

GET /api/publish-admin/ads/{id} 需登录 jwt.authpublish.admin

广告详情

参数类型位置必填说明
id int 路径 必填 广告ID

200 {"data":{"detail":{"id":"1","title":"中秋活动广告","status":"published","status_label":"已发布","budget":"3000.00"}}}

404 {"msg":"广告不存在"}

POST /api/publish-admin/ads/{id} 需登录 jwt.authpublish.admin

编辑广告(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

参数类型位置必填说明
id int 路径 必填 广告ID
title string Body 否 可选,广告标题
content string Body 否 可选,广告内容
link string Body 否 可选,跳转链接
start_date string Body 否 可选,投放开始日期(Y-m-d)
end_date string Body 否 可选,投放结束日期(Y-m-d)
budget int Body 否 可选,预算(分)
image string Body 否 可选,广告图片完整 URL
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","title":"中秋活动广告"}}}

404 {"msg":"广告不存在"}

POST /api/publish-admin/ads/{id}/audit 需登录 jwt.authpublish.admin

审核广告(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 广告ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见(≤200)

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

422 {"msg":"驳回时请填写审核意见"}

POST /api/publish-admin/ads/{id}/delete 需登录 jwt.authpublish.admin

删除广告

参数类型位置必填说明
id int 路径 必填 广告ID

200 {"message":"已删除","data":{"id":"1"}}

404 {"msg":"广告不存在"}

POST /api/publish-admin/ads/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架广告

参数类型位置必填说明
id int 路径 必填 广告ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","status_label":"已下架"}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/categories 需登录 jwt.authpublish.admin

内容分类列表(含子分类选项,如小游戏分类、小说分类)

无参数

200 {"data":[{"key":"ad","label":"广告","icon":"📢","desc":"发布广告内容","title":"广告","submit_text":"发布","sub_options":[]},{"key":"game","label":"小游戏","icon":"🎮","desc":"跳转H5小游戏","title":"小游戏","submit_text":"发布","sub_options":[{"value":"casual","label":"休闲"},{"value":"puzzle","label":"益智"}]}]}

GET /api/publish-admin/course-purchases 需登录 jwt.authpublish.admin

解锁记录列表(全站,可按课程与状态筛选)

参数类型位置必填说明
course_id int Query 否 可选,课程ID
user_id int Query 否 可选,解锁人 users.id
status string Query 否 可选,pending_pay/paid
keyword string Query 否 可选,按订单号或课程名搜索

200 {"data":{"list":[{"id":"1","purchase_no":"FBP20261021093000ABCD1234","course_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"course_name":"零基础短视频剪辑","price":3900,"price_text":"39.00","status":"paid","status_label":"已解锁","pay_type":"native","pay_type_label":"扫码付","payment_no":"4200001234202610210000000001","paid_at":"2026-10-21 09:31:00","created_at":"2026-10-21 09:30:00","course":{"id":"1","name":"零基础短视频剪辑","is_free":false,"price":3900,"status":"published"}}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/course-purchases/{id}/paid 需登录 jwt.authpublish.admin

确认收款(本地/线下收款兜底:支付回调缺失时由管理员推进,课程永久解锁)

参数类型位置必填说明
id int 路径 必填 解锁订单ID
transaction_id string Body 否 可选,微信支付单号

200 {"message":"已确认收款,课程已解锁","data":{"detail":{"id":"1","status":"paid","status_label":"已解锁","price_text":"39.00"}}}

404 {"msg":"解锁订单不存在"}

422 {"msg":"该订单不是待支付状态"}

GET /api/publish-admin/courses 需登录 jwt.authpublish.admin

课程列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
is_free integer Query 否 可选,1 只看免费课,0 只看付费课
keyword string Query 否 可选,按课程名、讲师或简介搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","name":"零基础短视频剪辑","teacher":"李老师","description":"从导入到导出全流程","duration":45,"video":"https://hiddcdn.zhiliao123.net/videos/1.mp4","video_url":"https://hiddcdn.zhiliao123.net/videos/1.mp4","cover":"https://hiddcdn.zhiliao123.net/images/1.jpg","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","is_free":false,"price":3900,"price_text":"39.00"}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/courses 需登录 jwt.authpublish.admin

发布课程(视频与封面先直传七牛,再填返回的完整 URL)

免费课 price 传 0;付费课 is_free 传 0 且 price 为分(≥1)。

参数类型位置必填说明
name string Body 必填 课程名称(≤60)
teacher string Body 必填 讲师(≤30)
description string Body 必填 课程简介(≤500)
duration int Body 必填 时长(分钟,≥1)
video string Body 必填 视频文件完整 URL
cover string Body 必填 封面图片完整 URL
is_free boolean Body 否 可选,1 免费课程(默认),0 付费解锁
price int Body 否 可选,解锁价格(分),付费课必填
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","is_free":false,"price_text":"39.00"}}}

422 {"msg":"付费课程的解锁价格必须大于 0"}

GET /api/publish-admin/courses/{id} 需登录 jwt.authpublish.admin

课程详情

参数类型位置必填说明
id int 路径 必填 课程ID

200 {"data":{"detail":{"id":"1","name":"零基础短视频剪辑","is_free":false,"price":3900,"price_text":"39.00"}}}

404 {"msg":"课程不存在"}

POST /api/publish-admin/courses/{id} 需登录 jwt.authpublish.admin

编辑课程(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

免费改付费后,此前已解锁的用户不受影响;待支付订单在下一次发起支付时会按最新价格刷新。

参数类型位置必填说明
id int 路径 必填 课程ID
name string Body 否 可选,课程名称
teacher string Body 否 可选,讲师
description string Body 否 可选,课程简介
duration int Body 否 可选,时长(分钟)
video string Body 否 可选,视频文件完整 URL
cover string Body 否 可选,封面图片完整 URL
is_free boolean Body 否 可选,1 免费,0 付费解锁
price int Body 否 可选,解锁价格(分)
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","price":4900,"price_text":"49.00"}}}

404 {"msg":"课程不存在"}

POST /api/publish-admin/courses/{id}/audit 需登录 jwt.authpublish.admin

审核课程(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 课程ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/courses/{id}/delete 需登录 jwt.authpublish.admin

删除课程(已有解锁记录时拒绝)

参数类型位置必填说明
id int 路径 必填 课程ID

200 {"message":"已删除","data":{"id":"1"}}

422 {"msg":"该课程已有 2 条解锁记录,不能删除"}

GET /api/publish-admin/courses/{id}/purchases 需登录 jwt.authpublish.admin

某个课程的解锁记录

参数类型位置必填说明
id int 路径 必填 课程ID
status string Query 否 可选,pending_pay/paid

200 {"data":{"list":[{"id":"1","purchase_no":"FBP20261021093000ABCD1234","course_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"course_name":"零基础短视频剪辑","price":3900,"price_text":"39.00","status":"paid","status_label":"已解锁","pay_type":"native","pay_type_label":"扫码付","payment_no":"4200001234202610210000000001","paid_at":"2026-10-21 09:31:00","created_at":"2026-10-21 09:30:00"}],"current_page":1,"last_page":1,"total":1,"course":{"id":"1","name":"零基础短视频剪辑","is_free":false}}}

404 {"msg":"课程不存在"}

POST /api/publish-admin/courses/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架课程(下架后不可再下单解锁)

参数类型位置必填说明
id int 路径 必填 课程ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","status_label":"已下架"}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/games 需登录 jwt.authpublish.admin

小游戏列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
category string Query 否 可选,休闲 casual/益智 puzzle/竞技 compete/角色扮演 role
keyword string Query 否 可选,按游戏名称或描述搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","name":"抢凳子","description":"经典休闲小游戏","url":"https://example.com/game/1","category":"casual","category_label":"休闲","tags":["闯关","简单"],"tags_text":"闯关、简单","cover":"https://hiddcdn.zhiliao123.net/images/1.jpg","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg"}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/games 需登录 jwt.authpublish.admin

发布小游戏(分类只能从 categories 接口返回的子分类里选,不能手填)

参数类型位置必填说明
name string Body 必填 游戏名称(≤50)
description string Body 必填 游戏描述(≤300)
url string Body 必填 H5 游戏链接(≤300)
category string Body 必填 游戏分类:casual/puzzle/compete/role
tags string Body 否 可选,标签,逗号分隔(≤100)
cover string Body 必填 封面图片完整 URL
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","tags":["闯关","简单"]}}}

422 {"msg":"validation"}

GET /api/publish-admin/games/{id} 需登录 jwt.authpublish.admin

小游戏详情

参数类型位置必填说明
id int 路径 必填 小游戏ID

200 {"data":{"detail":{"id":"1","name":"抢凳子","category":"casual","category_label":"休闲"}}}

404 {"msg":"小游戏不存在"}

POST /api/publish-admin/games/{id} 需登录 jwt.authpublish.admin

编辑小游戏(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

参数类型位置必填说明
id int 路径 必填 小游戏ID
name string Body 否 可选,游戏名称
description string Body 否 可选,游戏描述
url string Body 否 可选,H5 游戏链接
category string Body 否 可选,游戏分类
tags string Body 否 可选,标签,逗号分隔(整组覆盖)
cover string Body 否 可选,封面图片完整 URL
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","tags":["闯关"]}}}

404 {"msg":"小游戏不存在"}

POST /api/publish-admin/games/{id}/audit 需登录 jwt.authpublish.admin

审核小游戏(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 小游戏ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/games/{id}/delete 需登录 jwt.authpublish.admin

删除小游戏

参数类型位置必填说明
id int 路径 必填 小游戏ID

200 {"message":"已删除","data":{"id":"1"}}

404 {"msg":"小游戏不存在"}

POST /api/publish-admin/games/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架小游戏

参数类型位置必填说明
id int 路径 必填 小游戏ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","status_label":"已下架"}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/groupon-orders 需登录 jwt.authpublish.admin

团购订单列表

参数类型位置必填说明
status string Query 否 可选,pending_pay/paid/cancelled
groupon_id int Query 否 可选,团购ID
user_id int Query 否 可选,下单人 users.id
keyword string Query 否 可选,按订单号或团购标题搜索

200 {"data":{"list":[{"id":"1","order_no":"FBO20261021093000ABCD1234","groupon_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"groupon_title":"中秋礼盒 3 人成团","amount":9900,"amount_text":"99.00","status":"pending_pay","status_label":"待支付","pay_type":"native","pay_type_label":"扫码付","payment_no":"","paid_at":"","cancelled_at":"","created_at":"2026-10-21 09:30:00","groupon":{"id":"1","title":"中秋礼盒 3 人成团","stock":49,"sold_count":1,"min_people":3,"people_to_group":2,"is_grouped":false,"can_order":true}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish-admin/groupon-orders/stats 需登录 jwt.authpublish.admin

订单概览(各状态笔数与金额,金额单位分)

参数类型位置必填说明
groupon_id int Query 否 可选,只看某个团购

200 {"data":{"pending_pay":{"count":2,"amount":19800,"amount_text":"198.00"},"paid":{"count":1,"amount":9900,"amount_text":"99.00"},"cancelled":{"count":0,"amount":0,"amount_text":"0.00"},"groupon_total":3,"groupon_grouped":1}}

POST /api/publish-admin/groupon-orders/{id}/cancel 需登录 jwt.authpublish.admin

取消订单(仅待支付,取消即释放库存)

参数类型位置必填说明
id int 路径 必填 订单ID

200 {"message":"订单已取消,库存已释放","data":{"detail":{"id":"1","status":"cancelled","status_label":"已取消"},"groupon":{"id":"1","stock":50,"sold_count":0,"can_order":true}}}

404 {"msg":"订单不存在"}

422 {"msg":"只有待支付订单可以取消"}

POST /api/publish-admin/groupon-orders/{id}/paid 需登录 jwt.authpublish.admin

确认收款(本地/线下收款兜底:支付回调缺失时由管理员推进,订单计入成团人数)

参数类型位置必填说明
id int 路径 必填 订单ID
transaction_id string Body 否 可选,微信支付单号

200 {"message":"已确认收款","data":{"detail":{"id":"1","status":"paid","status_label":"已支付","amount_text":"99.00"},"groupon":{"id":"1","sold_count":3,"people_to_group":0,"is_grouped":true,"can_order":false}}}

404 {"msg":"订单不存在"}

422 {"msg":"该订单不是待支付状态"}

GET /api/publish-admin/groupons 需登录 jwt.authpublish.admin

团购列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
grouped integer Query 否 可选,1 只看已成团,0 只看未成团
keyword string Query 否 可选,按标题或描述搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","title":"中秋礼盒 3 人成团","description":"月饼加酒小礼盒","original_price":19900,"original_price_text":"199.00","group_price":9900,"group_price_text":"99.00","min_people":3,"stock":50,"sold_count":1,"people_to_group":2,"is_grouped":false,"grouped_at":"","image":"https://hiddcdn.zhiliao123.net/images/1.jpg","image_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","can_order":true}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/groupons 需登录 jwt.authpublish.admin

发布团购(金额单位为分,面板按元录入后换算)

参数类型位置必填说明
title string Body 必填 团购标题(≤60)
description string Body 必填 团购描述(≤500)
original_price int Body 必填 原价(分,≥1)
group_price int Body 必填 拼团价(分,≥1,不能高于原价)
min_people int Body 必填 成团人数(全场累计已支付人数达到即成团)
stock int Body 必填 库存(≥0,下单即扣)
image string Body 必填 商品图片完整 URL
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","stock":50,"sold_count":0,"people_to_group":3,"can_order":true}}}

422 {"msg":"拼团价不能高于原价"}

GET /api/publish-admin/groupons/{id} 需登录 jwt.authpublish.admin

团购详情

参数类型位置必填说明
id int 路径 必填 团购ID

200 {"data":{"detail":{"id":"1","title":"中秋礼盒 3 人成团","stock":50,"sold_count":1,"is_grouped":false,"can_order":true}}}

404 {"msg":"团购不存在"}

POST /api/publish-admin/groupons/{id} 需登录 jwt.authpublish.admin

编辑团购(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

stock 为绝对值覆盖(不是增量);已成团的团购不会再收单。

参数类型位置必填说明
id int 路径 必填 团购ID
title string Body 否 可选,团购标题
description string Body 否 可选,团购描述
original_price int Body 否 可选,原价(分)
group_price int Body 否 可选,拼团价(分)
min_people int Body 否 可选,成团人数
stock int Body 否 可选,库存(覆盖式)
image string Body 否 可选,商品图片完整 URL
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","stock":80}}}

404 {"msg":"团购不存在"}

POST /api/publish-admin/groupons/{id}/audit 需登录 jwt.authpublish.admin

审核团购(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 团购ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published","can_order":true}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/groupons/{id}/delete 需登录 jwt.authpublish.admin

删除团购(存在未取消订单时拒绝)

参数类型位置必填说明
id int 路径 必填 团购ID

200 {"message":"已删除","data":{"id":"1"}}

422 {"msg":"该团购已有 2 条订单,不能删除"}

POST /api/publish-admin/groupons/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架团购(下架后不可下单,已有订单不受影响)

参数类型位置必填说明
id int 路径 必填 团购ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","can_order":false}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/job-applications 需登录 jwt.authpublish.admin

投递列表(全站,可按岗位筛选;含投递人联系方式与简历)

参数类型位置必填说明
job_id int Query 否 可选,岗位ID
user_id int Query 否 可选,投递人 users.id
keyword string Query 否 可选,按姓名、手机号、岗位名或公司搜索

200 {"data":{"list":[{"id":"1","job_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"job_name":"前端工程师","company":"某某科技","name":"张小明","phone":"13800001111","message":"三年经验,可月底到岗","resume":"https://hiddcdn.zhiliao123.net/words/1.pdf","resume_url":"https://hiddcdn.zhiliao123.net/words/1.pdf","created_at":"2026-10-21 09:30:00","job":{"id":"1","job_name":"前端工程师","company":"某某科技","status":"published"}}],"current_page":1,"last_page":1,"total":1}}

GET /api/publish-admin/jobs 需登录 jwt.authpublish.admin

岗位列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
keyword string Query 否 可选,按岗位名、公司或城市搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","job_name":"前端工程师","company":"某某科技","salary":"15k-25k","location":"上海","requirement":"三年及以上经验","description":"负责业务前端开发","contact":"hr@example.com"}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/jobs 需登录 jwt.authpublish.admin

发布招聘信息

参数类型位置必填说明
job_name string Body 必填 岗位名称(≤50)
company string Body 必填 公司名称(≤100)
salary string Body 必填 薪资范围(≤30)
location string Body 必填 工作城市(≤100)
requirement string Body 必填 任职要求(≤500)
description string Body 必填 岗位描述(≤1000)
contact string Body 必填 联系方式(≤100)
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","job_name":"前端工程师"}}}

422 {"msg":"validation"}

GET /api/publish-admin/jobs/{id} 需登录 jwt.authpublish.admin

岗位详情

参数类型位置必填说明
id int 路径 必填 岗位ID

200 {"data":{"detail":{"id":"1","job_name":"前端工程师","company":"某某科技","status":"published"}}}

404 {"msg":"岗位不存在"}

POST /api/publish-admin/jobs/{id} 需登录 jwt.authpublish.admin

编辑岗位(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

参数类型位置必填说明
id int 路径 必填 岗位ID
job_name string Body 否 可选,岗位名称
company string Body 否 可选,公司名称
salary string Body 否 可选,薪资范围
location string Body 否 可选,工作城市
requirement string Body 否 可选,任职要求
description string Body 否 可选,岗位描述
contact string Body 否 可选,联系方式
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","salary":"20k-30k"}}}

404 {"msg":"岗位不存在"}

GET /api/publish-admin/jobs/{id}/applications 需登录 jwt.authpublish.admin

某个岗位的投递名单(后台查看联系方式与简历)

参数类型位置必填说明
id int 路径 必填 岗位ID

200 {"data":{"list":[{"id":"1","job_id":"1","user_id":"9480","user":{"id":"9480","name":"小明","avatar":""},"job_name":"前端工程师","company":"某某科技","name":"张小明","phone":"13800001111","message":"三年经验,可月底到岗","resume":"https://hiddcdn.zhiliao123.net/words/1.pdf","resume_url":"https://hiddcdn.zhiliao123.net/words/1.pdf","created_at":"2026-10-21 09:30:00"}],"current_page":1,"last_page":1,"total":1,"job":{"id":"1","job_name":"前端工程师","status":"published"}}}

404 {"msg":"岗位不存在"}

POST /api/publish-admin/jobs/{id}/audit 需登录 jwt.authpublish.admin

审核岗位(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 岗位ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/jobs/{id}/delete 需登录 jwt.authpublish.admin

删除岗位(已有投递时拒绝)

参数类型位置必填说明
id int 路径 必填 岗位ID

200 {"message":"已删除","data":{"id":"1"}}

422 {"msg":"该岗位已有 5 份投递,不能删除"}

POST /api/publish-admin/jobs/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架岗位(下架后不可再投递)

参数类型位置必填说明
id int 路径 必填 岗位ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","status_label":"已下架"}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/me 需登录 jwt.authpublish.admin

当前登录管理员

无参数

200 {"data":{"id":"9477","name":"测试管理员","isadmin":1}}

GET /api/publish-admin/musics 需登录 jwt.authpublish.admin

音乐列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
keyword string Query 否 可选,按歌名、歌手或专辑搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","name":"月亮代表我的心","singer":"邓丽君","album":"爱之旅","audio":"https://hiddcdn.zhiliao123.net/audios/1.mp3","audio_url":"https://hiddcdn.zhiliao123.net/audios/1.mp3","cover":"https://hiddcdn.zhiliao123.net/images/1.jpg","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg","lyrics":"轻风悠悠 月光如水"}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/musics 需登录 jwt.authpublish.admin

上架音乐(音频与封面先直传七牛,再填返回的完整 URL)

参数类型位置必填说明
name string Body 必填 歌名(≤50)
singer string Body 必填 歌手(≤50)
album string Body 否 可选,专辑名(≤50)
audio string Body 必填 音频文件完整 URL
cover string Body 必填 封面图片完整 URL
lyrics string Body 否 可选,歌词(≤2000)
auto_publish boolean Body 否 可选,1 直接上架(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","audio_url":"https://hiddcdn.zhiliao123.net/audios/1.mp3"}}}

422 {"msg":"validation"}

GET /api/publish-admin/musics/{id} 需登录 jwt.authpublish.admin

音乐详情

参数类型位置必填说明
id int 路径 必填 音乐ID

200 {"data":{"detail":{"id":"1","name":"月亮代表我的心","singer":"邓丽君","status":"published"}}}

404 {"msg":"音乐不存在"}

POST /api/publish-admin/musics/{id} 需登录 jwt.authpublish.admin

编辑音乐(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

参数类型位置必填说明
id int 路径 必填 音乐ID
name string Body 否 可选,歌名
singer string Body 否 可选,歌手
album string Body 否 可选,专辑名
audio string Body 否 可选,音频文件完整 URL
cover string Body 否 可选,封面图片完整 URL
lyrics string Body 否 可选,歌词(整段覆盖)
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","lyrics":"新的歌词"}}}

404 {"msg":"音乐不存在"}

POST /api/publish-admin/musics/{id}/audit 需登录 jwt.authpublish.admin

审核音乐(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 音乐ID
pass boolean Body 必填 1 通过并上架,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/musics/{id}/delete 需登录 jwt.authpublish.admin

删除音乐

参数类型位置必填说明
id int 路径 必填 音乐ID

200 {"message":"已删除","data":{"id":"1"}}

404 {"msg":"音乐不存在"}

POST /api/publish-admin/musics/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架音乐

参数类型位置必填说明
id int 路径 必填 音乐ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","status_label":"已下架"}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/novels 需登录 jwt.authpublish.admin

小说列表

参数类型位置必填说明
status string Query 否 可选,pending/published/offline/rejected
category string Query 否 可选,都市 city/玄幻 fantasy/仙侠 xianxia/穿越 travel/科幻 scifi/悬疑 suspense
keyword string Query 否 可选,按书名、作者或简介搜索

200 {"data":{"list":[{"id":"1","status":"published","status_label":"已发布","audit_remark":"","audited_at":"2026-10-21 10:00:00","published_at":"2026-10-21 10:00:00","sort":0,"publisher_id":"9477","publisher":{"id":"9477","name":"测试管理员","avatar":""},"created_at":"2026-10-21 09:00:00","updated_at":"2026-10-21 10:00:00","title":"都市之逆流人生","author":"佚名","category":"city","category_label":"都市","intro":"一个普通人的逆袭故事","url":"https://example.com/novel/1","cover":"https://hiddcdn.zhiliao123.net/images/1.jpg","cover_url":"https://hiddcdn.zhiliao123.net/images/1.jpg"}],"current_page":1,"last_page":1,"total":1}}

POST /api/publish-admin/novels 需登录 jwt.authpublish.admin

发布小说(分类只能从 categories 接口返回的子分类里选,不能手填)

参数类型位置必填说明
title string Body 必填 书名(≤50)
author string Body 必填 作者(≤30)
category string Body 必填 小说分类:city/fantasy/xianxia/travel/scifi/suspense
intro string Body 必填 简介(≤500)
url string Body 必填 H5 阅读链接(≤300)
cover string Body 必填 封面图片完整 URL
auto_publish boolean Body 否 可选,1 直接发布(自动审核通过)
sort int Body 否 可选,排序(升序,默认 0)

200 {"message":"已发布","data":{"detail":{"id":"1","status":"published","category_label":"都市"}}}

422 {"msg":"validation"}

GET /api/publish-admin/novels/{id} 需登录 jwt.authpublish.admin

小说详情

参数类型位置必填说明
id int 路径 必填 小说ID

200 {"data":{"detail":{"id":"1","title":"都市之逆流人生","category":"city","category_label":"都市"}}}

404 {"msg":"小说不存在"}

POST /api/publish-admin/novels/{id} 需登录 jwt.authpublish.admin

编辑小说(没传的字段保持原值;已驳回的内容保存后重新进入待审核)

参数类型位置必填说明
id int 路径 必填 小说ID
title string Body 否 可选,书名
author string Body 否 可选,作者
category string Body 否 可选,小说分类
intro string Body 否 可选,简介
url string Body 否 可选,H5 阅读链接
cover string Body 否 可选,封面图片完整 URL
sort int Body 否 可选,排序(升序)

200 {"message":"已保存","data":{"detail":{"id":"1","intro":"修改后的简介"}}}

404 {"msg":"小说不存在"}

POST /api/publish-admin/novels/{id}/audit 需登录 jwt.authpublish.admin

审核小说(仅待审核状态)

参数类型位置必填说明
id int 路径 必填 小说ID
pass boolean Body 必填 1 通过并发布,0 驳回
remark string Body 否 可选(驳回时必填),审核意见

200 {"message":"已通过审核并发布","data":{"detail":{"id":"1","status":"published"}}}

422 {"msg":"该内容不是待审核状态,无需审核"}

POST /api/publish-admin/novels/{id}/delete 需登录 jwt.authpublish.admin

删除小说

参数类型位置必填说明
id int 路径 必填 小说ID

200 {"message":"已删除","data":{"id":"1"}}

404 {"msg":"小说不存在"}

POST /api/publish-admin/novels/{id}/shelf 需登录 jwt.authpublish.admin

上架 / 下架小说

参数类型位置必填说明
id int 路径 必填 小说ID
published boolean Body 必填 1 上架,0 下架

200 {"message":"已下架","data":{"detail":{"id":"1","status":"offline","status_label":"已下架"}}}

422 {"msg":"只有已发布的内容可以下架"}

GET /api/publish-admin/users 需登录 jwt.authpublish.admin

搜索用户:按 users.id 或昵称关键词

参数类型位置必填说明
keyword string Query 必填 用户ID或昵称关键词

200 {"data":[{"id":"9480","name":"小明","avatar":"https://hiddcdn.zhiliao123.net/images/1.jpg"}]}