Cue 语音文档

懂的人自然懂


v2.4.3

<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;">原Config接口</td> <td style="text-align: left;">影响</td> </tr> </tbody> </table> <p><strong>具体列表内容客户端可拉取一下查看即可</strong></p> <pre><code class="language-go">type Config struct { ... AppleProducts []*Product `json:"apple_products,omitempty"` // 影响此结构 见下结构 AppleVersion string `json:"apple_version,omitempty"` AndroidProducts []*Product `json:"android_products,omitempty"`// 影响此结构 见下结构 ... } type Product struct { Id string `json:"id"` // 产品ID Type string `json:"type"` // coin:购买金币 vip:购买vip beans:金豆 [调整] Beans int `json:"beans"` // 金豆 [新增] Price float32 `json:"price"` // 金币价格 [调整] Desc string `json:"desc"` // 商品描述 }</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/getCurrency</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>入参: kind int // 货币类型 参见枚举 出参: amount int // 货币量</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/exchangeBeans</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>入参: productId string // 商品Id 出参: 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/account/beansBills2</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>入参(tip: 可参考 /v1/account/coinBills2): t:int min_date:int max_date:int offset_id:long limit:int 出参: type CCYBill2 struct { Kind int `json:"kind"` // 货币类型(后端开发文档/代币类型) Income int `json:"income"` // 总收入 Draw int `json:"draw"` // 总支出 Items []*CCYBill `json:"items"` // 参见下面结构 } type CCYBill struct { Id int64 `json:"id"` Type int `json:"type"` // 参考枚举 Text string `json:"text"` Income int `json:"income"` Time int `json:"time"` Arg1 int64 `json:"arg1"` Arg2 int64 `json:"arg2"` Balance int `json:"balance"` ShowType int `json:"show_type"` // 0:普通 1:礼物 GiftInfo *CoinGift `json:"giftInfo,omitempty"` // 礼物数据(当ShowType=1时有值) }</code></pre> <h1>通知货币发生变更[新增]</h1> <pre><code>ToGateReqId_UserDiamondChange int64 = -325 // 可以参考这个 ToGateReqId_UserCCYChange int64 = -330 // 用户代币变更 [新增] 协议结构: struct { Kind int `json:"kind"` // 货币种类 参见货币枚举(后端开发文档/代币类型) Amount int `json:"amount"`// 货币量 } </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/minePayPack</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>入参: 无 出参: nil 或者 如下结构: { Exist bool `json:"exist"` // 优先检测此字段 为true时 再取 pack Pack *proto.PayPack `json:"pack"` // 结构见下 } type PayPack struct { Id int `json:"id"` // 必须 1 2 3 ... 每一档+1 Name string `json:"name"` // 档位名称 VIPDays int `json:"vip_days"` // VIP天数 ADImage *Photo `json:"ad_img"` // AD图 Items []ItemAmount `json:"items"` // 赠送的商品 CCYs []CCYAmount `json:"ccys"` // 赠送的代币 IosOrderId string `json:"ios_order_id"` // IOS套餐Id AndOrderId string `json:"and_order_id"` // and套餐Id OffValue string `json:"off_value"` // 折扣值 } type ItemAmount struct { Id int `json:"id"` Amount int `json:"amount"` Durt_day int `json:"durt_day"` } type CCYAmount struct { Kind int `json:"kind"` Amount int `json:"amount"` } </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;">静态配置的结构</td> <td style="text-align: left;">影响 items 字段</td> </tr> </tbody> </table> <pre><code>// 按如下设计,适用于以下场景: 1 CCYKind = 0 &amp;&amp; CCYPrice = 0 &amp;&amp; Coin != 0 =&gt; 金币购买模式(主要起到兼容作用) 2 CCYKind != 0 &amp;&amp; CCYPrice != 0 &amp;&amp; Coin = 0 =&gt; 代币购买模式(比如 金豆) 3 CCYKind != 0 &amp;&amp; CCYPrice != 0 &amp;&amp; Coin != 0 =&gt; 多币条件购买(比如 10金币+10金豆) 4 CCYKind != 0 &amp;&amp; CCYPrice = 0 =&gt; 错误的配置 5 CCYKind = 0 &amp;&amp; CCYPrice != 0 =&gt; 等同于金币购买模式 // 商品配置 type Item struct { Id int `json:"id"` // 商品id Kind int `json:"kind"` // 商品分类 Type int `json:"type"` // 商品具体类型 Name string `json:"name"` // 名称 Desc string `json:"desc"` // 描述 Video *Video `json:"video"` // 预览图以及动效 CCYKind int `json:"ccy_kind"` // 货币类型(0是金币) CCYPrice int `json:"ccy_price"` // 价值货币 OldCoin int `json:"old_coin"` // 原价值金币 Coin int `json:"coin"` // 价值金币 ... } </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/item/getMallConfig</td> <td style="text-align: left;">根据新老版本返回不同数据</td> </tr> </tbody> </table> <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;">StaticConfig接口</td> <td style="text-align: left;">增加 item_class 字段</td> </tr> </tbody> </table> <pre><code> type StaticConfig struct { ... Item []*Item `json:"items,omitempty"` ItemClass []*ShopClass `json:"item_class,omitempty"` // 新增, 结构参见下面 ItemType []*ItemType `json:"item_types,omitempty"` ... } type ShopClass struct { Id int `json:"id"` Name string `json:"name"` Type int `json:"type"` // 商品具体类型 Background *Photo `json:"back"` // 背景图 Foreground *Photo `json:"fore"` // 前景图 UseCoin int `json:"use_coin"` // 支持金币购买 UseBean int `json:"use_bean"` // 支持金豆购买 }</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/item/buy</td> <td style="text-align: left;">支持新代币购买与赠送</td> </tr> </tbody> </table> <pre><code>入参: item_id int give_id string // 赠与谁 [新增] notify 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;">action:item.receive</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>type ItemReceive struct { Action string `json:"action"` // item.receive FromName string `json:"from"` // 赠送方昵称 RecvName string `json:"recv"` // 接收方昵称 ItemId int `json:"item_id"` // 商品Id ItemCoins int `json:"item_coin"` // 商品价值 ItemName string `json:"item_name"` // 商品名称 ItemSmallUrl string `json:"item_preview_url"` // 商品预览图 Title string `json:"title"` // 标题 Message string `json:"message"` // 内容 }</code></pre> <h1>Setting表支持商品类别[后台]</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/setting/save</td> <td style="text-align: left;">增加 key = shop_class</td> </tr> </tbody> </table> <pre><code>入参: key string // 增加 shop_class value string // 对应value为: List []*ShopClassItem // 结构如下: type ShopClassItem struct { Id int `json:"id"` // 可有可无 Name string `json:"name"` // 类别名称 NameTr string `json:"name_tr"` // 类别名称多语言key BackgroundLang map[string]int64 `json:"back_img_ml"` // 背景图_ml ForegroundLang map[string]int64 `json:"fore_img_ml"` // 前景图_ml UseCoin int `json:"use_coin"` // 支持金币购买 UseBean int `json:"use_bean"` // 支持金豆购买 } </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;">调整 item 表</td> <td style="text-align: left;">添加如下字段</td> </tr> </tbody> </table> <p><strong>目的: 让商城支持多代币进行购买, 其中 金币 作为主货币.</strong></p> <pre><code>-- 商品表增加两个字段 ALTER TABLE `winkchat`.`item` ADD COLUMN `ccy_kind` int(0) NOT NULL DEFAULT 0 COMMENT '货币类型' AFTER `video_id`, ADD COLUMN `ccy_price` int(0) NOT NULL DEFAULT 0 COMMENT '价值货币' AFTER `coin`; // 按如下设计,适用于以下场景: 1 CCYKind = 0 &amp;&amp; CCYPrice = 0 &amp;&amp; Coin != 0 =&gt; 金币购买模式(主要起到兼容作用) 2 CCYKind != 0 &amp;&amp; CCYPrice != 0 &amp;&amp; Coin = 0 =&gt; 代币购买模式(比如 金豆) 3 CCYKind != 0 &amp;&amp; CCYPrice != 0 &amp;&amp; Coin != 0 =&gt; 多币条件购买(比如 10金币+10金豆) 4 CCYKind != 0 &amp;&amp; CCYPrice = 0 =&gt; 错误的配置 5 CCYKind = 0 &amp;&amp; CCYPrice != 0 =&gt; 等同于金币购买模式 // 商品配置 type Item struct { Id int `json:"id"` // 商品id Kind int `json:"kind"` // 商品分类 Type int `json:"type"` // 商品具体类型 Name string `json:"name"` // 名称 Desc string `json:"desc"` // 描述 Video *Video `json:"video"` // 预览图以及动效 CCYKind int `json:"ccy_kind"` // 货币类型(0是金币) CCYPrice int `json:"ccy_price"` // 价值货币 OldCoin int `json:"old_coin"` // 原价值金币 Coin int `json:"coin"` // 价值金币 ... } </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/item/create</td> <td style="text-align: left;">添加如下字段</td> </tr> <tr> <td style="text-align: left;">/v1/sys/item/edit</td> <td style="text-align: left;">添加如下字段</td> </tr> </tbody> </table> <p><strong>目的: 让商城支持多代币进行购买, 其中 金币 作为主货币.</strong></p> <pre><code>// 入参: + ccy_kind int // 代币类型 参见 代币枚举 + ccy_price int // 代币价格 // 出参: 无改动</code></pre> <h1>Setting表支持充值礼包配置[后台]</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/setting/save</td> <td style="text-align: left;">增加 key = pay_pack</td> </tr> </tbody> </table> <pre><code>入参: key string // 增加 pay_pack value string // 对应value为: List []*PayPack `json:"list"` // 结构如下: type PayPack struct { Id int `json:"id"` // 必须 1 2 3 ... 每一档+1 Name string `json:"name"` // 档位名称 NameTr string `json:"name_tr"` // 档位名称多语言key ADImgLang map[string]int64 `json:"ad_img_ml"` // 广告图_ml VIPDays int `json:"vip_days"` // VIP天数 Items []ItemAmount `json:"items"` // 赠送的商品 CCYs []CCYAmount `json:"ccys"` // 赠送的代币 IosOrderId string `json:"ios_order_id"` // IOS套餐Id AndOrderId string `json:"and_order_id"` // and套餐Id OffValue string `json:"off_value"` // 折扣值 Remark string `json:"remark"` // 备注 } </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/item/mineBag</td> <td style="text-align: left;"></td> </tr> </tbody> </table> <pre><code>入参: typ int // 物品类型: 0:全部, 主类型参见下面枚举, -1 其他 { // 参见 后端开发文档/商城相关 ItemType_Ring = 1 // 戒指 ItemType_AvatarEffect = 2 // 头像框特效 ItemType_EnterRoomEffect = 3 // 进场特效 ItemType_P2PChatBubbleEffect = 4 // 私聊气泡特效 ItemType_RoomChatBubbleEffect = 5 // 聊天室聊天气泡特效 ItemType_RoomBackgroundEffect = 6 // 聊天室背景特效 ItemType_Mounts = 7 // 坐骑 进入特效,更炫酷 ItemType_VipUpEffect = 8 ItemType_SeatEffect = 9 // 房间特殊座位特效 ItemType_Bubble = 10 // 聊天气泡 ItemType_Gift = 99 // 礼物(可以拆开得到道具或者装扮) } 出参:(与 /v1/item/getBag 类似) type BagData struct {// 背包数据 Typ int `json:"typ"` // 商品分类 Items TItems `json:"items"` // 商品列表 } item 结构中新增字段: { Remain int `json:"rd,omitempty"` // 剩余时间(秒) }</code></pre> <h1>签到支持金豆奖励[调整+后台]</h1> <p><em>客户端需要考虑老版本兼容问题</em></p> <pre><code>type StaticConfig struct { ... SignDays []*SignDay `json:"sign_days"` // 影响此结构字段 ... } type SignDay struct { Items []*SignItem `json:"items"` } type SignItem struct { Type int `json:"type"` // 1 金币; 2 商城里面的物品; 3 礼物; 4 金豆 (!!!这里!!!) Name string `json:"name"` // 物品名称 Icon string `json:"icon"` // 图片url Count int `json:"count"` // 物品数量 }</code></pre> <h1>paymax支付接口[master]</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/paymax/signH5Order</td> <td style="text-align: left;">可参考 paypal 传参</td> </tr> </tbody> </table> <pre><code>// 入参: clientip string productid string callback string // 客户端支付完后的回调(必传) platform string // 平台 cc string // 国家码 大写(如果为空,则使用用户Id的国家码) way string // 支付方式, 必传, 参考申军的那张表. // 出参: payurl string // 收银台页面url</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/bank/userFrozenDiamond</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>// 入参: userIds []int64 // 主播Ids referDiamond int // 冻结条件值 // 出参: 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/bank/userFrozenClean</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code>// 入参: userIds []int64 // 主播Ids // 出参: bool</code></pre>

页面列表

ITEM_HTML