Cue 语音文档

懂的人自然懂


v2.3.6

<p>[TOC]</p> <hr /> <h1>App多语言简要流程</h1> <ul> <li>当app启动时 : <ul> <li>调用 /v1/user/langList, 拿到 自己应该使用的语言TheCode 和 系统支持的Code列表</li> <li>根据 TheCode 校验本地的语言包版本是否一致, 不一致则 调用 /v1/user/langPacket 拉取服务器上最新的语言包进行本地更新.</li> </ul></li> <li>app使用时: <ul> <li>调用 /v1/user/langShows 接口做 展示 与 语言切换. 客户端自行替换本地的 TheCode 值.</li> <li>同时检测 TheCode 对应的本地语言包版本, 不一致则调用 /v1/user/langPacket 拉取对应的最新语言包.</li> </ul></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;">/v1/user/langList</td> <td style="text-align: left;">不需要鉴权</td> </tr> </tbody> </table> <pre><code class="language-go"> // 请求参数(head 里面带上系统的 语言code 即可) with_pre int // 1:可拉取预览状态的语言包 // 应答数据 { code:string , // 客户端使用此语言Code list:[{ // app 支持的语言列表 code:string // 语言唯一标示Code version: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/user/langShows</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code class="language-go">// 请求参数 // 应答数据 List:[ { code :string // 语言唯一标示Code base :string // 译文 orig :string // 原生母语 } ]</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/user/langPacket</td> <td style="text-align: left;">不需要鉴权</td> </tr> </tbody> </table> <pre><code class="language-go">// 请求参数 code:string // 特定语言code 必传 // 应答数据 { code :string // 语言唯一标示Code content :string // 语言包内容 json KV 串 version :int32 // 此语言包版本 }</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/lang/create</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code class="language-go">入参: code:string 语言唯一标示Code 必传 l_orig:string 原生母语 show_list:string 此语言的展示列表(json串) already_base:string 需要附加到现有语言的 map json 串 state:int 状态(1:正常 2:失效) remark:string 备注 cont_file:int (1:有上传语言包文件,0:没上传) file:file (当cont_file为1时,进行文件解析) 出参: id:int64 主键id</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/lang/update</td> <td style="text-align: left;">无</td> </tr> </tbody> </table> <pre><code class="language-go"> 入参: id:int64 主键id 必传 // 下面的字段有值时则更新 code:string 语言唯一标示Code show_list:string 此语言的展示列表(json串) state:int 状态(1:正常 2:失效) remark:string 备注 cont_file:int (1:有上传语言包文件,0:没上传) file:file (当cont_file为1时,进行文件解析更新) 出参: # ok:bool </code></pre> <h1>房间自定义背景图</h1> <p>// 房间背景结构 roomBG# title:string photo:photo;</p> <p>// md5:上传文件的md5 // type:该文件上传用于:房间背景: background; user.checkFile# md5:string type:string = { exist:bool; // true -&gt; data:roomBG; false -&gt; data: {} data:roomBG; };</p> <h1>上传自定义房间背景</h1> <p>// upload.checkFile接口调用返回结果中exist为false时调用 upload.uploadRoomBG# photo:(Content-Disposition) = { roomBG; };</p> <h1>获取用户的自定义房间背景</h1> <p>// 现在需求为限一张自定义背景,保不齐以后会有什么需求,所以回的是一个数组 user.getRoomBG# = [roomBG];</p> <h1>新的Tag标签列表接口</h1> <pre><code>/v1/account/allTags = { tags : []*Tag // 所有项(这个结构跟之前的一样) uses : []int64 // 已选的Ids };</code></pre> <h1>我的钻石收益统计</h1> <pre><code>/v1/account/diamondBillsStatis = { today: int // 本日 week: int // 本周 month: int // 本月 last_month: int // 上月 }</code></pre> <h1>获取钻石明细筛选类型配置数据</h1> <pre><code>/v1/account/diamondBillsCondis = { [DiamondBillTyp] // 见下面结构 } type DiamondBillTyp struct { Typ string `json:"typ"` // 类型 Name string `json:"name"` // 对应名称 }</code></pre> <h1>钻石账单明细</h1> <pre><code>offset_id:钻石账单ID 时间范围[min_date, max_date) typ:筛选类型 /v1/account/diamondBills2 # typ:string min_date:int max_date:int offset_id:long limit:int = { Items []*DiamondBill `json:"items"` // 这个结构定义看下面 Income int `json:"income"` // 总收益 Draw int `json:"draw"` // 总提取 } type DiamondBill struct { Id int64 `json:"id"` Type string `json:"type"` Text string `json:"text"` Income int `json:"income"` Time int `json:"time"` Arg2 int64 `json:"arg2"` Balance int `json:"balance"` ShowType int `json:"show_type"` // 0:普通 1:礼物 GiftInfo *DiamondGift `json:"giftInfo,omitempty"` // 礼物数据(当ShowType=1时有值) } type DiamondGift struct { FromId string `json:"from_id"` // 赠送者Id FromName string `json:"from_name"` // 赠送者名字 GiftId int `json:"gift_id"` // 礼物Id Amount int `json:"amount"` // 赠送数量 Name string `json:"name"` // 礼物名称 } </code></pre> <h1>金币账单明细</h1> <pre><code>参数参考 钻石账单明细 接口, t:类型 /v1/account/coinBills2 # t:int min_date:int max_date:int offset_id:long limit:int = { Items []*CoinBill `json:"items"` Income int `json:"income"` // 总收入 Draw int `json:"draw"` // 总支出 } type CoinBill struct { Id int64 `json:"id"` Type string `json:"type"` Text string `json:"text"` Income int `json:"income"` Time int `json:"time"` Arg1 int64 `json:"arg1"` Balance int `json:"balance"` ShowType int `json:"show_type"` // 0:普通 1:礼物 GiftInfo *CoinGift `json:"giftInfo,omitempty"` // 礼物数据(当ShowType=1时有值) } type CoinGift struct { ToId string `json:"to_id"` // 打赏者Id ToName string `json:"to_name"` // 打赏者名字 GiftId int `json:"gift_id"` // 礼物Id Amount int `json:"amount"` // 赠送数量 Name string `json:"name"` // 礼物名称 } </code></pre> <h1>/account/(getWallet) 接口新增以下字段</h1> <pre><code> EnDrawal int `json:"en_drawal"` // 0:不可提现 1:可提现 </code></pre> <h1>/v1/sys/app/enDrawal 修改app是否可以提现</h1> <pre><code> redis key: app_en_drawal 入参: val:int (0:不可提现, 1:可提现) 出参: bool</code></pre> <h1>物品表支持多语言字段</h1> <pre><code>/v1/sys/item/create 增加参数 name_lang:string(json) desc_lang:string(json) /v1/sys/item/edit 增加参数 name_lang:string(json) desc_lang:string(json)</code></pre>

页面列表

ITEM_HTML