feat: 完成bbs头像功能
@@ -4,6 +4,7 @@ using System.Net;
|
||||
using Mapster;
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Auditing;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Yi.AuditLogging.SqlSugarCore.Entities;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Volo.Abp.AuditLogging;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Volo.Abp.AuditLogging;
|
||||
using Volo.Abp.AuditLogging.EntityFrameworkCore;
|
||||
using Volo.Abp.Modularity;
|
||||
using Yi.Framework.SqlSugarCore;
|
||||
|
||||
@@ -10,7 +13,9 @@ namespace Yi.AuditLogging.SqlSugarCore
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.Replace(new ServiceDescriptor(typeof(IAuditLogRepository), typeof(SqlSugarCoreAuditLogRepository), lifetime: ServiceLifetime.Transient));
|
||||
context.Services.AddYiDbContext<YiAuditLoggingDbContext>();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,13 @@ namespace Yi.Framework.Bbs.Application.Services
|
||||
{
|
||||
return Task.FromResult("你好世界");
|
||||
}
|
||||
|
||||
|
||||
public List<string> GetIcon()
|
||||
{
|
||||
|
||||
return Directory.GetFiles("wwwroot/icon").Select(x => "wwwroot/icon/"+ Path.GetFileName(x)).ToList();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,13 +21,11 @@ namespace Yi.Framework.Rbac.Application.Services
|
||||
public class FileService : ApplicationService, IFileService
|
||||
{
|
||||
private readonly IRepository<FileAggregateRoot> _repository;
|
||||
private readonly HttpContext _httpContext;
|
||||
private IGuidGenerator _guidGenerator;
|
||||
public FileService(IRepository<FileAggregateRoot> repository, IHttpContextAccessor httpContextAccessor, IGuidGenerator guidGenerator)
|
||||
public FileService(IRepository<FileAggregateRoot> repository, IGuidGenerator guidGenerator)
|
||||
{
|
||||
_guidGenerator = guidGenerator;
|
||||
_repository = repository;
|
||||
_httpContext = httpContextAccessor.HttpContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
<Content Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\icon\**">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -37,7 +40,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="logs\" />
|
||||
<Folder Include="wwwroot\" />
|
||||
<Folder Include="wwwroot\icon\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.OpenApi.Models;
|
||||
@@ -150,6 +151,11 @@ namespace Yi.Abp.Web
|
||||
|
||||
//swagger
|
||||
app.UseYiSwagger();
|
||||
|
||||
//静态资源
|
||||
app.UseStaticFiles("/api/app/wwwroot");
|
||||
app.UseDefaultFiles();
|
||||
app.UseDirectoryBrowser("/api/app/wwwroot");
|
||||
|
||||
//工作单元
|
||||
app.UseUnitOfWork();
|
||||
|
||||
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/0.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/1.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/2.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/3.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/4.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/5.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/6.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/8.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
Yi.Abp.Net8/src/Yi.Abp.Web/wwwroot/icon/9.png
Normal file
|
After Width: | Height: | Size: 15 KiB |