加密:接口加密解密

This commit is contained in:
luying
2022-06-16 19:14:05 +08:00
parent 144f3ed0b0
commit 469e393f5e
18 changed files with 833 additions and 162 deletions

View File

@@ -10,7 +10,6 @@ import { ABI_STAGE, REFRESH_TIME, ROBOT_SYS_TYPE, ITEM_CHANGE_REASON, WAR_TYPE,
import { findIndex } from 'underscore';
import { getZeroPointD } from './timeUtil';
import { Floor } from '../domain/activityField/gachaField';
import { WhiteListModel } from '../db/RegionWhiteList';
import { RewardInter } from './interface';
import { gameData } from './data';
const randomName = require("chinese-random-name");
@@ -621,17 +620,6 @@ export function splitString(dataString: string, key: string) {
return numberArray;
}
export async function checkWhiteList(env: string, ip: string, uid: number, serverId: number) {
if(ip) {
let result = await WhiteListModel.checkIp(env, ip);
if(!!result) return true;
}
if(uid && serverId) {
let result = await WhiteListModel.checkUid(env, serverId, uid);
if(!!result) return true;
}
return false
}
export function isTimestamp(time: number, len = 10) {
if(!isNumber(time)) return false;