From abbef158af9e06e4cc4283632eeb4cbec6d8f076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Sat, 24 Feb 2024 13:58:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Controllers/ProductController.cs | 14 ++++++++ Host/Controllers/UserController.cs | 6 ++++ Host/Views.Mobile/LineList/Index.cshtml | 14 +++++++- Host/Views.Mobile/Product/Index.cshtml | 17 +++++---- Host/Views.Mobile/Product/Test.cshtml | 6 +++- Host/Views.Mobile/Product/buy.cshtml | 18 ++++++++++ Host/Views.Mobile/Shared/_Layout.cshtml | 22 ++++++------ Host/Views.Mobile/Shared/_UserLayout.cshtml | 36 +++++++++---------- Host/Views.Mobile/User/MyAccounts.cshtml | 2 +- Host/Views/LineList/Index.cshtml | 4 ++- Host/Views/Product/ReBuyIndex.cshtml | 2 +- Host/Views/Product/Test.cshtml | 6 +++- Host/Views/Product/buy.cshtml | 5 +-- Host/Views/User/Index.cshtml | 4 ++- Host/Views/User/upload.cshtml | 25 +++++++++++++ .../Service/ProductAccountService.cs | 12 +++++++ 16 files changed, 149 insertions(+), 44 deletions(-) create mode 100644 Host/Views/User/upload.cshtml diff --git a/Host/Controllers/ProductController.cs b/Host/Controllers/ProductController.cs index 39eb058..0b44e6e 100644 --- a/Host/Controllers/ProductController.cs +++ b/Host/Controllers/ProductController.cs @@ -844,6 +844,8 @@ namespace Home.Controllers [HttpGet] public async Task ReBuyIndex(string accounts,int productId=0) { + + ViewBag.accounts = ""; ViewBag.errorTip = ""; var model = new ProductWithPackageResponse(); @@ -852,8 +854,15 @@ namespace Home.Controllers ViewBag.errorTip = "请选择账号"; return View(model); } + var accountList = await m_ProductAccountService.GetAccounts(accounts); + var flag = true; + if (productId == 26 || productId == 14) { + flag =await m_ProductAccountService.CheckAccountagentExist(productId, accounts.Split(',').ToList()); + } + + if (productId > 0) accountList = accountList.Where(m => m.ProductId == productId).ToList(); var productIds = accountList.Select(m => m.ProductId); @@ -1188,6 +1197,11 @@ namespace Home.Controllers } return_list.Packages = package_temp; + if (!flag) + { + ViewBag.errorTip = "1231312"; + return View(return_list); + } return View(return_list); } diff --git a/Host/Controllers/UserController.cs b/Host/Controllers/UserController.cs index be79fb5..82b04f9 100644 --- a/Host/Controllers/UserController.cs +++ b/Host/Controllers/UserController.cs @@ -597,6 +597,12 @@ namespace Home.Controllers var userId =this.Request.GetUserInfo().UserId; return View(); } + [HttpGet] + [UserAuth] + public IActionResult upload() + { + return View(); + } [HttpGet] [UserAuth] diff --git a/Host/Views.Mobile/LineList/Index.cshtml b/Host/Views.Mobile/LineList/Index.cshtml index 1a489ae..56e0106 100644 --- a/Host/Views.Mobile/LineList/Index.cshtml +++ b/Host/Views.Mobile/LineList/Index.cshtml @@ -279,6 +279,7 @@ info: {}, count:'0', use_count:'0', + all_data:'', }, computed: { @@ -406,7 +407,17 @@ use_count = res.use_count; } }); - this.table_data = datalist; + + if (ProductId == 0){ + this.all_data = datalist; + let now_data = []; + for (let i = 0;i<50;i++){ + now_data[i] = datalist[i]; + } + this.table_data = now_data; + } else { + this.table_data = datalist; + } this.count = count; this.use_count = use_count; }, @@ -507,6 +518,7 @@ } }, detail(r){ + $(".layerTable").show(); this.info= r; }, diff --git a/Host/Views.Mobile/Product/Index.cshtml b/Host/Views.Mobile/Product/Index.cshtml index 8ad9e1b..3cc8a01 100644 --- a/Host/Views.Mobile/Product/Index.cshtml +++ b/Host/Views.Mobile/Product/Index.cshtml @@ -74,7 +74,10 @@ top: 0; z-index: 99999; } - +.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { + background-color:#cbd3d3; + color:white !important; +} .loader-inner { bottom: 0; height: 60px; @@ -234,17 +237,19 @@ @foreach (var item in Model) {
-
-

@item.Product.Name 简介

-
-
    +
    +

    @item.Product.Name 简介:

    + 点击查看各产品对比
    需求5个以上,可联系客服优惠
    +
    +
    +
      @foreach (var str in item.Product.ContentLine) {
    • ·@str
    • }
    -

    需求五个以上、可联系右侧客服设置优惠价

    +
    diff --git a/Host/Views.Mobile/Product/Test.cshtml b/Host/Views.Mobile/Product/Test.cshtml index eebdb37..d058fb6 100644 --- a/Host/Views.Mobile/Product/Test.cshtml +++ b/Host/Views.Mobile/Product/Test.cshtml @@ -18,7 +18,7 @@ } var product_id = Model.Product.Id; - if (product_id == 27) { + if (product_id == 27||product_id == 6) { randomPwd = ValidateCodeHelper.MakeNumCode(6).ToLower(); } } @@ -110,6 +110,10 @@ $(".tip").text("账户和密码不能为空"); return; } + if (data.ProductId == 6 && data.Pwd.length<6) { + $(".tip").text("密码要大于6位"); + return; + } $.ajax({ type: 'POST', url: '/api/course/v1/productaccount/CreateTestAccount', diff --git a/Host/Views.Mobile/Product/buy.cshtml b/Host/Views.Mobile/Product/buy.cshtml index 02a9de2..f067f5d 100644 --- a/Host/Views.Mobile/Product/buy.cshtml +++ b/Host/Views.Mobile/Product/buy.cshtml @@ -688,6 +688,15 @@ return true; }, checkOnePwd() { + if (productId == 27 || productId == 6) { + if (this.OneBuyModel.Pwd.length < 7 || this.OneBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) { + alert("此产品密码必须大于6位"); + this.OneChecker.PwdOk = false; + return false; + } + this.OneChecker.PwdOk = true; + return true; + } if (this.OneBuyModel.Pwd.length > 6 || this.OneBuyModel.Pwd.length <1 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) { this.OneChecker.PwdOk = false; alert('密码长度必须在1-6位,且不能包含特殊字符'); @@ -717,6 +726,15 @@ return true; }, checkMorePwd() { + if (productId == 27 || productId == 6) { + if (this.MoreBuyModel.Pwd.length < 7 || this.MoreBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) { + alert("此产品密码必须大于6位"); + this.MoreChecker.PwdOk = false; + return false; + } + this.MoreChecker.PwdOk = true; + return true; + } if (this.MoreBuyModel.Pwd.length > 6 || this.MoreBuyModel.Pwd.length < 1 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) { this.MoreChecker.PwdOk = false; alert('密码长度必须在1-6位,且不能包含特殊字符'); diff --git a/Host/Views.Mobile/Shared/_Layout.cshtml b/Host/Views.Mobile/Shared/_Layout.cshtml index b7ea5da..04ce68d 100644 --- a/Host/Views.Mobile/Shared/_Layout.cshtml +++ b/Host/Views.Mobile/Shared/_Layout.cshtml @@ -161,25 +161,25 @@
    diff --git a/Host/Views.Mobile/Shared/_UserLayout.cshtml b/Host/Views.Mobile/Shared/_UserLayout.cshtml index 8876c34..4292a3d 100644 --- a/Host/Views.Mobile/Shared/_UserLayout.cshtml +++ b/Host/Views.Mobile/Shared/_UserLayout.cshtml @@ -48,24 +48,24 @@
    diff --git a/Host/Views.Mobile/User/MyAccounts.cshtml b/Host/Views.Mobile/User/MyAccounts.cshtml index 4d33673..12eb7ab 100644 --- a/Host/Views.Mobile/User/MyAccounts.cshtml +++ b/Host/Views.Mobile/User/MyAccounts.cshtml @@ -140,7 +140,7 @@ @item.ProductName/@item.PackageName - @item.Account + @item.Account
    @item.Pwd