登录:将写死的数写进const
This commit is contained in:
@@ -8,7 +8,7 @@ import { getPvpGkWarIds, getPvpRankRewards, getPvpHeroRewards, getResultMaxRank
|
||||
import { deepCopy, getRandomArr, resResult, shouldRefresh } from '../pubUtils/util';
|
||||
import { getLvByScore } from './pvpService';
|
||||
import { getMyRank, setRank, resetPvpRanks, getAllOnlineRoles } from './redisService';
|
||||
import { MAIL_TYPE, REDIS_KEY, ADULT_AGE, GUEST_MAX_TIME } from '../consts';
|
||||
import { MAIL_TYPE, REDIS_KEY, ADULT_AGE, GUEST_MAX_TIME, ADDICTION_PREVENTION_CODE } from '../consts';
|
||||
import { RankParam } from '../domain/rank';
|
||||
import { RoleModel } from '../db/Role';
|
||||
import { MailModel, MailType } from '../db/Mail';
|
||||
@@ -280,8 +280,8 @@ export async function reportOnlineSchedule() {
|
||||
|
||||
let age = getAge(birthday);
|
||||
let isAdult = age >= ADULT_AGE;
|
||||
// TODO 将code含义写入const
|
||||
if(result.code != 1) { // 未成年人防沉迷
|
||||
|
||||
if(result.code != ADDICTION_PREVENTION_CODE.SUCCESS) { // 未成年人防沉迷
|
||||
pinus.app.channelService.pushMessageByUids('onPlayTime', resResult(STATUS.SUCCESS, {
|
||||
isGuest,
|
||||
guestTime, // 游客已体验时间
|
||||
@@ -303,7 +303,7 @@ export async function reportOnlineSchedule() {
|
||||
hasAuthenticated, // 是否进行过实名认证
|
||||
isAdult, // 是否已成年
|
||||
todayPlayTime: result.total, // 今天已游戏时长
|
||||
type: 1
|
||||
type: ADDICTION_PREVENTION_CODE.GUEST,
|
||||
} ), [{uid: roleId, sid: sid}]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user