From 5719dc1bb5d9e8df4bce5ad4556fabbacc04172b Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Wed, 7 May 2025 18:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tone-page-server/src/verification/verification.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tone-page-server/src/verification/verification.service.ts b/tone-page-server/src/verification/verification.service.ts index fdc5a24..5eff5da 100644 --- a/tone-page-server/src/verification/verification.service.ts +++ b/tone-page-server/src/verification/verification.service.ts @@ -1,9 +1,11 @@ -import { Injectable } from '@nestjs/common'; +import { Injectable, Logger } from '@nestjs/common'; import { NotificationService } from 'src/notification/notification.service'; @Injectable() export class VerificationService { + private readonly logger = new Logger(VerificationService.name); + constructor( private readonly notificationService: NotificationService, ) { } @@ -23,6 +25,8 @@ export class VerificationService { // 生成验证码 const code = this.generateCode(); + this.logger.log(`Phone[${phone}] code: ${code}`); + // 发送验证码 // await this.notificationService.sendSMS(phone, type, code); // 存储验证码 @@ -36,6 +40,7 @@ export class VerificationService { // 生成验证码 const code = this.generateCode(); + this.logger.log(`Email[${email}] code: ${code}`); // 发送验证码 // TODO