修改关卡记录逻辑

This commit is contained in:
luying
2020-09-14 15:38:04 +08:00
parent b6725151d0
commit 693a87cd89
8 changed files with 63 additions and 41 deletions

View File

@@ -0,0 +1,10 @@
export function genCode(len) {
const chars = '123456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijklmnopqrstuvwxyz';
const charArr = chars.split('');
let code = '';
for (let i = 0; i < len; i++) {
code += charArr[Math.floor(Math.random() * charArr.length)];
}
return code;
}