全局:清理部分console

This commit is contained in:
luying
2021-04-13 17:30:51 +08:00
parent 4d14bc2676
commit 95adc48d2a
20 changed files with 25 additions and 28 deletions

View File

@@ -61,7 +61,7 @@ export default class FriendRelation extends BaseModel {
let result: FriendRelationType = await document.lean({ getters: true, virtuals: true });;
console.log(JSON.stringify(result));
// console.log(JSON.stringify(result));
return result;
}

View File

@@ -65,7 +65,7 @@ export default class Sms extends BaseModel {
}
public hasSendToday() {
console.log(moment(this.updateTime).format('YYYY-MM-DD'), moment(Date.now()).format('YYYY-MM-DD'));
// console.log(moment(this.updateTime).format('YYYY-MM-DD'), moment(Date.now()).format('YYYY-MM-DD'));
return moment(this.updateTime).format('YYYY-MM-DD') === moment(Date.now()).format('YYYY-MM-DD');
}

View File

@@ -131,7 +131,7 @@ export default class User extends BaseModel {
}
public static async createOrUpdate(isGuest: boolean, tel: string, token: string, platform: string, pkgName: string, serverType: string, deviceId: string) {
console.log(tel);
// console.log(tel);
let user: UserType = await UserModel.findOne({ tel }).lean({ getters: true });
if (!user) {

View File

@@ -68,7 +68,6 @@ export class WoodenHorse {
* @returns {boolean} needSendEnd 是否跑到终点发送结束新号
*/
public calCurWoodenHorse(events: Event[]): boolean {
console.log('**', this.guildName, this.status, this.distance, Date.now(), this.speed, JSON.stringify(events))
if(this.status == 2) return false; // TODO 写进const表
if(this.status == 0 && this.stopContinueTime && Date.now() > this.stopContinueTime) {
this.status = 1; this.stopContinueTime = 0;
@@ -121,7 +120,6 @@ export class WoodenHorse {
this.status = 0; // TODO 写进const表
this.speed = 0;
}
console.log('**effect', this.speed, JSON.stringify(effectiveEvents));
return false;
}

View File

@@ -95,7 +95,6 @@ export class GuildRankParam {
this.name = guild.name;
this.lv = guild.lv;
let leader = <RoleType>guild.leader;
console.log('**', JSON.stringify(leader))
let _leader = new GuildLeader(leader);
this.leader = _leader;
this.memberCnt = guild.memberCnt;
@@ -179,7 +178,7 @@ export class SimpleGuildRankWithTimeParam extends SimpleGuildRankParam {
constructor(rank: number, code: string, name: string, obj: WoodenHorse|{distance: number, time: number, startTime: number, durability: number}|false) {
super(rank, code, name, obj?obj.distance:0);
console.log(JSON.stringify(obj));
// console.log(JSON.stringify(obj));
if(obj) {
this.num = obj.distance;
this.time = Math.floor((obj.time - obj.startTime)/1000);

View File

@@ -64,8 +64,8 @@ export async function vidHttpRequest(addr: string, body: any) {
let res = await request(options);
let check = checkSign(res);
if(!check) return false;
console.log('*****request result*****');
console.log(JSON.stringify(res));
// console.log('*****request result*****');
// console.log(JSON.stringify(res));
return res;
} catch(e) {
console.error(e);

View File

@@ -289,7 +289,7 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
const isWake = colorStar > 0; // 是否觉醒,只要激活了觉醒,彩星就会 > 1
const isFirstWake = colorStar > 0 && originColorStar <= 0; // 是否是初次觉醒
const isUpStar = originStar != star || originColorStar != colorStar; // 是否有升星
console.log('*isUpstar', isUpStar, originStar, star, originColorStar, colorStar)
// console.log('*isUpstar', isUpStar, originStar, star, originColorStar, colorStar)
const dicStar = isWake ? getHeroWakeByQuality(dicHero.quality, originColorStar) : getHeroStarByQuality(quality, originStar); // 星级表
@@ -738,7 +738,7 @@ export function calHeroEquipIncAttr(hero: HeroType) {
let attr = (value1 + lv * valueup) * (HERO_CE_RATIO + valueRefine) + valueJewel * HERO_CE_RATIO;
if(attr > 0) {
console.log('装备战力:', i, attr);
// console.log('装备战力:', i, attr);
updateHeroAttr(heroAttrs, i, { set: { equipUp: attr } })
}
}

View File

@@ -30,7 +30,7 @@ export function aesEncryptcfb(data, key, iv) {
const cipher = crypto.createCipheriv('aes-192-cfb', key, iv);
let crypted = cipher.update(data, 'utf8', 'hex');
crypted += cipher.final('hex');
console.log('****aesEncryptcfb', data, crypted)
// console.log('****aesEncryptcfb', data, crypted)
return crypted;
}