feat: 恢复备案

This commit is contained in:
chenchun
2024-10-11 16:48:11 +08:00
committed by 橙子
parent adb9849650
commit 2c6558874d
4 changed files with 8 additions and 8 deletions

View File

@@ -164,15 +164,15 @@ namespace Yi.Framework.Rbac.Application.Services
/// 验证电话号码
/// </summary>
/// <param name="str_handset"></param>
private async Task ValidationPhone(string str_handset)
private async Task ValidationPhone(string phone)
{
var res = Regex.IsMatch(str_handset, @"^\d{11}$");
var res = Regex.IsMatch(phone, @"^\d{11}$");
if (res == false)
{
throw new UserFriendlyException("手机号码格式错误!请检查");
}
if (await _userRepository.IsAnyAsync(x => x.Phone.ToString() == str_handset))
if (await _userRepository.IsAnyAsync(x => x.Phone.ToString() == phone))
{
throw new UserFriendlyException("该手机号已被注册!");
}
@@ -225,7 +225,7 @@ namespace Yi.Framework.Rbac.Application.Services
var uuid = Guid.NewGuid();
await _aliyunManger.SendSmsAsync(input.Phone, code);
await _phoneCache.SetAsync(new CaptchaPhoneCacheKey(ValidationPhoneTypeEnum.RetrievePassword, input.Phone),
await _phoneCache.SetAsync(new CaptchaPhoneCacheKey(validationPhoneType, input.Phone),
new CaptchaPhoneCacheItem(code),
new DistributedCacheEntryOptions { SlidingExpiration = TimeSpan.FromMinutes(10) });
return new

View File

@@ -10,4 +10,4 @@ VITE_APP_BASE_WS = '/dev-ws'
VITE_APP_BASE_URL_WS="http://localhost:19001/hub"
# 是否开启ICP备案模式
VITE_APP_ICP = true
VITE_APP_ICP = false

View File

@@ -9,4 +9,4 @@ VITE_APP_BASE_WS = '/prod-ws'
VITE_APP_BASE_URL_WS="http://ccnetcore.com:19001/hub"
# 是否开启ICP备案模式
VITE_APP_ICP = true
VITE_APP_ICP = false

View File

@@ -4,9 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<!--<title>.Net意社区</title>-->
<title>.Net意社区</title>
<!-- 为了icp备案-->
<title>个人成果展示</title>
<!-- <title>个人成果展示</title>-->
<link rel="stylesheet" href="/src/assets/loading.css" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5453339688995325"
crossorigin="anonymous"></script>