From f210a0e0fc0552bfacb2489de099bd512b8e74e7 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 05 十一月 2025 09:03:39 +0800
Subject: [PATCH] 提交
---
Admin.NET/FZCZTB.NET.SYSService/MSM/ZCSMSService.cs | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/Admin.NET/FZCZTB.NET.SYSService/MSM/ZCSMSService.cs b/Admin.NET/FZCZTB.NET.SYSService/MSM/ZCSMSService.cs
index 61804dc..051b110 100644
--- a/Admin.NET/FZCZTB.NET.SYSService/MSM/ZCSMSService.cs
+++ b/Admin.NET/FZCZTB.NET.SYSService/MSM/ZCSMSService.cs
@@ -28,6 +28,7 @@
using Yitter.IdGenerator;
using Lazy.Captcha.Core;
using Furion;
+using NewLife;
namespace FZCZTB.NET.SYSService.MSM;
/// <summary>
@@ -45,8 +46,10 @@
ICaptcha captcha
)
{
+
_smsOptions = smsOptions.Value;
- _sysCacheService = _sysCacheService;
+ _sysCacheService = sysCacheService;
+
_captcha = captcha;
}
@@ -73,7 +76,7 @@
return Temp.Content+Temp.SignName;
}
if (Code == null)
- Oops.Oh("鐭俊鍐呭涓虹┖");
+ throw Oops.Oh("鐭俊鍐呭涓虹┖");
return Code;
}
@@ -134,7 +137,7 @@
if (string.IsNullOrWhiteSpace(verifyCode)) throw Oops.Oh("楠岃瘉鐮佷笉瀛樺湪鎴栧凡澶辨晥锛岃閲嶆柊鑾峰彇锛�");
if (verifyCode != input.Code) throw Oops.Oh("楠岃瘉鐮侀敊璇紒");
-
+ _sysCacheService.Remove($"{CacheConst.KeyPhoneVerCode}{input.Phone}");
return true;
}
/// <summary>
@@ -164,13 +167,13 @@
};
var code= FormartMessage(verifyCode.toString());
- await SendSMSAsync(code, phoneNumber);
+ await SendSMSAsync(code, phoneNumber);
- _sysCacheService.Set($"{CacheConst.KeyPhoneVerCode}{phoneNumber}", verifyCode, TimeSpan.FromSeconds(_smsOptions.lingKai.VerifyTimeOut));
+ _sysCacheService.Set($"{CacheConst.KeyPhoneVerCode}{phoneNumber}", verifyCode, TimeSpan.FromSeconds(_smsOptions.lingKai.VerifyTimeOut.ToInt()));
-
+
- await Task.CompletedTask;
+
}
/// <summary>
--
Gitblit v1.9.1