后台:账号管理

This commit is contained in:
luying
2021-11-29 16:19:47 +08:00
parent cc819c48a7
commit e7566b8af5
7 changed files with 63 additions and 67 deletions
+3 -6
View File
@@ -662,14 +662,11 @@ export function getFloorStatus(gachaId: number, floor: Floor[]) {
export async function checkWhiteListWithUid(uid: number) {
let user = await UserModel.findUserByUid(uid);
if(!user) return false;
let { tel, ip, auth } = user;
return await checkWhiteList(tel, ip, auth);
let { tel, ip } = user;
return await checkWhiteList(tel, ip);
}
export async function checkWhiteList(tel: string, ip: string, auth: number) {
if(auth == 1) {
return true;
}
export async function checkWhiteList(tel: string, ip: string) {
if(tel) {
let result = await WhiteListModel.checkTel(tel);
if(!!result) return true;