From 918dbd3f5facd510d217bad86f6919552f0f5305 Mon Sep 17 00:00:00 2001 From: wanyongkang <937888580@qq.com> Date: Sat, 28 Nov 2020 15:51:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E9=A1=B5=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Views/Product/Index.cshtml | 90 +++++++++++++++++++++++++++++---- 1 file changed, 81 insertions(+), 9 deletions(-) diff --git a/Host/Views/Product/Index.cshtml b/Host/Views/Product/Index.cshtml index 3adb971..96d644c 100644 --- a/Host/Views/Product/Index.cshtml +++ b/Host/Views/Product/Index.cshtml @@ -3,6 +3,7 @@ @using Hncore.Pass.BaseInfo.Response @using Hncore.Infrastructure.Serializer; @inject IConfiguration m_Configuration +@inject Hncore.Pass.Vpn.Service.ProductAccountService m_AccountService @model List @{ ViewData["Title"] = "购买产品"; @@ -27,6 +28,12 @@ var defaultPackage = productPackages.FirstOrDefault();// Model.Where(m => m.Product.Id == defaultProduct.Id).Select(m => m.Packages.FirstOrDefault()).FirstOrDefault(); var baseUrl = m_Configuration["BaseInfoUrl"]; + var restTimes = "3次"; + var restStatus = "注册即送"; + if (user != null){ + restStatus = "剩余次数"; + restTimes = await m_AccountService.GetRestTestCount(user.Id)+"次"; + } Func P = (path) => $"{baseUrl}{path}"; } +
@@ -282,15 +320,11 @@
@if (user == null) { - - + } else { - - - - + } @@ -326,6 +360,18 @@ @*

@item.Product.Name

*@
+ +
+

免费

+

@restStatus

+

@restTimes

+
+

测试卡

+

使用期限:1小时

+
+ +
+ @foreach (var package in item.Packages.Where(m => m.IsTest == 0 && m.Status == 1).OrderBy(m => m.TenantId)) { @if(package.Id == 88||package.Id == 101||package.Id == 103||package.Id == 104||(package.Id>103)){ @@ -419,6 +465,16 @@
+
+
+
+ 请先选择产品套餐^.^ +
+

+ +

+
+
@@ -426,6 +482,7 @@