xiaoyang0346 3 天之前
父節點
當前提交
fa8c22c8b3

+ 156 - 0
s_to_proto/docs/openapi.json

@@ -1086,6 +1086,53 @@
         }
       }
     },
+    "/chat/ChatSend": {
+      "post": {
+        "tags": [
+          "chat"
+        ],
+        "operationId": "chat/ChatSend",
+        "requestBody": {
+          "description": "Req<ChatSend>",
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/chat_PtlChatSend_ReqChatSend"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "Success",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "description": "ApiReturn<ResChatSend>",
+                  "properties": {
+                    "isSucc": {
+                      "type": "boolean",
+                      "enum": [
+                        true
+                      ],
+                      "default": true
+                    },
+                    "res": {
+                      "$ref": "#/components/schemas/chat_PtlChatSend_ResChatSend"
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "default": {
+            "description": "Error",
+            "$ref": "#/components/responses/error"
+          }
+        }
+      }
+    },
     "/eps/EpsInfo": {
       "post": {
         "tags": [
@@ -2474,6 +2521,115 @@
           "order10Back"
         ]
       },
+      "chat_PtlChatSend_ReqChatSend": {
+        "type": "object",
+        "properties": {
+          "type": {
+            "$ref": "#/components/schemas/chat_PtlChatSend_ChatType"
+          },
+          "str": {
+            "type": "string"
+          }
+        },
+        "required": [
+          "type",
+          "str"
+        ],
+        "description": "请求接口"
+      },
+      "chat_PtlChatSend_ChatType": {
+        "type": "string",
+        "enum": [
+          "hefu"
+        ]
+      },
+      "chat_PtlChatSend_ResChatSend": {
+        "type": "object",
+        "properties": {},
+        "additionalProperties": {
+          "$ref": "#/components/schemas/chat_PtlChatSend_ChatInfo"
+        },
+        "description": "返回信息"
+      },
+      "chat_PtlChatSend_ChatInfo": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "number"
+          },
+          "type": {
+            "$ref": "#/components/schemas/chat_PtlChatSend_ChatType"
+          },
+          "fuuid": {
+            "type": "string"
+          },
+          "fuser": {
+            "$ref": "#/components/schemas/base_FUserInfo"
+          },
+          "msg": {
+            "type": "string"
+          },
+          "time": {
+            "type": "number"
+          }
+        },
+        "required": [
+          "id",
+          "type",
+          "fuuid",
+          "fuser",
+          "msg",
+          "time"
+        ]
+      },
+      "base_FUserInfo": {
+        "type": "object",
+        "properties": {
+          "uuid": {
+            "type": "string"
+          },
+          "sid": {
+            "type": "string"
+          },
+          "name": {
+            "type": "string"
+          },
+          "head": {
+            "type": "string"
+          },
+          "wxhead": {
+            "type": "string"
+          },
+          "sex": {
+            "type": "number"
+          },
+          "level": {
+            "type": "number"
+          },
+          "exp": {
+            "type": "number"
+          },
+          "power": {
+            "type": "number"
+          }
+        },
+        "required": [
+          "uuid",
+          "sid",
+          "name",
+          "head",
+          "wxhead",
+          "sex",
+          "level",
+          "exp",
+          "power"
+        ]
+      },
+      "chat_server_MsgChatNew_s_MsgChatNew_s": {
+        "type": "object",
+        "properties": {},
+        "description": "msg推送信息"
+      },
       "common_MsgItems_MsgItems": {
         "type": "object",
         "properties": {

+ 50 - 0
s_to_proto/docs/tsapi.md

@@ -33,6 +33,8 @@
     - [updateQuFu](#/admin/updateQuFu)
     - [updateSetting](#/admin/updateSetting)
     - [xiazai](#/admin/xiazai)
+- chat
+    - [请求接口](#/chat/ChatSend)
 - eps
     - [获取属性信息](#/eps/EpsInfo)
 - fight
@@ -717,6 +719,54 @@ interface Resxiazai {
 
 ---
 
+## chat
+
+### 请求接口 <a id="/chat/ChatSend"></a>
+
+**路径**
+- 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
 
 ### 获取属性信息 <a id="/eps/EpsInfo"></a>

+ 15 - 0
s_to_proto/shared/base.ts

@@ -11,6 +11,21 @@ export interface BaseMessage {
 }
 
 
+
+//查看他人角色基础信息
+export interface FUserInfo {
+    uuid: string; //角色ID
+    sid: string; //所属分区
+    name: string; //名字
+    head: string; //头像
+    wxhead: string; //微信头像
+    sex: number; //0女1男
+    level: number; //等级
+    exp: number; //经验
+    power: number; //战力
+}
+
+
 /**
  * code返回类型
  */

+ 36 - 0
s_to_proto/shared/chat/PtlChatSend.ts

@@ -0,0 +1,36 @@
+import { FUserInfo } from "../base";
+
+/**
+* 请求接口
+*/
+export interface ReqChatSend {
+	type:ChatType //渠道类型(合服hefu|所有服all|世家club|跨服kua)
+	str:string //语句
+}
+
+/**
+* 返回信息
+*/
+export interface ResChatSend {
+    [xbid: string]: ChatInfo 
+}
+
+export interface ChatInfo {
+    id: number; //聊天编号ID
+    type: ChatType; //聊天类型
+    fuuid: string; //玩家ID
+    fuser: FUserInfo; //玩家信息
+    msg: string; //消息体
+    time: number; //时间
+}
+
+export enum ChatType {
+    hefu = "hefu", //合服聊天
+}
+
+export const conf = {
+    connet: "ws"
+}
+
+
+

+ 9 - 0
s_to_proto/shared/chat/server/MsgChatNew_s.ts

@@ -0,0 +1,9 @@
+
+
+/**
+ * msg推送信息
+ */
+export interface MsgChatNew_s {
+
+}
+

+ 180 - 1
s_to_proto/shared/serviceProto.ts

@@ -22,6 +22,8 @@ import { RequpdateMail, ResupdateMail } from './admin/PtlupdateMail';
 import { RequpdateQuFu, ResupdateQuFu } from './admin/PtlupdateQuFu';
 import { RequpdateSetting, ResupdateSetting } from './admin/PtlupdateSetting';
 import { Reqxiazai, Resxiazai } from './admin/Ptlxiazai';
+import { ReqChatSend, ResChatSend } from './chat/PtlChatSend';
+import { MsgChatNew_s } from './chat/server/MsgChatNew_s';
 import { MsgItems } from './common/MsgItems';
 import { MsgMessage } from './common/MsgMessage';
 import { ReqEpsInfo, ResEpsInfo } from './eps/PtlEpsInfo';
@@ -143,6 +145,10 @@ export interface ServiceType {
             req: Reqxiazai,
             res: Resxiazai
         },
+        "chat/ChatSend": {
+            req: ReqChatSend,
+            res: ResChatSend
+        },
         "eps/EpsInfo": {
             req: ReqEpsInfo,
             res: ResEpsInfo
@@ -221,6 +227,7 @@ export interface ServiceType {
         }
     },
     msg: {
+        "chat/server/ChatNew_s": MsgChatNew_s,
         "common/Items": MsgItems,
         "common/Message": MsgMessage,
         "eps/server/EpsChange_s": MsgEpsChange_s,
@@ -232,7 +239,7 @@ export interface ServiceType {
 }
 
 export const serviceProto: ServiceProto<ServiceType> = {
-    "version": 58,
+    "version": 59,
     "services": [
         {
             "id": 39,
@@ -419,6 +426,19 @@ export const serviceProto: ServiceProto<ServiceType> = {
             }
         },
         {
+            "id": 88,
+            "name": "chat/ChatSend",
+            "type": "api",
+            "conf": {
+                "connet": "ws"
+            }
+        },
+        {
+            "id": 89,
+            "name": "chat/server/ChatNew_s",
+            "type": "msg"
+        },
+        {
             "id": 18,
             "name": "common/Items",
             "type": "msg"
@@ -1162,6 +1182,165 @@ export const serviceProto: ServiceProto<ServiceType> = {
                 }
             ]
         },
+        "chat/PtlChatSend/ReqChatSend": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "type",
+                    "type": {
+                        "type": "Reference",
+                        "target": "chat/PtlChatSend/ChatType"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "str",
+                    "type": {
+                        "type": "String"
+                    }
+                }
+            ]
+        },
+        "chat/PtlChatSend/ChatType": {
+            "type": "Enum",
+            "members": [
+                {
+                    "id": 0,
+                    "value": "hefu"
+                }
+            ]
+        },
+        "chat/PtlChatSend/ResChatSend": {
+            "type": "Interface",
+            "indexSignature": {
+                "keyType": "String",
+                "type": {
+                    "type": "Reference",
+                    "target": "chat/PtlChatSend/ChatInfo"
+                }
+            }
+        },
+        "chat/PtlChatSend/ChatInfo": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "id",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "type",
+                    "type": {
+                        "type": "Reference",
+                        "target": "chat/PtlChatSend/ChatType"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "fuuid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "fuser",
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/FUserInfo"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "msg",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 5,
+                    "name": "time",
+                    "type": {
+                        "type": "Number"
+                    }
+                }
+            ]
+        },
+        "base/FUserInfo": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "uuid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "sid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "name",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "head",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "wxhead",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 5,
+                    "name": "sex",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 6,
+                    "name": "level",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 7,
+                    "name": "exp",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 8,
+                    "name": "power",
+                    "type": {
+                        "type": "Number"
+                    }
+                }
+            ]
+        },
+        "chat/server/MsgChatNew_s/MsgChatNew_s": {
+            "type": "Interface"
+        },
         "common/MsgItems/MsgItems": {
             "type": "Interface",
             "properties": [