build: 升级目标框架到net10.0并完善模板配置

1. 将Hua.Cli.Tests、项目共享库、模块项目等所有项目的TargetFramework从net8.0/net9.0升级到net10.0
2. 完善dotnet-tools.json、模板配置文件,添加必要的构建和发布配置
3. 新增微服务、网关、应用程序的启动脚本和基础配置文件
4. 补充产品管理模块的领域、应用、Web层基础代码和多语言资源
This commit is contained in:
ShaoHua
2026-07-16 02:43:29 +08:00
parent 2a6f5f81b7
commit 734b2c91f9
264 changed files with 7132 additions and 451 deletions
@@ -0,0 +1,158 @@
@page
@using Volo.Abp.Users
@model Company.Project.PublicWebSite.Pages.IndexModel
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@inject ICurrentUser CurrentUser
@{
Layout = ThemeManager.CurrentTheme.GetApplicationLayout();
}
@section styles{
<style>
</style>
}
<div class="pb-5 px-5">
<div class="jumbotron text-center px-5 py-5">
<h1 class=" p-4">Public Web Site Application</h1>
<h4>Welcome to our web site...</h4>
<p>
This is a simple hero unit, a simple jumbotron-style component
for calling extra attention to featured content or information.
</p>
<p class="lead">
@if (CurrentUser.IsAuthenticated)
{
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">Logout</a>
}
else
{
<form method="POST">
<input type="submit" asp-page-handler="Login" value="LOGIN" class="btn btn-primary px-4 btn-md" />
</form>
}
</p>
</div>
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-header">
<h5 class="m-0">What is New?</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-4">
<img src="~/product-images/asus.jpg" width="64" />
</div>
<div class="col-8">
<div>
<h6>Asus Transformer Book T300CHI-FH011H</h6>
</div>
<strong class="product-price text-danger">1249</strong>
</div>
</div>
<hr />
<div class="row">
<div class="col-4">
<img src="~/product-images/playstation.jpg" width="64" />
</div>
<div class="col-8">
<div>
<h6>Lego Star Wars - 75059 Sandcrawler UCS</h6>
</div>
<strong class="product-price text-danger">$999</strong>
</div>
</div>
<hr />
<div class="row">
<div class="col-4">
<img src="~/product-images/nikon.jpg" width="64" />
</div>
<div class="col-8">
<div>
<h6>Nikon AF-S 50mm f/1.8 G Lens</h6>
</div>
<strong class="product-price text-danger">$1499</strong>
</div>
</div>
</div>
<div class="card-footer">
<a href="/Products" class="btn btn-block btn-md btn-primary">See All Products</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header">
<h5 class="m-0">What is Hot?</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col">
<div>
<h6>
Aliquam erat volutpat. Praesent nec dapibus neque. Proin hendrerit, magna in faucibus
</h6>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col">
<div>
<h6>Curabitur consectetur libero lacus, nec facilisis nulla facilisis non.</h6>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col">
<div>
<h6>Duis et felis nec ipsum auctor . </h6>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col">
<div>
<h6>Morbi eu dolor pellentesque, porttitor lorem vitae, pulvinar eros. </h6>
</div>
</div>
</div>
</div>
<div class="card-footer">
<a href="#" class="btn btn-block btn-md btn-primary">Go to the Articles</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header">
<h5 class="m-0">Contact Us</h5>
</div>
<div class="card-body">
<label class="name lead">Volosoft</label> <br>
<span class="fa fa-fw fa-map-marker fa-fw text-muted" data-toggle="tooltip" title="" data-original-title="3903 W Alexander Rd"></span> <span class="text-muted">47322 W Alexander Rd</span> <br> <span class="fa fa-fw fa-phone fa-fw text-muted" data-toggle="tooltip" title="" data-original-title="(867) 322-1852"></span> <span class="text-muted small">(867) 322-5566</span> <br> <span class="fa fa-fw fa-envelope fa-fw text-muted" data-toggle="tooltip" title="" data-original-title="debbie.schmidt@example.com"></span> <span class="text-muted small text-truncate">info@volosoft.com</span>
<hr />
<p>
We are developing open source and commercial software development tools.
</p>
<p>
Praesent et posuere dui.
felis.
</p>
</div>
<div class="card-footer">
<a href="#" class="btn btn-block btn-md btn-primary">Contact Us</a>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,18 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace Company.Project.PublicWebSite.Pages;
public class IndexModel : AbpPageModel
{
public void OnGet()
{
}
public async Task OnPostLoginAsync()
{
await HttpContext.ChallengeAsync("oidc");
}
}
@@ -0,0 +1,55 @@
@page
@using ProductManagement
@using Volo.Abp.Settings
@model Company.Project.PublicWebSite.Pages.ProductsModel
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@inject ISettingProvider SettingProvider
@{
const int columnSize = 3;
Layout = ThemeManager.CurrentTheme.GetApplicationLayout();
}
@section styles{
<link href="~/Pages/Products.css" rel="stylesheet" />
}
<h3 class="pt-5 pb-4 text-center">Our Products</h3>
<div class="product-list">
@for (int i = 0; i < Math.Ceiling(Model.Products.Items.Count / (double)columnSize); i++)
{
<abp-row>
@for (int j = 0; j < columnSize; j++)
{
<abp-column size-lg="_4" size-md="_6" size-sm="_12">
@if ((i * columnSize) + j < Model.Products.Items.Count)
{
var product = Model.Products.Items[(i * columnSize) + j];
<div class="product-list-item">
@if (!product.ImageName.IsNullOrEmpty())
{
<img src="/product-images/@product.ImageName" />
}
else
{
<img src="/product-images/noimage.jpg" />
}
<div class="row mt-5">
<div class="col">
<div class="product-info-box">
<h6>@product.Name</h6>
<em class="d-block text-muted">@product.Code - Stock count: @product.StockCount</em>
</div>
</div>
<div class="col-auto text-right text-danger">
<strong class="product-price">$@product.Price</strong>
</div>
</div>
</div>
}
</abp-column>
}
</abp-row>
}
</div>
@* An example to show how to read settings from the client side / UI *@
<p class="text-muted mt-5"><i>Maximum allowed page size: @await SettingProvider.GetOrNullAsync(ProductManagementSettings.MaxPageSize)</i></p>
@@ -0,0 +1,23 @@
using System.Threading.Tasks;
using ProductManagement;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace Company.Project.PublicWebSite.Pages;
public class ProductsModel : AbpPageModel
{
public ListResultDto<ProductDto> Products { get; set; }
private readonly IPublicProductAppService _productAppService;
public ProductsModel(IPublicProductAppService productAppService)
{
_productAppService = productAppService;
}
public async Task OnGetAsync()
{
Products = await _productAppService.GetListAsync();
}
}
@@ -0,0 +1,30 @@
body {
background-color: #f9f9f9;
}
.product-list-item {
background-color: #fff;
padding: 2em;
border: 1px solid #eee;
border-radius: 3px;
box-shadow: 0 0 10px rgba(0, 0, 0, .05);
margin-bottom: 2em;
transition: all .2s;
}
.product-list-item:hover {
box-shadow: 0 0 20px rgba(0, 0, 0, .1);
cursor: pointer;
}
.product-list-item img {
width: 100%;
}
.product-list-item .text-muted {
opacity: .8
}
.product-info-box {
min-height: 80px;
}
@@ -0,0 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling