v2.4.1
<p>[TOC]</p>
<h1>发布时注意事项</h1>
<ul>
<li>后台需要对礼物配置支持新增字段(动效和声音)</li>
<li>后台配置VIP套餐时,Id形式需要为:com.innovworks.winkchat.coin.vip90 以及类型为: cvip</li>
</ul>
<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;">静态配置接口</td>
<td style="text-align: left;">影响接口</td>
</tr>
<tr>
<td style="text-align: left;">/v1/gift/getDetail</td>
<td style="text-align: left;">影响接口</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">// 客户端代码中检索一下两个结构 适配新字段
type Gift struct {
Id int `json:"id"`
Name string `json:"name"`
Video *Video `json:"video"`
Coin int `json:"coin"`
Diamond int `json:"diamond"`
Hot bool `json:"hot"`
Charm int `json:"charm"`
Width int `json:"width"`
Height int `json:"height"`
Channel int `json:"channel"`
Gossip bool `json:"gossip"`
Animated bool `json:"animated"` // 带动画 ++
Sounded bool `json:"sounded"` // 带声音 ++
SponsorId int `json:"sponsor_id"`
Status int `json:"status"`
}
type GiftDetail struct {
Id int `json:"id"`
Name string `json:"name"`
Des string `json:"des"`
Video *Video `json:"video"`
Coin int `json:"coin"`
Diamond int `json:"diamond"`
Hot bool `json:"hot"`
Charm int `json:"charm"`
Width int `json:"width"`
Height int `json:"height"`
Gossip bool `json:"gossip"`
Animated bool `json:"animated"` // 带动画 ++
Sounded bool `json:"sounded"` // 带声音 ++
Status int `json:"status"`
StatusTxt string `json:"statxt"`
}
</code></pre>
<h1>消息页面[协议调整]</h1>
<ul>
<li><strong>感知动态红点</strong></li>
</ul>
<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/notification/unreadCount</td>
<td style="text-align: left;">参数扩展</td>
</tr>
<tr>
<td style="text-align: left;">/v1/feed/searchFollow</td>
<td style="text-align: left;">影响接口</td>
</tr>
<tr>
<td style="text-align: left;">/v1/feed/create</td>
<td style="text-align: left;">影响接口</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">// 入参:
types []int // 新增 NotifyType_FoFeed,见下enum:
const (
NotifyType_Like = 1 // 点赞了你的动态
NotifyType_Apply = 2 // 报名了活动
NotifyType_Comment = 3 // 新的评论
NotifyType_Talked = 4 // 聊过的人
NotifyType_LikeMe = 5 // 有人喜欢我
NotifyType_Follow = 6 // 有人关注我
NotifyType_FoFeed = 7 // 关注的人有新动态 ++
)</code></pre>
<ul>
<li><strong>将like内 点赞消息 合并到 comments 内显示 按时间排序</strong></li>
</ul>
<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/notification/search</td>
<td style="text-align: left;">增加参数</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">// 入参:
type int // 类型 (原字段不做调整,兼容)
types []int // ++ 类型数组 (新增字段)
// 出参:
兼容老版本不做调整.</code></pre>
<h1>VIP金币购买[新增|调整]</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/account/buyVIP</td>
<td style="text-align: left;">新增接口</td>
</tr>
<tr>
<td style="text-align: left;">/v1/sys/product/get</td>
<td style="text-align: left;">影响接口</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">// 入参:
productId string // 套餐id
s_receiverId string // 赠与谁(默认为空)
receiverMsg string // 赠送时通知对方的 内容
// 出参
ok:bool</code></pre>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">进入游戏时的Config结构中的Product结构</td>
<td style="text-align: left;">type字段增加含义</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">type Product struct {
Id string `json:"id"` // 产品ID
Type string `json:"type"` // *coin:购买金币; vip:购买vip; cvip:用金币购买vip(新增)
OldCoin int `json:"old_coin"` // 原金币
Coin int `json:"coin"` // 金币数
Price float32 `json:"price"` // *现价 (当type = cvip 时,此字段作为购买所需金币数)
...
}</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/account/validCredit</td>
<td style="text-align: left;">新增接口</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">// 入参: 无
// 出参:
ok:bool // 为true表示正常, false表示失信</code></pre>