v2.5.0
<p>[toc]</p>
<h1>✅游客增加国家字段参数</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/redirect/scfg</td>
<td style="text-align: left;">增加入参</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
cc string // 国家码 提取规则:读取本机国家码设置值</code></pre>
<h1>✅[APP]获取自己房间的封面</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/user/getRoomCover</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参 无
// 出参
返回如下结构(复用已存在图片结构):
type Photo struct {
Id int64 `json:"id"`
SmallUrl string `json:"small_url"`
BigUrl string `json:"big_url"`
Hash string `json:"hash"`
W int `json:"w,omitempty"`
H int `json:"h,omitempty"`
}
</code></pre>
<h1>✅[APP]获取直播活动相关的配置</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">login 和 /v1/help/getConfig</td>
<td style="text-align: left;">影响,新增字段</td>
</tr>
</tbody>
</table>
<pre><code>{
DefaultRing int `json:"default_ring,omitempty"` // 默认戒指id
H4 bool `json:"h4"` // 是否使用agora
H5 bool `json:"h5"` // 青少年模式是否每次都弹
LiveActive *LiveActiveCfg `json:"live_active"` // 直播间活动相关的配置 [新增] 结构参见下面:
}
type LiveActiveCfg struct {
PubPrice int `json:"pub_Price"` // 发布价格(金币)
WaitDays int `json:"wait_Days"` // 等待工作日
ExceedDays int `json:"exceed_Days"` // 活动开始时间超过几天
Coexist int `json:"coexist"` // 同时存在的有效活动限制数量
}</code></pre>
<h1>✅[APP]进入房间时得到当前正在进行的活动</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/room/enter</td>
<td style="text-align: left;">影响,新增当前活动字段</td>
</tr>
</tbody>
</table>
<pre><code>// 出参
type Room_Entered struct {
...
Ludo *LudoGame `json:"ludo,omitempty"`
VipSeat *VipSeatTL `json:"vip_seat"`
RunActive *LiveActiveItem `json:"run_active,omitempty"` // [新增] 结构参见 /v1/liveActive/list
}</code></pre>
<h1>✅[APP]发现页接口调整</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">v1/room/discover</td>
<td style="text-align: left;">增加字段</td>
</tr>
</tbody>
</table>
<pre><code>// 出参
{
Actives []*proto.LiveActiveItem `json:"actives"` // 活动列表,结构参考/v1/liveActive/list [新增]
Banners []*proto.Banner `json:"banners"`
Rooms []*proto.PopularTLRoom `json:"rooms"`
}</code></pre>
<h1>✅[App]直播间活动列表</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/liveActive/list</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
page int // 页码(从1开始)
pnum int // 单页数量(默认10)
// 出参
{
Items []LiveActiveItem `json:"items"`// 列表,结构参见下面
}
type LiveActiveItem struct {
Id int64 `json:"id"` // 活动Id
UserId string `json:"user_id"` // 创建人
RoomId int64 `json:"room_id"` // 房间Id
Title string `json:"title"` // 标题
Info string `json:"info"` // 说明
PhotoSmallUrl string `json:"small_url"` // 活动宣传图
PhotoBigUrl string `json:"big_url"` // 活动宣传图
SoonSec int64 `json:"soon_sec"` // 活动还有多久开始
HoldSec int64 `json:"hold_sec"` // 活动持续多久
Subers int32 `json:"subers"` // 订阅人数
Subed int32 `json:"subed"` // 当前活动自己是否已订阅
RunState int32 `json:"run_state"` // 运行时状态: 1:未开始; 2:正在进行; 3: 已结束
AuditState int32 `json:"audit_state"` // 审核状态: 1:审核中; 2:通过; 3: 驳回
}</code></pre>
<h1>✅[App]我发布的直播间活动列表</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/liveActive/mine</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
all int // 0:不包含已结束的; 1: 所有的
page int // 页码(从1开始)
pnum int // 单页数量(默认10)
// 出参
{
Items []LiveActiveItem // 列表,结构参见/v1/liveActive/list接口
}</code></pre>
<h1>✅[App]我订阅的直播间活动列表</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/liveActive/subs</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
page int // 页码(从1开始)
pnum int // 单页数量(默认10)
// 出参
{
Items []LiveActiveItem // 列表,结构参见/v1/liveActive/list接口
}</code></pre>
<h1>✅[App]创建直播间活动</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/liveActive/create</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
title string // 活动标题
info string // 活动说明
soonSec int64 // = 活动开始时间 - 当前时间
holdSec int64 // 活动持续时间
photoId int64 // 活动图片Id (默认图片调用/v1/user/getRoomCover获取)
// 出参
ok int // 0:失败 1:成功 </code></pre>
<h1>✅[App]订阅与反订阅直播间活动</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/liveActive/subscribe</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
activeId int64 // 活动id
action int // 1 订阅, 2: 取消订阅
// 出参
n int // 此活动的最新订阅量</code></pre>
<h1>✅[App]推送直播间状态</h1>
<p><strong>推送至本房间所有人</strong></p>
<pre><code class="language-go">// room.liveActiveState
type LiveActiveState struct {
Super
State int `json:"state"` // 1: 活动激活了(小于1小时开播); 2:开始了; 3: 结束了(此时 active 字段不存在);
Active *proto.LiveActiveItem `json:"active"` // 结构参考 /v1/liveActive/list
}</code></pre>
<h1>✅[App]查询游戏列表</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/room/gameList</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
cc string // 国家代码
// 出参
type manage struct {
GameName string `json:"game_name"` // 游戏名称
Weight int `json:"weight"` // 权重
GameUrl string `json:"game_url"` // 游戏地址
GameType int `json:"game_type"` // 游戏类型
GameChannel int `json:"game_channel"` // 1本地游戏 2H5游戏 3外部H5游戏
Shortcut bool `json:"shortcut"` // 是否快捷键展示
PopComing string `json:"pop_coming"` // 弹窗Icon未开始
PopGoing string `json:"pop_going"` // 弹窗Icon已开始
ShortcutComing string `json:"shortcut_coming"` // 快捷键Icon未开始
ShortcutGoing string `json:"shortcut_going"` // 快捷键Icon已开始
}
[]manage{}
</code></pre>
<h1>✅[后台]更新直播间活动状态</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/sys/liveActive/audit</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
id := md.Get("id").Int64() // 活动id
state := md.Get("state").Int32() // 状态 (1:审核中,2:通过,3:拒绝)
content := md.Get("content").String() // 通过或者拒绝的说明,给用户发送系统通知由服务端来做.
// 出参
ok bool </code></pre>
<h1>✅[后台]游戏管理信息</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/sys/gameManage/create</td>
<td style="text-align: left;">创建游戏管理信息</td>
</tr>
<tr>
<td style="text-align: left;">/v1/sys/gameManage/update</td>
<td style="text-align: left;">更新游戏管理信息</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
key: data
value:
type GameManage struct {
Id int `json:"id"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
GameName string `json:"game_name"` // 游戏名称
Weight int `json:"weight"` // 权重
PopComing int64 `json:"pop_coming"` // 弹窗Icon未开始
PopGoing int64 `json:"pop_going"` // 快捷键Icon已开始
ShortcutComing int64 `json:"shortcut_coming"` // 弹窗Icon未开始
ShortcutGoing int64 `json:"shortcut_going"` // 快捷键Icon已开始
GameUrl string `json:"game_url"` // 游戏地址
Country []string `json:"country"` // 国家
Platform map[string]string `json:"platform"` // 平台
State bool `json:"state"` // false禁用 true启用
OpenTime [][]int64 `json:"open_time"` // 开启时间
GameType int `json:"game_type"` // 游戏类型
GameTypeStr string `json:"game_type_str"` // 游戏类型
Shortcut bool `json:"shortcut"` // 是否快捷键展示
GameChannel int `json:"game_channel"` // 1本地游戏 2H5游戏 3外部H5游戏
}
// 出参
ok bool </code></pre>
<h1>✅[后台]删除游戏管理信息</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/sys/gameManage/delete</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 入参
id int
// 出参
ok bool </code></pre>
<h1>✅[后台]查询游戏管理信息列表</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/sys/gameManage/list</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code>// 出参
[]GameManage
字段信息见 游戏管理信息</code></pre>