新增查询绑定结果接口(自建发货页轮询角色信息)

- GET /api/client/v1/orders/{order_no}/delivery/bind-result?bind_uuid=xxx
- 返回 bound/game_account/role_name/game_channel;未绑定返回 bound=false(不报错,供轮询)
- 对接文档自建发货页模式新增该接口,注明轮询建议间隔
This commit is contained in:
yml2213
2026-08-03 17:10:50 +08:00
parent 8da9dcec43
commit 19ada1282e
4 changed files with 91 additions and 3 deletions
+35
View File
@@ -359,6 +359,41 @@ export const endpoints: EndpointSpec[] = [
'同一订单重复绑定时,请以最新返回的绑定凭证为准。',
],
},
{
key: 'delivery-bind-result',
group: 'delivery-self',
method: 'GET',
path: '/api/client/v1/orders/{order_no}/delivery/bind-result',
title: '查询绑定结果',
summary: '查询绑定状态与角色信息(自建发货页轮询用),未绑定时返回 bound=false',
scope: 'orders:read 或 shipping:read',
pathParams: [{ name: 'order_no', type: 'string', required: true, desc: '平台订单号', example: 'FO20260730000123' }],
queryParams: [{ name: 'bind_uuid', type: 'string', required: true, desc: '发起绑定时返回的绑定凭证', example: 'bind-123' }],
responseExample: `{
"code": 0,
"message": "ok",
"data": {
"bind_uuid": "bind-123",
"bound": true,
"game_account": "4808146277",
"role_name": "巫师哈丁12",
"game_channel": "IOS-微信",
"message": "绑定成功"
}
}`,
responseFields: [
{ name: 'bind_uuid', type: 'string', desc: '绑定凭证' },
{ name: 'bound', type: 'bool', desc: '是否已完成绑定' },
{ name: 'game_account', type: 'string', desc: '玩家编号(已绑定时返回)' },
{ name: 'role_name', type: 'string', desc: '角色名(已绑定时返回)' },
{ name: 'game_channel', type: 'string', desc: '区服渠道(已绑定时返回)' },
{ name: 'message', type: 'string', desc: '状态说明' },
],
notes: [
'用户扫码绑定完成前返回 bound=false,自建页可定时轮询此接口刷新状态。',
'轮询间隔建议 2-3 秒,绑定成功后展示角色信息并引导提交发货。',
],
},
{
key: 'delivery-submit',
group: 'delivery-self',