Merge branch 'v2' into v2
This commit is contained in:
commit
f80b102180
@ -22,15 +22,15 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.0.0" />
|
<PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.0.0" />
|
||||||
<PackageReference Include="AlipaySDKNet.Standard" Version="4.9.511" />
|
<PackageReference Include="AlipaySDKNet.Standard" Version="4.9.554" />
|
||||||
<PackageReference Include="AngleSharp" Version="1.3.0" />
|
<PackageReference Include="AngleSharp" Version="1.3.0" />
|
||||||
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
|
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
|
||||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||||
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.1" Aliases="BouncyCastleV2" />
|
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.1" Aliases="BouncyCastleV2" />
|
||||||
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.0.1" />
|
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.0.3" />
|
||||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.60" />
|
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.61" />
|
||||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.60" />
|
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.61" />
|
||||||
<PackageReference Include="Furion.Pure" Version="4.9.7.60" />
|
<PackageReference Include="Furion.Pure" Version="4.9.7.61" />
|
||||||
<PackageReference Include="Hardware.Info" Version="101.0.1" />
|
<PackageReference Include="Hardware.Info" Version="101.0.1" />
|
||||||
<PackageReference Include="Hashids.net" Version="1.7.0" />
|
<PackageReference Include="Hashids.net" Version="1.7.0" />
|
||||||
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||||
@ -52,11 +52,11 @@
|
|||||||
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.5" />
|
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.5" />
|
||||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.9.0" />
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.9.0" />
|
||||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.12.0" />
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.12.0" />
|
||||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.192" />
|
<PackageReference Include="SqlSugarCore" Version="5.1.4.193" />
|
||||||
<PackageReference Include="SSH.NET" Version="2025.0.0" />
|
<PackageReference Include="SSH.NET" Version="2025.0.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.2" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.3" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1233" />
|
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1236" />
|
||||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
31
Admin.NET/Admin.NET.Core/Job/WechatAccessTokenCheckJob.cs
Normal file
31
Admin.NET/Admin.NET.Core/Job/WechatAccessTokenCheckJob.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 微信AccessToken有效性检查作业任务
|
||||||
|
/// </summary>
|
||||||
|
[JobDetail("job_WechatAccessTokenCheckJob", Description = "微信AccessToken有效性检查", GroupName = "default", Concurrent = false)]
|
||||||
|
[PeriodSeconds(60, TriggerId = "trigger_WechatAccessTokenCheckJob", Description = "微信AccessToken有效性检查", RunOnStart = true)]
|
||||||
|
public class WechatAccessTokenCheckJob : IJob
|
||||||
|
{
|
||||||
|
private readonly IServiceScopeFactory _scopeFactory;
|
||||||
|
|
||||||
|
public WechatAccessTokenCheckJob(IServiceScopeFactory scopeFactory)
|
||||||
|
{
|
||||||
|
_scopeFactory = scopeFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
|
||||||
|
{
|
||||||
|
using var serviceScope = _scopeFactory.CreateScope();
|
||||||
|
|
||||||
|
var wechatApiClientFactory = serviceScope.ServiceProvider.GetService<WechatApiClientFactory>();
|
||||||
|
await wechatApiClientFactory.CheckWechatAccessTokenAsync();
|
||||||
|
await wechatApiClientFactory.CheckWxOpenAccessTokenAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -119,15 +119,8 @@ public class SysWechatService : IDynamicApiController, ITransient
|
|||||||
[DisplayName("获取配置签名参数(wx.config)")]
|
[DisplayName("获取配置签名参数(wx.config)")]
|
||||||
public async Task<dynamic> GenConfigPara(SignatureInput input)
|
public async Task<dynamic> GenConfigPara(SignatureInput input)
|
||||||
{
|
{
|
||||||
var resCgibinToken = await _wechatApiClient.ExecuteCgibinTokenAsync(new CgibinTokenRequest());
|
string ticket = await _wechatApiClientFactory.TryGetWechatJsApiTicketAsync();
|
||||||
var request = new CgibinTicketGetTicketRequest()
|
return _wechatApiClient.GenerateParametersForJSSDKConfig(ticket, input.Url);
|
||||||
{
|
|
||||||
AccessToken = resCgibinToken.AccessToken
|
|
||||||
};
|
|
||||||
var response = await _wechatApiClient.ExecuteCgibinTicketGetTicketAsync(request);
|
|
||||||
if (!response.IsSuccessful())
|
|
||||||
throw Oops.Oh(response.ErrorMessage);
|
|
||||||
return _wechatApiClient.GenerateParametersForJSSDKConfig(response.Ticket, input.Url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -15,11 +15,13 @@ public partial class WechatApiClientFactory : ISingleton
|
|||||||
{
|
{
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
public readonly WechatOptions _wechatOptions;
|
public readonly WechatOptions _wechatOptions;
|
||||||
|
private readonly SysCacheService _sysCacheService;
|
||||||
|
|
||||||
public WechatApiClientFactory(IHttpClientFactory httpClientFactory, IOptions<WechatOptions> wechatOptions)
|
public WechatApiClientFactory(IHttpClientFactory httpClientFactory, IOptions<WechatOptions> wechatOptions, SysCacheService sysCacheService)
|
||||||
{
|
{
|
||||||
_httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory));
|
_httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory));
|
||||||
_wechatOptions = wechatOptions.Value ?? throw new ArgumentNullException(nameof(wechatOptions));
|
_wechatOptions = wechatOptions.Value ?? throw new ArgumentNullException(nameof(wechatOptions));
|
||||||
|
_sysCacheService = sysCacheService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -45,8 +47,8 @@ public partial class WechatApiClientFactory : ISingleton
|
|||||||
{
|
{
|
||||||
JsonSerializerSettings jsonSerializerSettings = NewtonsoftJsonSerializer.GetDefaultSerializerSettings();
|
JsonSerializerSettings jsonSerializerSettings = NewtonsoftJsonSerializer.GetDefaultSerializerSettings();
|
||||||
jsonSerializerSettings.Formatting = Formatting.Indented;
|
jsonSerializerSettings.Formatting = Formatting.Indented;
|
||||||
config.JsonSerializer = new NewtonsoftJsonSerializer(jsonSerializerSettings); // 指定 Newtonsoft.Json JSON序列化
|
config.JsonSerializer = new NewtonsoftJsonSerializer(jsonSerializerSettings); // 指定 System.Text.Json JSON序列化
|
||||||
// config.JsonSerializer = new SystemTextJsonSerializer(jsonSerializerSettings); // 指定 System.Text.Json JSON序列化
|
// config.JsonSerializer = new SystemTextJsonSerializer(jsonSerializerOptions); // 指定 Newtonsoft.Json JSON序列化
|
||||||
});
|
});
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
@ -75,10 +77,132 @@ public partial class WechatApiClientFactory : ISingleton
|
|||||||
{
|
{
|
||||||
JsonSerializerSettings jsonSerializerSettings = NewtonsoftJsonSerializer.GetDefaultSerializerSettings();
|
JsonSerializerSettings jsonSerializerSettings = NewtonsoftJsonSerializer.GetDefaultSerializerSettings();
|
||||||
jsonSerializerSettings.Formatting = Formatting.Indented;
|
jsonSerializerSettings.Formatting = Formatting.Indented;
|
||||||
config.JsonSerializer = new NewtonsoftJsonSerializer(jsonSerializerSettings); // 指定 Newtonsoft.Json JSON序列化
|
config.JsonSerializer = new NewtonsoftJsonSerializer(jsonSerializerSettings); // 指定 System.Text.Json JSON序列化
|
||||||
// config.JsonSerializer = new SystemTextJsonSerializer(jsonSerializerSettings); // 指定 System.Text.Json JSON序列化
|
// config.JsonSerializer = new SystemTextJsonSerializer(jsonSerializerOptions); // 指定 Newtonsoft.Json JSON序列化
|
||||||
});
|
});
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取微信公众号AccessToken
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> TryGetWechatAccessTokenAsync()
|
||||||
|
{
|
||||||
|
if (!_sysCacheService.ExistKey($"WxAccessToken_{_wechatOptions.WechatAppId}") || string.IsNullOrEmpty(_sysCacheService.Get<string>($"WxAccessToken_{_wechatOptions.WechatAppId}")))
|
||||||
|
{
|
||||||
|
var client = CreateWechatClient();
|
||||||
|
var reqCgibinToken = new CgibinTokenRequest();
|
||||||
|
var resCgibinToken = await client.ExecuteCgibinTokenAsync(reqCgibinToken);
|
||||||
|
if (resCgibinToken.ErrorCode != (int)WechatReturnCodeEnum.请求成功)
|
||||||
|
throw Oops.Oh(resCgibinToken.ErrorMessage + " " + resCgibinToken.ErrorCode);
|
||||||
|
_sysCacheService.Set($"WxAccessToken_{_wechatOptions.WechatAppId}", resCgibinToken.AccessToken, TimeSpan.FromSeconds(resCgibinToken.ExpiresIn - 60));
|
||||||
|
}
|
||||||
|
|
||||||
|
return _sysCacheService.Get<string>($"WxAccessToken_{_wechatOptions.WechatAppId}");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取微信小程序AccessToken
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> TryGetWxOpenAccessTokenAsync()
|
||||||
|
{
|
||||||
|
if (!_sysCacheService.ExistKey($"WxAccessToken_{_wechatOptions.WxOpenAppId}") || string.IsNullOrEmpty(_sysCacheService.Get<string>($"WxAccessToken_{_wechatOptions.WxOpenAppId}")))
|
||||||
|
{
|
||||||
|
var client = CreateWxOpenClient();
|
||||||
|
var reqCgibinToken = new CgibinTokenRequest();
|
||||||
|
var resCgibinToken = await client.ExecuteCgibinTokenAsync(reqCgibinToken);
|
||||||
|
if (resCgibinToken.ErrorCode != (int)WechatReturnCodeEnum.请求成功)
|
||||||
|
throw Oops.Oh(resCgibinToken.ErrorMessage + " " + resCgibinToken.ErrorCode);
|
||||||
|
_sysCacheService.Set($"WxAccessToken_{_wechatOptions.WxOpenAppId}", resCgibinToken.AccessToken, TimeSpan.FromSeconds(resCgibinToken.ExpiresIn - 60));
|
||||||
|
}
|
||||||
|
|
||||||
|
return _sysCacheService.Get<string>($"WxAccessToken_{_wechatOptions.WxOpenAppId}");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查微信公众号AccessToken
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task CheckWechatAccessTokenAsync()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_wechatOptions.WechatAppId) || string.IsNullOrEmpty(_wechatOptions.WechatAppSecret)) return;
|
||||||
|
|
||||||
|
var req = new CgibinOpenApiQuotaGetRequest
|
||||||
|
{
|
||||||
|
AccessToken = await TryGetWxOpenAccessTokenAsync(),
|
||||||
|
CgiPath = "/cgi-bin/token"
|
||||||
|
};
|
||||||
|
var client = CreateWechatClient();
|
||||||
|
var res = await client.ExecuteCgibinOpenApiQuotaGetAsync(req);
|
||||||
|
|
||||||
|
var originColor = Console.ForegroundColor;
|
||||||
|
if (res.ErrorCode != (int)WechatReturnCodeEnum.请求成功)
|
||||||
|
{
|
||||||
|
_sysCacheService.Remove($"WxAccessToken_{_wechatOptions.WechatAppId}");
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
Console.WriteLine("【" + DateTime.Now + "】" + _wechatOptions.WxOpenAppId + " 微信公众号令牌 无效");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||||
|
Console.WriteLine("【" + DateTime.Now + "】" + _wechatOptions.WxOpenAppId + " 微信公众号令牌 有效");
|
||||||
|
}
|
||||||
|
Console.ForegroundColor = originColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查微信小程序AccessToken
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task CheckWxOpenAccessTokenAsync()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_wechatOptions.WxOpenAppId) || string.IsNullOrEmpty(_wechatOptions.WxOpenAppSecret)) return;
|
||||||
|
|
||||||
|
var req = new CgibinOpenApiQuotaGetRequest
|
||||||
|
{
|
||||||
|
AccessToken = await TryGetWxOpenAccessTokenAsync(),
|
||||||
|
CgiPath = "/cgi-bin/token"
|
||||||
|
};
|
||||||
|
var client = CreateWxOpenClient();
|
||||||
|
var res = await client.ExecuteCgibinOpenApiQuotaGetAsync(req);
|
||||||
|
|
||||||
|
var originColor = Console.ForegroundColor;
|
||||||
|
if (res.ErrorCode != (int)WechatReturnCodeEnum.请求成功)
|
||||||
|
{
|
||||||
|
_sysCacheService.Remove($"WxAccessToken_{_wechatOptions.WxOpenAppId}");
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
Console.WriteLine("【" + DateTime.Now + "】" + _wechatOptions.WxOpenAppId + " 微信小程序令牌 无效");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||||
|
Console.WriteLine("【" + DateTime.Now + "】" + _wechatOptions.WxOpenAppId + " 微信小程序令牌 有效");
|
||||||
|
}
|
||||||
|
Console.ForegroundColor = originColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取微信JS接口临时票据jsapi_ticket
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> TryGetWechatJsApiTicketAsync()
|
||||||
|
{
|
||||||
|
if (!_sysCacheService.ExistKey($"WxJsApiTicket_{_wechatOptions.WechatAppId}") || string.IsNullOrEmpty(_sysCacheService.Get<string>($"WxJsApiTicket_{_wechatOptions.WechatAppId}")))
|
||||||
|
{
|
||||||
|
var accessToken = await TryGetWechatAccessTokenAsync();
|
||||||
|
var client = CreateWechatClient();
|
||||||
|
var request = new CgibinTicketGetTicketRequest()
|
||||||
|
{
|
||||||
|
AccessToken = accessToken
|
||||||
|
};
|
||||||
|
var response = await client.ExecuteCgibinTicketGetTicketAsync(request);
|
||||||
|
if (!response.IsSuccessful())
|
||||||
|
throw Oops.Oh(response.ErrorMessage + " " + response.ErrorCode);
|
||||||
|
_sysCacheService.Set($"WxJsApiTicket_{_wechatOptions.WechatAppId}", response.Ticket, TimeSpan.FromSeconds(response.ExpiresIn - 60));
|
||||||
|
}
|
||||||
|
return _sysCacheService.Get<string>($"WxJsApiTicket_{_wechatOptions.WechatAppId}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -14,6 +14,7 @@ public class Search
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字段名称集合
|
/// 字段名称集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <example>"[]"</example>
|
||||||
public List<string> Fields { get; set; }
|
public List<string> Fields { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -35,6 +36,7 @@ public class Filter
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 筛选过滤条件子项
|
/// 筛选过滤条件子项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <example>"[]"</example>
|
||||||
public IEnumerable<Filter>? Filters { get; set; }
|
public IEnumerable<Filter>? Filters { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -71,5 +73,6 @@ public abstract class BaseFilter
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 筛选过滤条件
|
/// 筛选过滤条件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <example>[]</example>
|
||||||
public Filter? Filter { get; set; }
|
public Filter? Filter { get; set; }
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
|
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.13.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.13.0" />
|
||||||
<PackageReference Include="Rezero.Api" Version="1.8.12" />
|
<PackageReference Include="Rezero.Api" Version="1.8.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=0">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes" media="(min-width: 769px)">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes" media="(min-width: 769px)">
|
||||||
<link rel="icon" href="./favicon.ico" />
|
<link rel="icon" href="./favicon.ico" />
|
||||||
<title>GoView</title>
|
<title>Admin.NET</title>
|
||||||
<link rel="stylesheet" href="./index.css" />
|
<link rel="stylesheet" href="./index.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 7.8 KiB |
@ -18,11 +18,7 @@
|
|||||||
<layout-header></layout-header>
|
<layout-header></layout-header>
|
||||||
<div class="go-login">
|
<div class="go-login">
|
||||||
<div class="go-login-carousel">
|
<div class="go-login-carousel">
|
||||||
<n-carousel
|
<n-carousel autoplay dot-type="line" :interval="Number(carouselInterval)">
|
||||||
autoplay
|
|
||||||
dot-type="line"
|
|
||||||
:interval="Number(carouselInterval)"
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
v-for="(item, i) in carouselImgList"
|
v-for="(item, i) in carouselImgList"
|
||||||
:key="i"
|
:key="i"
|
||||||
@ -37,24 +33,14 @@
|
|||||||
<n-collapse-transition :appear="true" :show="show">
|
<n-collapse-transition :appear="true" :show="show">
|
||||||
<n-card class="login-account-card" :title="$t('login.desc')">
|
<n-card class="login-account-card" :title="$t('login.desc')">
|
||||||
<div class="login-account-top">
|
<div class="login-account-top">
|
||||||
<img
|
<img class="login-account-top-logo" src="~@/assets/images/login/input.png" alt="展示图片" />
|
||||||
class="login-account-top-logo"
|
|
||||||
src="~@/assets/images/login/input.png"
|
|
||||||
alt="展示图片"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<n-form
|
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
|
||||||
ref="formRef"
|
|
||||||
label-placement="left"
|
|
||||||
size="large"
|
|
||||||
:model="formInline"
|
|
||||||
:rules="rules"
|
|
||||||
>
|
|
||||||
<n-form-item path="username">
|
<n-form-item path="username">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="formInline.username"
|
v-model:value="formInline.username"
|
||||||
type="text"
|
type="text"
|
||||||
maxlength="16"
|
maxlength="30"
|
||||||
:placeholder="$t('global.form_account')"
|
:placeholder="$t('global.form_account')"
|
||||||
@keydown.enter="handleSubmit"
|
@keydown.enter="handleSubmit"
|
||||||
>
|
>
|
||||||
@ -69,7 +55,7 @@
|
|||||||
<n-input
|
<n-input
|
||||||
v-model:value="formInline.password"
|
v-model:value="formInline.password"
|
||||||
type="password"
|
type="password"
|
||||||
maxlength="16"
|
maxlength="30"
|
||||||
show-password-on="click"
|
show-password-on="click"
|
||||||
:placeholder="$t('global.form_password')"
|
:placeholder="$t('global.form_password')"
|
||||||
@keydown.enter="handleSubmit"
|
@keydown.enter="handleSubmit"
|
||||||
@ -84,21 +70,14 @@
|
|||||||
<n-form-item>
|
<n-form-item>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="flex-initial">
|
<div class="flex-initial">
|
||||||
<n-checkbox v-model:checked="autoLogin">{{
|
<n-checkbox v-model:checked="autoLogin">{{ $t('login.form_auto') }}</n-checkbox>
|
||||||
$t('login.form_auto')
|
|
||||||
}}</n-checkbox>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item>
|
<n-form-item>
|
||||||
<n-button
|
<n-button type="primary" @click="handleSubmit" size="large" :loading="loading" block>{{
|
||||||
type="primary"
|
$t('login.form_button')
|
||||||
@click="handleSubmit"
|
}}</n-button>
|
||||||
size="large"
|
|
||||||
:loading="loading"
|
|
||||||
block
|
|
||||||
>{{ $t('login.form_button') }}</n-button
|
|
||||||
>
|
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
</n-card>
|
</n-card>
|
||||||
@ -141,21 +120,21 @@ const systemStore = useSystemStore()
|
|||||||
const t = window['$t']
|
const t = window['$t']
|
||||||
|
|
||||||
const formInline = reactive({
|
const formInline = reactive({
|
||||||
username: 'admin',
|
username: 'superadmin',
|
||||||
password: '123456',
|
password: 'Admin.NET++010101'
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
username: {
|
username: {
|
||||||
required: true,
|
required: true,
|
||||||
message: t('global.form_account'),
|
message: t('global.form_account'),
|
||||||
trigger: 'blur',
|
trigger: 'blur'
|
||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
required: true,
|
required: true,
|
||||||
message: t('global.form_password'),
|
message: t('global.form_password'),
|
||||||
trigger: 'blur',
|
trigger: 'blur'
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时器
|
// 定时器
|
||||||
@ -165,17 +144,7 @@ const shuffleTimiing = ref()
|
|||||||
const carouselImgList = ['one', 'two', 'three']
|
const carouselImgList = ['one', 'two', 'three']
|
||||||
|
|
||||||
// 背景图
|
// 背景图
|
||||||
const bgList = ref([
|
const bgList = ref(['bar_y', 'bar_x', 'line_gradient', 'line', 'funnel', 'heatmap', 'map', 'pie', 'radar'])
|
||||||
'bar_y',
|
|
||||||
'bar_x',
|
|
||||||
'line_gradient',
|
|
||||||
'line',
|
|
||||||
'funnel',
|
|
||||||
'heatmap',
|
|
||||||
'map',
|
|
||||||
'pie',
|
|
||||||
'radar',
|
|
||||||
])
|
|
||||||
|
|
||||||
// 处理url获取
|
// 处理url获取
|
||||||
const getImageUrl = (name: string, folder: string) => {
|
const getImageUrl = (name: string, folder: string) => {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "admin.net.pro",
|
"name": "admin.net.pro",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.4.33",
|
"version": "2.4.33",
|
||||||
"lastBuildTime": "2025.05.08",
|
"lastBuildTime": "2025.05.12",
|
||||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||||
"author": "zuohuaijun",
|
"author": "zuohuaijun",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -26,8 +26,8 @@
|
|||||||
"@vue-office/excel": "^1.7.14",
|
"@vue-office/excel": "^1.7.14",
|
||||||
"@vue-office/pdf": "^2.0.9",
|
"@vue-office/pdf": "^2.0.9",
|
||||||
"@vueuse/core": "^13.1.0",
|
"@vueuse/core": "^13.1.0",
|
||||||
"@vxe-ui/plugin-export-xlsx": "^4.2.0",
|
"@vxe-ui/plugin-export-xlsx": "^4.2.1",
|
||||||
"@vxe-ui/plugin-render-element": "^4.0.10",
|
"@vxe-ui/plugin-render-element": "^4.0.11",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
@ -39,7 +39,7 @@
|
|||||||
"echarts": "^5.6.0",
|
"echarts": "^5.6.0",
|
||||||
"echarts-gl": "^2.0.9",
|
"echarts-gl": "^2.0.9",
|
||||||
"echarts-wordcloud": "^2.1.0",
|
"echarts-wordcloud": "^2.1.0",
|
||||||
"element-plus": "^2.9.9",
|
"element-plus": "^2.9.10",
|
||||||
"exceljs": "^4.4.0",
|
"exceljs": "^4.4.0",
|
||||||
"ezuikit-js": "^8.1.9-beta.3",
|
"ezuikit-js": "^8.1.9-beta.3",
|
||||||
"gcoord": "^1.0.7",
|
"gcoord": "^1.0.7",
|
||||||
@ -50,10 +50,10 @@
|
|||||||
"jsplumb": "^2.15.6",
|
"jsplumb": "^2.15.6",
|
||||||
"jwchat": "^2.0.3",
|
"jwchat": "^2.0.3",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"md-editor-v3": "^5.5.0",
|
"md-editor-v3": "^5.5.1",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"monaco-editor": "^0.52.2",
|
"monaco-editor": "^0.52.2",
|
||||||
"mqtt": "^5.12.0",
|
"mqtt": "^5.13.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"ol": "^10.5.0",
|
"ol": "^10.5.0",
|
||||||
"pinia": "^3.0.2",
|
"pinia": "^3.0.2",
|
||||||
@ -80,8 +80,8 @@
|
|||||||
"vue-signature-pad": "^3.0.2",
|
"vue-signature-pad": "^3.0.2",
|
||||||
"vue3-flag-icons": "^0.0.3",
|
"vue3-flag-icons": "^0.0.3",
|
||||||
"vue3-tree-org": "^4.2.2",
|
"vue3-tree-org": "^4.2.2",
|
||||||
"vxe-pc-ui": "^4.5.36",
|
"vxe-pc-ui": "^4.6.4",
|
||||||
"vxe-table": "^4.13.18",
|
"vxe-table": "^4.13.25",
|
||||||
"xe-utils": "^3.7.4",
|
"xe-utils": "^3.7.4",
|
||||||
"xlsx-js-style": "^1.2.0"
|
"xlsx-js-style": "^1.2.0"
|
||||||
},
|
},
|
||||||
@ -89,12 +89,12 @@
|
|||||||
"@iconify/vue": "^5.0.0",
|
"@iconify/vue": "^5.0.0",
|
||||||
"@plugin-web-update-notification/vite": "^2.0.0",
|
"@plugin-web-update-notification/vite": "^2.0.0",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^20.17.43",
|
"@types/node": "^20.17.46",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/sortablejs": "^1.15.8",
|
"@types/sortablejs": "^1.15.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
||||||
"@typescript-eslint/parser": "^8.32.0",
|
"@typescript-eslint/parser": "^8.32.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.3",
|
"@vitejs/plugin-vue": "^5.2.4",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
||||||
"@vue/compiler-sfc": "^3.5.13",
|
"@vue/compiler-sfc": "^3.5.13",
|
||||||
"code-inspector-plugin": "^0.20.10",
|
"code-inspector-plugin": "^0.20.10",
|
||||||
@ -102,10 +102,10 @@
|
|||||||
"eslint-plugin-vue": "^10.1.0",
|
"eslint-plugin-vue": "^10.1.0",
|
||||||
"globals": "^16.1.0",
|
"globals": "^16.1.0",
|
||||||
"less": "^4.3.0",
|
"less": "^4.3.0",
|
||||||
"openapi-ts-request": "^1.3.4",
|
"openapi-ts-request": "^1.4.0",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"rollup-plugin-visualizer": "^5.14.0",
|
"rollup-plugin-visualizer": "^5.14.0",
|
||||||
"sass": "^1.87.0",
|
"sass": "^1.88.0",
|
||||||
"terser": "^5.39.0",
|
"terser": "^5.39.0",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"vite": "^6.3.5",
|
"vite": "^6.3.5",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user