From 28ae9d410bb8c37ea290d4e6c86426799cae873b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Wed, 26 May 2021 17:06:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Controllers/UserController.cs | 4 +- Host/Models/AccountSearchModel.cs | 2 +- Host/Views.Mobile/User/MyAccounts.cshtml | 55 ++++++++++++------------ Host/Views/User/MyAccounts.cshtml | 23 ++++------ 4 files changed, 40 insertions(+), 44 deletions(-) diff --git a/Host/Controllers/UserController.cs b/Host/Controllers/UserController.cs index dc27ba1..deb77fe 100644 --- a/Host/Controllers/UserController.cs +++ b/Host/Controllers/UserController.cs @@ -508,9 +508,9 @@ namespace Home.Controllers exp = exp.And(m => m.ProductId == request.ProductId); } - if (request.PackageId > 0) + if (request.PackageId != "0") { - exp = exp.And(m => m.PackageId == request.PackageId); + exp = exp.And(m => m.PackageName == request.PackageId); } if (request.ExpiredDay > -1) diff --git a/Host/Models/AccountSearchModel.cs b/Host/Models/AccountSearchModel.cs index 44efab8..5b7b911 100644 --- a/Host/Models/AccountSearchModel.cs +++ b/Host/Models/AccountSearchModel.cs @@ -11,7 +11,7 @@ namespace Home.Models public int? ExpiredDay { get; set; } = -1;//OrderType public int ProductId { get; set; } = 0; - public int PackageId { get; set; } = 0; + public string PackageId { get; set; } = "0"; } } diff --git a/Host/Views.Mobile/User/MyAccounts.cshtml b/Host/Views.Mobile/User/MyAccounts.cshtml index 2ad6f74..c554ef1 100644 --- a/Host/Views.Mobile/User/MyAccounts.cshtml +++ b/Host/Views.Mobile/User/MyAccounts.cshtml @@ -37,8 +37,29 @@ @*
为给您带来更好的服务体验,请完善QQ号和微信号
*@ +
- +
+
+ +
+
+ +
+
+
@@ -52,21 +73,12 @@
-
-
- -
-
- -
+
+
+ + @@ -318,7 +330,7 @@ searchModel: { ExpiredDay:-1, ProductId:@this.Context.Request.GetInt("ProductId"), - PackageId:@this.Context.Request.GetInt("PackageId"), + PackageId:'0', Keyword:'@this.Context.Request.Get("Keyword")', BTime: '@this.Context.Request.Get("BTime")', ETime: '@this.Context.Request.Get("ETime")', @@ -351,18 +363,7 @@ }, watch: { - 'searchModel.ProductId': { //加引号监听对象里的属性 - handler: function (newValue, oldValue) { - for (var i = 0; i < this.productWithPackage.length; i++) { - var item = this.productWithPackage[i]; - if (item.Product.Id == newValue) { - this.packages = item.Packages - return; - } - } - }, - immediate: true - } + }, mounted: function () { this.getProducts(); diff --git a/Host/Views/User/MyAccounts.cshtml b/Host/Views/User/MyAccounts.cshtml index bc65b8e..d1991d7 100644 --- a/Host/Views/User/MyAccounts.cshtml +++ b/Host/Views/User/MyAccounts.cshtml @@ -349,7 +349,13 @@
@@ -476,7 +482,7 @@ searchModel: { ExpiredDay:-1, ProductId:@this.Context.Request.GetInt("ProductId"), - PackageId:@this.Context.Request.GetInt("PackageId"), + PackageId:'0', Keyword:'@this.Context.Request.Get("Keyword")', BTime: '@this.Context.Request.Get("BTime")', ETime: '@this.Context.Request.Get("ETime")', @@ -505,18 +511,7 @@ }, watch: { - 'searchModel.ProductId': { //加引号监听对象里的属性 - handler: function (newValue, oldValue) { - for (var i = 0; i < this.productWithPackage.length; i++) { - var item = this.productWithPackage[i]; - if (item.Product.Id == newValue) { - this.packages = item.Packages - return; - } - } - }, - immediate: true - } + }, created: function () {