后台:礼包码

This commit is contained in:
luying
2021-12-10 17:36:01 +08:00
parent ecca95b40b
commit cb999cec10
12 changed files with 255 additions and 174 deletions
+7
View File
@@ -1,6 +1,7 @@
import { STATUS } from './../consts/statusCode';
import { HeroModel, HeroType } from '../db/Hero';
import { isNumber } from 'underscore';
const csprng = require('csprng');
import fs = require('fs');
@@ -668,4 +669,10 @@ export async function checkWhiteList(env: string, ip: string, uid: number, serve
if(!!result) return true;
}
return false
}
export function isTimestamp(time: number, len = 10) {
if(!isNumber(time)) return false;
if(time.toString().length != len) return false;
return true;
}