From b8f1e312f00318e201d9267a35a53ebac3d0c837 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期三, 25 六月 2025 16:33:57 +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