...
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Service">
|
<Reference Include="Service">
|
||||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@@ -29,10 +29,18 @@ namespace Back.Controllers
|
|||||||
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());
|
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());
|
||||||
|
|
||||||
return Ok(new VerificationCodeDto {
|
return Ok(new VerificationCodeDto {
|
||||||
|
ID = ID,
|
||||||
|
Code="",
|
||||||
prm= _getVerificationValidation.verificationCode.prm,
|
prm= _getVerificationValidation.verificationCode.prm,
|
||||||
Type= _getVerificationValidation.verificationCode.Type,
|
Type= _getVerificationValidation.verificationCode.Type,
|
||||||
val= _getVerificationValidation.verificationCode.val
|
val= _getVerificationValidation.verificationCode.val
|
||||||
});
|
});;
|
||||||
|
}
|
||||||
|
[HttpPost("Submit")]
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<ActionResult<bool>> Submit(VerificationCodeDto item)
|
||||||
|
{
|
||||||
|
return Ok(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -8,8 +9,15 @@ namespace Shared.DTOs
|
|||||||
{
|
{
|
||||||
public class VerificationCodeDto
|
public class VerificationCodeDto
|
||||||
{
|
{
|
||||||
|
[Required(ErrorMessage ="ID نمیتواند خالی باشد")]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required(ErrorMessage = "کد نمیتواند خالی باشد")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
[Required(ErrorMessage = "prm نمیتواند خالی باشد")]
|
||||||
public string prm { get; set; }
|
public string prm { get; set; }
|
||||||
|
[Required(ErrorMessage = "val نمیتواند خالی باشد")]
|
||||||
public string val { get; set; }
|
public string val { get; set; }
|
||||||
|
[Required(ErrorMessage = "Type نمیتواند خالی باشد")]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,6 +118,8 @@
|
|||||||
|
|
||||||
editContext = new EditContext(modelTaxTools);
|
editContext = new EditContext(modelTaxTools);
|
||||||
messageStore = new(editContext);
|
messageStore = new(editContext);
|
||||||
|
|
||||||
|
base.OnInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void HandleValidationRequested(object? sender,
|
// private void HandleValidationRequested(object? sender,
|
||||||
|
@@ -8,17 +8,15 @@
|
|||||||
<!-- tp-banner-area-start -->
|
<!-- tp-banner-area-start -->
|
||||||
<div class="signin-banner-area signin-banner-main-wrap d-flex align-items-center">
|
<div class="signin-banner-area signin-banner-main-wrap d-flex align-items-center">
|
||||||
<div class="signin-banner-left-box signin-banner-bg p-relative">
|
<div class="signin-banner-left-box signin-banner-bg p-relative">
|
||||||
|
<div class="signin-banner-bottom-shape">
|
||||||
<div class="signin-banner-left-wrap">
|
<img src="img/login/login-shape-1.png" alt="">
|
||||||
<div class="pt-20 pb-20">
|
|
||||||
<div class="signin-banner-title-box">
|
|
||||||
<h4>
|
|
||||||
برای ادامه نیاز است هویت شما تائید شود
|
|
||||||
</h4>
|
|
||||||
<h6 style="color:red;">
|
|
||||||
کد ارسالی را وارد نمایید
|
|
||||||
</h6>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="signin-banner-left-wrap">
|
||||||
|
<div class="signin-banner-title-box mb-100">
|
||||||
|
<br />
|
||||||
|
<h4 class="signin-banner-title" style="color:black">
|
||||||
|
لطفا کد ارسالی را وارد نمایید
|
||||||
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="signin-banner-img-box position-relative">
|
<div class="signin-banner-img-box position-relative">
|
||||||
<div class="signin-banner-img signin-img-1 d-none d-md-block z-index-3">
|
<div class="signin-banner-img signin-img-1 d-none d-md-block z-index-3">
|
||||||
@@ -34,8 +32,6 @@
|
|||||||
<img src="img/login/login-4.png" alt="">
|
<img src="img/login/login-4.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signin-banner-from d-flex justify-content-center align-items-center">
|
<div class="signin-banner-from d-flex justify-content-center align-items-center">
|
||||||
@@ -46,21 +42,39 @@
|
|||||||
|
|
||||||
<div class="signin-banner-from-box">
|
<div class="signin-banner-from-box">
|
||||||
|
|
||||||
<EditForm Model="Code" OnSubmit="Submit">
|
<EditForm EditContext="editContext" OnValidSubmit="SubmitVerificationCode">
|
||||||
|
|
||||||
|
|
||||||
|
<DataAnnotationsValidator />
|
||||||
|
|
||||||
|
|
||||||
|
<InputNumber @bind-Value="VerificationCodeModel.ID" id="ID" />
|
||||||
|
<InputText @bind-Value="VerificationCodeModel.prm" id="prm" type="text" class="inputText" required="" />
|
||||||
|
<InputText @bind-Value="VerificationCodeModel.val" id="val" type="text" class="inputText" required="" />
|
||||||
|
<InputText @bind-Value="VerificationCodeModel.Type" id="Type" type="text" class="inputText" required="" />
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="postbox__comment-input mb-30">
|
<div class="postbox__comment-input mb-30">
|
||||||
<InputNumber @bind-Value="Code" id="Code" type="text" class="form-control text-center" required="" />
|
<InputText @bind-Value="VerificationCodeModel.Code" id="Code" type="text" class="inputText" required="" />
|
||||||
<span class="floating-label">کد تائید</span>
|
<span class="floating-label">کد تائید</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signin-banner-from-btn mb-20">
|
<div class="signin-banner-from-btn mb-20">
|
||||||
<button type="submit" class="signin-btn ">احراز</button>
|
<button type="submit" class="signin-btn">احراز</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="postbox__comment-input mb-35">
|
||||||
|
<ValidationMessage For="()=>VerificationCodeModel.ID" />
|
||||||
|
<ValidationMessage For="()=>VerificationCodeModel.Code" />
|
||||||
|
<ValidationMessage For="()=>VerificationCodeModel.prm" />
|
||||||
|
<ValidationMessage For="()=>VerificationCodeModel.val" />
|
||||||
|
<ValidationMessage For="()=>VerificationCodeModel.Type" />
|
||||||
|
|
||||||
|
</div>
|
||||||
</EditForm>
|
</EditForm>
|
||||||
|
|
||||||
|
|
||||||
<div class="signin-banner-from-register">
|
<div class="signin-banner-from-register">
|
||||||
<NavLink href="Register">کد ارسال نشد؟ <span>ارسال مجدد</span></NavLink>
|
<NavLink href="Register">کد ارسال نشد؟ <span>ارسال مجدد</span></NavLink>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,20 +87,28 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private EditContext? editContext;
|
||||||
|
private ValidationMessageStore? messageStore;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
|
|
||||||
[SupplyParameterFromForm]
|
// [SupplyParameterFromForm]
|
||||||
public int Code { get; set; }
|
public VerificationCodeDto? VerificationCodeModel { get; set; } = new VerificationCodeDto();
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
editContext = new EditContext(VerificationCodeModel);
|
||||||
|
messageStore = new(editContext);
|
||||||
|
base.OnInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
public VerificationCodeDto Model { get; set; }
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
var request = await _hc.GetAsync($"Verification/GetVerification/{ID}");
|
var request = await _hc.GetAsync($"Verification/GetVerification/{ID}");
|
||||||
if (request.IsSuccessStatusCode)
|
if (request.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
|
|
||||||
Model = await request.Content.ReadFromJsonAsync<VerificationCodeDto>();
|
VerificationCodeModel = await request.Content.ReadFromJsonAsync<VerificationCodeDto>();
|
||||||
// nav.NavigateTo($"Verification/{res}");
|
// nav.NavigateTo($"Verification/{res}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -97,29 +119,28 @@
|
|||||||
await base.OnParametersSetAsync();
|
await base.OnParametersSetAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@functions{
|
@functions {
|
||||||
|
|
||||||
private void Submit()
|
private async Task SubmitVerificationCode()
|
||||||
|
{
|
||||||
|
var request = await _hc.PostAsJsonAsync($"Verification/Submit", VerificationCodeModel);
|
||||||
|
if (request.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
|
||||||
|
var status = await request.Content.ReadFromJsonAsync<bool>();
|
||||||
|
if (status)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
// nav.NavigateTo($"Verification/{res}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nav.NavigateTo($"/");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<script src="~/js/vendor/jquery-3.2.1.min.js"></script>
|
|
||||||
<script src="~/js/vendor/animsition.min.js"></script>
|
|
||||||
<script src="~/js/vendor/popper.js"></script>
|
|
||||||
<script src="~/js/vendor/bootstrap.min.js"></script>
|
|
||||||
<script src="~/js/vendor/select2.min.js"></script>
|
|
||||||
<script src="~/js/vendor/moment.min.js"></script>
|
|
||||||
<script src="~/js/vendor/daterangepicker.js"></script>
|
|
||||||
<script src="~/js/vendor/countdowntime.js"></script>
|
|
||||||
<script src="~/js/vendor/main.js"></script>
|
|
||||||
|
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-23581568-13"></script>
|
|
||||||
<script>
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
|
||||||
function gtag() { dataLayer.push(arguments); }
|
|
||||||
gtag('js', new Date());
|
|
||||||
|
|
||||||
gtag('config', 'UA-23581568-13');
|
|
||||||
</script>
|
|
||||||
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"846c94483adc6ae1","version":"2023.10.0","token":"cd0b4b3a733644fc843ef0b185f98241"}' crossorigin="anonymous"></script>
|
|
||||||
|
@@ -7,9 +7,9 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|||||||
builder.RootComponents.Add<App>("#app");
|
builder.RootComponents.Add<App>("#app");
|
||||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||||
|
|
||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||||
|
|
||||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||||
|
|
||||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user