sdk:根据玩家获取军团信息
This commit is contained in:
@@ -464,4 +464,14 @@ export const PAY_37_CALLBACK_CODE = {
|
||||
WRONG_PARAM: { code: -8, simStr: '参数错误' },
|
||||
SERVER_NOT_FOUND: { code: -9, simStr: '游戏服不存在' },
|
||||
PAY_ERR: { code: 10, simStr: '充值失败' }
|
||||
}
|
||||
|
||||
export const SDK_37_TREAT_CODE = {
|
||||
SUCCESS: { code: 1, simStr: '成功' },
|
||||
WRONG_PARAMS: { code: -1, simStr: '参数错误' },
|
||||
SIGN_ERR: { code: -2, simStr: '签名错误' },
|
||||
TIME_IS_EXPIRED: { code: -3, simStr: 'time时间已过期' },
|
||||
ERR: { code: -4, simStr: '其他错误' },
|
||||
USER_NOT_FOUND: { code: -5, simStr: '用户不存在' },
|
||||
ROLE_NOT_FOUND: { code: -6, simStr: '角色不存在' },
|
||||
}
|
||||
@@ -52,7 +52,7 @@ export interface LoginValidataReturn37 {
|
||||
|
||||
export type ChannelInfo = LoginValidataReturn37|{};
|
||||
|
||||
export interface PayCallback37Data {
|
||||
export class PayCallback37Data {
|
||||
appid: string; // 平台id
|
||||
uid: number; // 37用户id
|
||||
game_id: number; // 游戏id
|
||||
@@ -67,6 +67,29 @@ export interface PayCallback37Data {
|
||||
time: number; // 请求时间
|
||||
ext: string; // 扩展参数
|
||||
sign: string;
|
||||
|
||||
constructor(params: PayCallback37Data) {
|
||||
this.appid = params.appid;
|
||||
this.uid = params.uid;
|
||||
this.game_id = params.game_id;
|
||||
this.fc_c_game_id = params.fc_c_game_id;
|
||||
this.sid = params.sid;
|
||||
this.actor_id = params.actor_id;
|
||||
this.order_id = params.order_id;
|
||||
this.order_no = params.order_no;
|
||||
this.money = params.money;
|
||||
this.game_coin = params.game_coin;
|
||||
this.product_id = params.product_id;
|
||||
this.time = params.time;
|
||||
this.ext = params.ext;
|
||||
this.sign = params.sign;
|
||||
}
|
||||
|
||||
getBody() {
|
||||
let { appid, uid, game_id, sid, actor_id, order_id, order_no, money, game_coin, product_id, time, ext } = this;
|
||||
return { appid, uid, game_id, sid, actor_id, order_id, order_no, money, game_coin, product_id, time, ext }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class Chat37Params {
|
||||
@@ -192,4 +215,85 @@ export class CheckGuild37Params {
|
||||
setSign(sign: string) {
|
||||
this.sign = sign;
|
||||
}
|
||||
}
|
||||
|
||||
export class RoleNameCallBackParam {
|
||||
username: number; // 玩家账号
|
||||
game_key: string; // 游戏标识
|
||||
sid: number; // 区服标识
|
||||
actor: string; // 玩家角色名称
|
||||
actor_id: string; // 玩家角色名id
|
||||
time: number; // 时间戳
|
||||
sign: string;
|
||||
|
||||
constructor(param: RoleNameCallBackParam) {
|
||||
this.username = param.username;
|
||||
this.game_key = param.game_key;
|
||||
this.sid = param.sid;
|
||||
this.actor = param.actor;
|
||||
this.actor_id = param.actor_id;
|
||||
this.time = param.time;
|
||||
this.sign = param.sign;
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
return this.username != undefined && this.game_key != undefined && this.sid != undefined && this.actor != undefined && this.actor_id != undefined && this.time != undefined && this.sign != undefined
|
||||
}
|
||||
|
||||
getBody() {
|
||||
let { username, game_key, sid, actor_id, time } = this;
|
||||
return { username, game_key, sid, actor_id, time }
|
||||
}
|
||||
}
|
||||
|
||||
export class GuildNameCallBackParam {
|
||||
game_key: string; // 游戏标识
|
||||
sid: number; // 区服标识
|
||||
type: number; // 类型 1-公会名 2-公会公告
|
||||
guildid: string; // 公会id
|
||||
time: number; // 时间戳
|
||||
sign: string;
|
||||
|
||||
constructor(param: GuildNameCallBackParam) {
|
||||
this.game_key = param.game_key;
|
||||
this.sid = param.sid;
|
||||
this.type = param.type;
|
||||
this.guildid = param.guildid;
|
||||
this.time = param.time;
|
||||
this.sign = param.sign;
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
return this.game_key != undefined && this.sid != undefined && this.type != undefined && this.guildid != undefined && this.time != undefined && this.sign != undefined
|
||||
}
|
||||
|
||||
getBody() {
|
||||
let { game_key, sid, type, guildid, time, sign } = this;
|
||||
return { game_key, sid, type, guildid, time, sign }
|
||||
}
|
||||
}
|
||||
|
||||
export class GetGuildInfoByUserParam {
|
||||
game_key: string; // 游戏标识
|
||||
uid: number; // 账号名
|
||||
time: number; // 时间戳
|
||||
sid: number; // 区服id
|
||||
sign: string;
|
||||
|
||||
constructor(param: GetGuildInfoByUserParam) {
|
||||
this.game_key = param.game_key;
|
||||
this.uid = param.uid;
|
||||
this.time = param.time;
|
||||
this.sid = param.sid;
|
||||
this.sign = param.sign;
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
return this.game_key != undefined && this.uid != undefined && this.sid != undefined && this.time != undefined && this.sign != undefined
|
||||
}
|
||||
|
||||
getBody() {
|
||||
let { game_key, sid, uid, time, sign } = this;
|
||||
return { game_key, sid, uid, time, sign }
|
||||
}
|
||||
}
|
||||
@@ -236,5 +236,5 @@ export const GK_MAINELITE = {
|
||||
};
|
||||
export const SERVER_DEBUG_MODE = {
|
||||
CURRENT_TIME: 1, // 服务器是否打开推送时间debug模式
|
||||
CHECK_WORD: 0, // 服务器是否打开聊天屏蔽
|
||||
CHECK_WORD: 1, // 服务器是否打开聊天屏蔽
|
||||
};
|
||||
|
||||
@@ -80,7 +80,7 @@ export async function loginValidata(channelType: string, params: { clientId: str
|
||||
}
|
||||
|
||||
export function getChannelId(channelType: string, uid: number|string) {
|
||||
return `${channelType}: ${uid}`;
|
||||
return `${channelType}_${uid}`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -182,5 +182,9 @@
|
||||
{
|
||||
"channel": "37",
|
||||
"ip": "221.5.32.28"
|
||||
},
|
||||
{
|
||||
"channel": "local",
|
||||
"ip": "::1"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user