sdk:添加获取服务器列表、本地屏蔽词库
This commit is contained in:
@@ -4,6 +4,8 @@ import { RoleType } from "../db/Role";
|
||||
import { UserType } from "../db/User";
|
||||
import { nowSeconds } from "../pubUtils/timeUtil";
|
||||
|
||||
|
||||
|
||||
// 37的登录验证返回参数
|
||||
export class LoginValidateData37 {
|
||||
@prop({ required: true })
|
||||
@@ -296,4 +298,44 @@ export class GetGuildInfoByUserParam {
|
||||
let { game_key, sid, uid, time, sign } = this;
|
||||
return { game_key, sid, uid, time, sign }
|
||||
}
|
||||
}
|
||||
|
||||
export class GetWordParam {
|
||||
game_key: string; // 游戏标识
|
||||
time: number; // 时间戳
|
||||
sign: string;
|
||||
|
||||
constructor() {
|
||||
this.game_key = SDK_37_CONST.GAME_KEY;
|
||||
this.time = nowSeconds();
|
||||
}
|
||||
|
||||
getBody() {
|
||||
let { game_key, time } = this;
|
||||
return { game_key, time }
|
||||
}
|
||||
|
||||
setSign(sign: string) {
|
||||
this.sign = sign;
|
||||
}
|
||||
}
|
||||
|
||||
export class GetServerListParam {
|
||||
appid: string; // 联运商ID
|
||||
gid: number; // 游戏id
|
||||
time: number; // 时间戳
|
||||
ext: string; // 扩展参数
|
||||
sign: string;
|
||||
|
||||
constructor(param: GetServerListParam) {
|
||||
this.appid = param.appid;
|
||||
this.gid = param.gid;
|
||||
this.time = param.time;
|
||||
this.ext = param.ext;
|
||||
this.sign = param.sign;
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
return this.appid != undefined && this.gid != undefined && this.time != undefined && this.sign != undefined
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user