测试:武将测试debug接口

This commit is contained in:
luying
2021-10-08 17:20:50 +08:00
parent 56ef57e225
commit 3cab2d4db4
6 changed files with 215 additions and 561 deletions

View File

@@ -2,6 +2,7 @@ import { STATUS } from './../consts/statusCode';
import { HeroModel, HeroType } from '../db/Hero';
const csprng = require('csprng');
import fs = require('fs');
import path = require('path');
import { HERO_CE_RATIO, ABI_STAGE, GACHA_TO_FLOOR, REFRESH_TIME, ROBOT_SYS_TYPE, } from '../consts';
@@ -58,6 +59,14 @@ export function genCode(len) {
return code;
}
/**
* 生成 len 长度的随机字符串
* @param len 长度
* @param radix 基数
*/
export function generateStr(len: number, radix = 36) {
return `${csprng(len, radix)}`;
}
export function generateNum(len: number) {
let code = '';