初始提交
This commit is contained in:
28
Host/ViewComponent/PagerViewComponent.cs
Normal file
28
Host/ViewComponent/PagerViewComponent.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Pass.Vpn.Domain;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ViewComponents
|
||||
{
|
||||
public class PagerModel
|
||||
{
|
||||
public int Total { get; set; }
|
||||
|
||||
public int PageSize { get; set; } = 50;
|
||||
|
||||
public int PageIndex { get; set; } = 1;
|
||||
|
||||
public string Param { get; set; }
|
||||
|
||||
public int TotalPage { get => (int)Math.Ceiling(this.Total / (this.PageSize * 1.0d)); }
|
||||
}
|
||||
public class PagerViewComponent: ViewComponent
|
||||
{
|
||||
public async Task<IViewComponentResult> InvokeAsync(PagerModel model)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Host/ViewComponent/PayOkViewComponent.cs
Normal file
13
Host/ViewComponent/PayOkViewComponent.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ViewComponents
|
||||
{
|
||||
public class PayOkViewComponent : ViewComponent
|
||||
{
|
||||
public async Task<IViewComponentResult> InvokeAsync()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Host/ViewComponent/PayWaitViewComponent.cs
Normal file
13
Host/ViewComponent/PayWaitViewComponent.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ViewComponents
|
||||
{
|
||||
public class PayWaitViewComponent : ViewComponent
|
||||
{
|
||||
public async Task<IViewComponentResult> InvokeAsync()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Host/ViewComponent/RedirecctLoginViewComponent.cs
Normal file
13
Host/ViewComponent/RedirecctLoginViewComponent.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ViewComponents
|
||||
{
|
||||
public class RedirecctLoginViewComponent : ViewComponent
|
||||
{
|
||||
public async Task<IViewComponentResult> InvokeAsync()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user