折扣价

This commit is contained in:
“wanyongkang”
2021-10-12 16:53:12 +08:00
parent 0676870204
commit f4918a7273
3 changed files with 69 additions and 8 deletions

View File

@@ -108,6 +108,15 @@ namespace Home.Controllers
m.Title = discount.Remark; m.Title = discount.Remark;
} else { } else {
m.Title = "9.5"; m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "7";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
} }
if(m.Price<m.MinPrice){ if(m.Price<m.MinPrice){
m.Price = m.MinPrice; m.Price = m.MinPrice;
@@ -125,6 +134,15 @@ namespace Home.Controllers
{ {
product.Packages.ForEach(m => { product.Packages.ForEach(m => {
m.Title = "9.5"; m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "7";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id && p.ProductId == m.ProductId); var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id && p.ProductId == m.ProductId);
if (userPrice != null && userPrice.UserPrice > 0) if (userPrice != null && userPrice.UserPrice > 0)
@@ -142,6 +160,15 @@ namespace Home.Controllers
{ {
product.Packages.ForEach(m => { product.Packages.ForEach(m => {
m.Title = "9.5"; m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "7";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
if (m.DayCount == 1||m.DayCount == 2 ){ if (m.DayCount == 1||m.DayCount == 2 ){
m.Price = 0.1M; m.Price = 0.1M;
} }
@@ -825,6 +852,15 @@ namespace Home.Controllers
m.Title = discount.Remark; m.Title = discount.Remark;
} else { } else {
m.Title = "9.5"; m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "7";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
} }
if(m.Price<m.MinPrice){ if(m.Price<m.MinPrice){
m.Price = m.MinPrice; m.Price = m.MinPrice;
@@ -838,6 +874,15 @@ namespace Home.Controllers
respList.Packages.ForEach(m => respList.Packages.ForEach(m =>
{ {
m.Title = "9.5"; m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "7";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id); var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id);
if (userPrice != null && userPrice.UserPrice > 0) if (userPrice != null && userPrice.UserPrice > 0)
{ {

View File

@@ -51,14 +51,24 @@
{ {
if(item.Product.Id == 6) { if(item.Product.Id == 6) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")"> <li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;"></span>@item.Product.Name</a> <a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;"></span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></a>
</li> </li>
} }
else if(item.Product.Id == 18) { else if(item.Product.Id == 18) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")"> <li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">活动</span></a> <a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">7折</span></a>
</li> </li>
} }
else if(item.Product.Id == 1||item.Product.Id == 2||item.Product.Id == 13||item.Product.Id == 14||item.Product.Id == 17||item.Product.Id == 19) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></a>
</li>
}
else if(item.Product.Id == 5) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></a>
</li>
}
else{ else{
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")"> <li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">

View File

@@ -174,7 +174,7 @@
height: 0px; height: 0px;
border: 1.0rem solid #FF9933; border: 1.0rem solid #FF9933;
border-right-color: transparent; border-right-color: transparent;
content: "送 1 天"; content: "7折+送 1 天";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000; box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
} }
@@ -202,7 +202,7 @@
height: 0px; height: 0px;
border: 1.0rem solid #FF9933; border: 1.0rem solid #FF9933;
border-right-color: transparent; border-right-color: transparent;
content: "送 3 天"; content: "7折+送 3 天";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000; box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
} }
@@ -231,7 +231,7 @@
height: 0px; height: 0px;
border: 1.0rem solid #FF9933; border: 1.0rem solid #FF9933;
border-right-color: transparent; border-right-color: transparent;
content: "送 10 天"; content: "7折+送 10 天";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000; box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
} }
@@ -260,7 +260,7 @@
height: 0px; height: 0px;
border: 1.0rem solid #FF9933; border: 1.0rem solid #FF9933;
border-right-color: transparent; border-right-color: transparent;
content: "送 1 月"; content: "7折+送 1 月";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000; box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
} }
@@ -334,10 +334,16 @@
@foreach (var item in Model) @foreach (var item in Model)
{ {
if(item.Product.Id == 18) { if(item.Product.Id == 18) {
<div class="productItem" style="" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">活动</span></div> <div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">7折</span></div>
} }
else if(item.Product.Id == 6) { else if(item.Product.Id == 6) {
<div class="productItem" style="" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;"> </span>@item.Product.Name</div> <div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;"> </span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></div>
}
else if(item.Product.Id == 1||item.Product.Id == 2||item.Product.Id == 13||item.Product.Id == 14||item.Product.Id == 17||item.Product.Id == 19) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></div>
}
else if(item.Product.Id == 5) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></div>
} }
else { else {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name </div> <div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name </div>