# TSRPC API 接口文档 ## 通用说明 - 所有请求方法均为 `POST` - 所有请求均需加入以下 Header : - `Content-Type: application/json` ## 目录 - admin - [addBuMa](#/admin/addBuMa) - [addCode](#/admin/addCode) - [addMail](#/admin/addMail) - [cacheVer](#/admin/cacheVer) - [deleteCode](#/admin/deleteCode) - [deleteMail](#/admin/deleteMail) - [deleteQuFu](#/admin/deleteQuFu) - [deleteSetting](#/admin/deleteSetting) - [getCode](#/admin/getCode) - [getCodeMa](#/admin/getCodeMa) - [getMail](#/admin/getMail) - [getNeed](#/admin/getNeed) - [getQuFu](#/admin/getQuFu) - [getSetting](#/admin/getSetting) - [getVer](#/admin/getVer) - [huodongAdd](#/admin/huodongAdd) - [huodongDelete](#/admin/huodongDelete) - [huodongEdit](#/admin/huodongEdit) - [huodongFind](#/admin/huodongFind) - [请求接口](#/admin/roleData) - [请求接口](#/admin/roleDataEdit) - [请求接口](#/admin/sevData) - [请求接口](#/admin/sevDataEdit) - [updateMail](#/admin/updateMail) - [updateQuFu](#/admin/updateQuFu) - [updateSetting](#/admin/updateSetting) - [xiazai](#/admin/xiazai) - chat - [请求接口](#/chat/ChatSend) - eps - [获取属性信息](#/eps/EpsInfo) - fight - [请求接口 合成战斗](#/fight/FightHc) - [请求接口](#/fight/FightTest) - hc - [请求接口 点击发射器](#/hc/HcEmit) - [获取合成信息](#/hc/HcInfo) - [点击两个格子合成](#/hc/HcMerge) - [请求接口 出售](#/hc/HcSell) - item - [获取道具信息](#/item/ItemInfo) - mail - [请求接口](#/mail/MailDelAll) - [请求接口](#/mail/MailDelOne) - [请求邮件信息](#/mail/MailInfo) - [请求接口](#/mail/MailRwdAll) - [请求接口](#/mail/MailRwdOne) - plat - [平台登录](#/plat/PlatLogin) - player - [账号登录](#/player/PlayerLogin) - task - [获取主线任务](#/task/TaskInfo) - [请求领取任务奖励](#/task/TaskRwd) - user - [角色登录](#/user/UserLogin) - [请求接口 获取内部公告](#/user/UserNotices) - [角色改名](#/user/UserSetName) - [请求接口 使用兑换码](#/user/UserUseCode) --- ## admin ### addBuMa **路径** - POST `/admin/addBuMa` **请求** ```ts interface ReqaddBuMa { id: string, addCount: number } ``` **响应** ```ts interface ResaddBuMa { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### addCode **路径** - POST `/admin/addCode` **请求** ```ts interface ReqaddCode { param: any } ``` **响应** ```ts interface ResaddCode { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### addMail **路径** - POST `/admin/addMail` **请求** ```ts interface ReqaddMail { params: any } ``` **响应** ```ts interface ResaddMail { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### cacheVer **路径** - POST `/admin/cacheVer` **请求** ```ts interface ReqcacheVer { } ``` **响应** ```ts interface RescacheVer { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### deleteCode **路径** - POST `/admin/deleteCode` **请求** ```ts interface ReqdeleteCode { id: string } ``` **响应** ```ts interface ResdeleteCode { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### deleteMail **路径** - POST `/admin/deleteMail` **请求** ```ts interface ReqdeleteMail { id: string } ``` **响应** ```ts interface ResdeleteMail { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### deleteQuFu **路径** - POST `/admin/deleteQuFu` **请求** ```ts interface ReqdeleteQuFu { sid: string } ``` **响应** ```ts interface ResdeleteQuFu { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### deleteSetting **路径** - POST `/admin/deleteSetting` **请求** ```ts interface ReqdeleteSetting { key: string } ``` **响应** ```ts interface ResdeleteSetting { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getCode **路径** - POST `/admin/getCode` **请求** ```ts interface ReqgetCode { } ``` **响应** ```ts interface ResgetCode { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getCodeMa **路径** - POST `/admin/getCodeMa` **请求** ```ts interface ReqgetCodeMa { id: string } ``` **响应** ```ts interface ResgetCodeMa { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getMail **路径** - POST `/admin/getMail` **请求** ```ts interface ReqgetMail { } ``` **响应** ```ts interface ResgetMail { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getNeed **路径** - POST `/admin/getNeed` **请求** ```ts interface ReqgetNeed { stime: number, timeInterval: number } ``` **响应** ```ts interface ResgetNeed { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getQuFu **路径** - POST `/admin/getQuFu` **请求** ```ts interface ReqgetQuFu { } ``` **响应** ```ts interface ResgetQuFu { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getSetting **路径** - POST `/admin/getSetting` **请求** ```ts interface ReqgetSetting { } ``` **响应** ```ts interface ResgetSetting { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### getVer **路径** - POST `/admin/getVer` **请求** ```ts interface ReqgetVer { } ``` **响应** ```ts interface ResgetVer { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### huodongAdd **路径** - POST `/admin/huodongAdd` **请求** ```ts interface ReqhuodongAdd { params: any } ``` **响应** ```ts interface ReshuodongAdd { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### huodongDelete **路径** - POST `/admin/huodongDelete` **请求** ```ts interface ReqhuodongDelete { id: string } ``` **响应** ```ts interface ReshuodongDelete { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### huodongEdit **路径** - POST `/admin/huodongEdit` **请求** ```ts interface ReqhuodongEdit { id: string, params: any } ``` **响应** ```ts interface ReshuodongEdit { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### huodongFind **路径** - POST `/admin/huodongFind` **请求** ```ts interface ReqhuodongFind { key?: string, hdcid?: string } ``` **响应** ```ts interface ReshuodongFind { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### 请求接口 **路径** - POST `/admin/roleData` **请求** ```ts interface ReqroleData { uuid: string } ``` **响应** ```ts interface ResroleData { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### 请求接口 **路径** - POST `/admin/roleDataEdit` **请求** ```ts interface ReqroleDataEdit { key1: string, key2: string, info: any } ``` **响应** ```ts interface ResroleDataEdit { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### 请求接口 **路径** - POST `/admin/sevData` **请求** ```ts interface ReqsevData { kid: string, sid: string } ``` **响应** ```ts interface RessevData { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### 请求接口 **路径** - POST `/admin/sevDataEdit` **请求** ```ts interface ReqsevDataEdit { key1: string, key2: string, info: string } ``` **响应** ```ts interface RessevDataEdit { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### updateMail **路径** - POST `/admin/updateMail` **请求** ```ts interface RequpdateMail { id: string, params: any } ``` **响应** ```ts interface ResupdateMail { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### updateQuFu **路径** - POST `/admin/updateQuFu` **请求** ```ts interface RequpdateQuFu { sid: string, param: { [key: string]: any } } ``` **响应** ```ts interface ResupdateQuFu { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### updateSetting **路径** - POST `/admin/updateSetting` **请求** ```ts interface RequpdateSetting { key: string, param: any } ``` **响应** ```ts interface ResupdateSetting { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ### xiazai **路径** - POST `/admin/xiazai` **请求** ```ts interface Reqxiazai { id: string } ``` **响应** ```ts interface Resxiazai { order10Back: any } ``` **配置** ```ts { "connet": "admin" } ``` --- ## chat ### 请求接口 **路径** - POST `/chat/ChatSend` **请求** ```ts interface ReqChatSend { type: "hefu", str: string } ``` **响应** ```ts interface ResChatSend { [key: string]: { id: number, type: "hefu", fuuid: string, fuser: { uuid: string, sid: string, name: string, head: string, wxhead: string, sex: number, level: number, exp: number, power: number }, msg: string, time: number } } ``` **配置** ```ts { "connet": "ws" } ``` --- ## eps ### 获取属性信息 **路径** - POST `/eps/EpsInfo` **请求** ```ts interface ReqEpsInfo { } ``` **响应** ```ts interface ResEpsInfo { [key: string]: number } ``` **配置** ```ts { "connet": "ws" } ``` --- ## fight ### 请求接口 合成战斗 **路径** - POST `/fight/FightHc` **请求** ```ts interface ReqFightHc { gzid: string } ``` **响应** ```ts interface ResFightHc { list: { [key: string]: { type: 0 | 2 | 3 | 4 | 50 | 51, unlock: 1 | 0, correlationId: number, emitter?: { unlock: 1 | 0 } } }, /** 战斗初始阵容 */ fightStart: { from: string, seed: number, teams: { [key: string]: { fid: string, seat: number, eps: { [key: string]: number } } } }, win: number, log: { [key: string]: { /** 战斗动作类型 */ aType: "wu" | "0" | "1" | "2" | "3" | "999", seat: number, /** 日志格式 */ atker: { iid: string, hp: number, buff: [string, number][], effect: [string, number][] }, target: { iid: string, hp: number, buff: [string, number][], effect: [string, number][] }[] }[] } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 **路径** - POST `/fight/FightTest` **请求** ```ts interface ReqFightTest { } ``` **响应** ```ts interface ResFightTest { /** 战斗初始阵容 */ fightStart: { from: string, seed: number, teams: { [key: string]: { fid: string, seat: number, eps: { [key: string]: number } } } }, win: number, log: { [key: string]: { /** 战斗动作类型 */ aType: "wu" | "0" | "1" | "2" | "3" | "999", seat: number, /** 日志格式 */ atker: { iid: string, hp: number, buff: [string, number][], effect: [string, number][] }, target: { iid: string, hp: number, buff: [string, number][], effect: [string, number][] }[] }[] } } ``` **配置** ```ts { "connet": "ws" } ``` --- ## hc ### 请求接口 点击发射器 **路径** - POST `/hc/HcEmit` **请求** ```ts interface ReqHcEmit { gzid: string } ``` **响应** ```ts interface ResHcEmit { [key: string]: { type: 0 | 2 | 3 | 4 | 50 | 51, unlock: 1 | 0, correlationId: number, emitter?: { unlock: 1 | 0 } } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 获取合成信息 **路径** - POST `/hc/HcInfo` **请求** ```ts interface ReqHcInfo { } ``` **响应** ```ts interface ResHcInfo { chapterId: number, tili: number, maxTili: number, lastTime: number, list: { [key: string]: { type: 0 | 2 | 3 | 4 | 50 | 51, unlock: 1 | 0, correlationId: number, emitter?: { unlock: 1 | 0 } } } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 点击两个格子合成 **路径** - POST `/hc/HcMerge` **请求** ```ts interface ReqHcMerge { gzid1: string, gzid2: string } ``` **响应** ```ts interface ResHcMerge { list: { [key: string]: { type: 0 | 2 | 3 | 4 | 50 | 51, unlock: 1 | 0, correlationId: number, emitter?: { unlock: 1 | 0 } } }, items: number[][] } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 出售 **路径** - POST `/hc/HcSell` **请求** ```ts interface ReqHcSell { gzid: string } ``` **响应** ```ts interface ResHcSell { list: { [key: string]: { type: 0 | 2 | 3 | 4 | 50 | 51, unlock: 1 | 0, correlationId: number, emitter?: { unlock: 1 | 0 } } }, items: number[][] } ``` **配置** ```ts { "connet": "ws" } ``` --- ## item ### 获取道具信息 **路径** - POST `/item/ItemInfo` **请求** ```ts interface ReqItemInfo { } ``` **响应** ```ts interface ResItemInfo { [key: string]: number[] } ``` **配置** ```ts { "connet": "ws" } ``` --- ## mail ### 请求接口 **路径** - POST `/mail/MailDelAll` **请求** ```ts interface ReqMailDelAll { } ``` **响应** ```ts interface ResMailDelAll { [key: string]: { ets: number } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 **路径** - POST `/mail/MailDelOne` **请求** ```ts interface ReqMailDelOne { id: string } ``` **响应** ```ts interface ResMailDelOne { [key: string]: { ets: number } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求邮件信息 **路径** - POST `/mail/MailInfo` **请求** ```ts interface ReqMailInfo { } ``` **响应** ```ts interface ResMailInfo { [key: string]: { id: string, title: string, content: string, items: number[][], fts: number, rts: number, ets: number, dts: number } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 **路径** - POST `/mail/MailRwdAll` **请求** ```ts interface ReqMailRwdAll { } ``` **响应** ```ts interface ResMailRwdAll { [key: string]: { rts: number } } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 **路径** - POST `/mail/MailRwdOne` **请求** ```ts interface ReqMailRwdOne { id: string } ``` **响应** ```ts interface ResMailRwdOne { [key: string]: { rts: number } } ``` **配置** ```ts { "connet": "ws" } ``` --- ## plat ### 平台登录 **路径** - POST `/plat/PlatLogin` **请求** ```ts interface ReqPlatLogin { pid: string, param: string[] } ``` **响应** ```ts interface ResPlatLogin { openId: string, token: string, noticeWais: { type: number, title: string, content: string }[] } ``` **配置** ```ts { "connet": "http" } ``` --- ## player ### 账号登录 **路径** - POST `/player/PlayerLogin` **请求** ```ts interface ReqPlayerLogin { pid: string, openId: string, lang: string, plat: string, device: string, parms: string[] } ``` **响应** ```ts interface ResPlayerLogin { uid: string, sid: string, list: { [key: string]: { uuid: string, name: string, level: number, lastlogin: number } }, token: string, qufuList: { [key: string]: { sid: string, name: string, sName: string, openAt: number, status: string, heid: string, suofu: string, skin: string } }, switch: { [key: string]: any }, orderList: { [key: string]: { rmb: number, money: number, desc: string, iid: string, daibi: number } }, wsUrl: string } ``` **配置** ```ts { "connet": "http" } ``` --- ## task ### 获取主线任务 **路径** - POST `/task/TaskInfo` **请求** ```ts interface ReqTaskInfo { } ``` **响应** ```ts interface ResTaskInfo { id: number, cons: number } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求领取任务奖励 **路径** - POST `/task/TaskRwd` **请求** ```ts interface ReqTaskRwd { } ``` **响应** ```ts interface ResTaskRwd { id: number, cons: number } ``` **配置** ```ts { "connet": "ws" } ``` --- ## user ### 角色登录 **路径** - POST `/user/UserLogin` **请求** ```ts interface ReqUserLogin { sid: string, uid: string, token: string } ``` **响应** ```ts interface ResUserLogin { uuid: string, sid: string, name: string, head: string, wxhead: string, sex: number, level: number, exp: number, regtime: number, loginTime: number, lastlogin: number, lang: string, iscz: number, rmbcz: number, power: number } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 获取内部公告 **路径** - POST `/user/UserNotices` **请求** ```ts interface ReqUserNotices { } ``` **响应** ```ts interface ResUserNotices { notices: { type: number, title: string, content: string }[] } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 角色改名 **路径** - POST `/user/UserSetName` **请求** ```ts interface ReqUserSetName { name: string } ``` **响应** ```ts interface ResUserSetName { name: string } ``` **配置** ```ts { "connet": "ws" } ``` --- ### 请求接口 使用兑换码 **路径** - POST `/user/UserUseCode` **请求** ```ts interface ReqUserUseCode { key: string } ``` **响应** ```ts interface ResUserUseCode { } ``` **配置** ```ts { "connet": "ws" } ```