防沉迷:不使用厚土sdk
This commit is contained in:
@@ -9,7 +9,8 @@ import Counter from '@db/Counter';
|
||||
import { getExpByLv } from '../pubUtils/data';
|
||||
import { isString } from 'underscore';
|
||||
import { getAge } from '../pubUtils/timeUtil';
|
||||
import { shouldRefresh, resResult } from '../pubUtils/util';
|
||||
import { resResult } from '../pubUtils/util';
|
||||
import { checkTeeanAgerTime } from '../pubUtils/authenticateUtil';
|
||||
import { authenticate } from '../pubUtils/httpUtil';
|
||||
import { checkTask, getCreateUserFuncs } from 'app/pubUtils/taskUtil';
|
||||
|
||||
@@ -82,11 +83,7 @@ export default class Auth extends Service {
|
||||
let age = getAge(user.birthday);
|
||||
let isAdult = age >= ADULT_AGE;
|
||||
let todayPlayTime = user.todayPlayTime;
|
||||
let type = user.todayPlayType;
|
||||
if (shouldRefresh(user.reportTime, new Date(), 0)) {
|
||||
todayPlayTime = 0;
|
||||
type = 0;
|
||||
}
|
||||
let type = checkTeeanAgerTime(isAdult, todayPlayTime);
|
||||
if ((user.isGuest || !user.hasAuthenticated) && user.guestTime > GUEST_MAX_TIME) {
|
||||
type = ADDICTION_PREVENTION_CODE.GUEST;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user