diff --git a/Host/Views.Mobile/Product/buy.cshtml b/Host/Views.Mobile/Product/buy.cshtml
index a271dd4..e254afb 100644
--- a/Host/Views.Mobile/Product/buy.cshtml
+++ b/Host/Views.Mobile/Product/buy.cshtml
@@ -218,7 +218,7 @@
{{OnePayAmount}}元
-
每隔30天淘宝下单可获得一张优惠券
+ 淘宝每次下单获得优惠券
{{Tip}}
@@ -348,7 +348,7 @@
{{MorePayAmount}}元
- 每隔30天淘宝下单可获得一张优惠券
+ 淘宝每次下单获得优惠券
{{Tip}}
diff --git a/Host/Views.Mobile/Product/rebuy.cshtml b/Host/Views.Mobile/Product/rebuy.cshtml
index 9ad02fe..303e3ad 100644
--- a/Host/Views.Mobile/Product/rebuy.cshtml
+++ b/Host/Views.Mobile/Product/rebuy.cshtml
@@ -173,7 +173,7 @@
{{PayAmount}}元
- 每隔30天淘宝下单可获得一张优惠券
+ 淘宝每次下单获得优惠券
{{Tip}}
diff --git a/Host/Views/Product/Index.cshtml b/Host/Views/Product/Index.cshtml
index 3318573..40dd235 100644
--- a/Host/Views/Product/Index.cshtml
+++ b/Host/Views/Product/Index.cshtml
@@ -782,7 +782,7 @@
} *@
- else if(package.Id == 1||package.Id == 1002||package.Id == 1003||package.Id == 4||package.Id == 7||package.Id == 12||package.Id == 17||package.Id == 22||package.Id == 27||package.Id == 32||package.Id == 37||package.Id == 42||package.Id == 62||package.Id == 69||package.Id == 73||package.Id == 80) {
+ else if(package.Id == 1||package.Id == 1002||package.Id == 4||package.Id == 7||package.Id == 12||package.Id == 17||package.Id == 22||package.Id == 27||package.Id == 32||package.Id == 37||package.Id == 42||package.Id == 62||package.Id == 69||package.Id == 73||package.Id == 80) {
@package.Price元
diff --git a/Host/Views/Product/buy.cshtml b/Host/Views/Product/buy.cshtml
index d6c6294..4c3dbbb 100644
--- a/Host/Views/Product/buy.cshtml
+++ b/Host/Views/Product/buy.cshtml
@@ -194,7 +194,7 @@
- 每隔30天淘宝下单可获得一张优惠券
+ 淘宝每次下单获得优惠券
@@ -345,7 +345,7 @@
- 每隔30天淘宝下单可获得一张优惠券
+ 淘宝每次下单获得优惠券
@@ -500,6 +500,11 @@
var restAmout = this.OneBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount ;
total = total < 0 ? 0 : total;
+
+ //西瓜极客优惠券
+ if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
+ total -= this.OneBuyModel.ConnectCount * (this.OneBuyModel.Price - 52.8)
+ }
return total.toFixed(2);
},
MoreTotalAmount: function () {
@@ -510,12 +515,20 @@
var restAmout = this.MoreBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
var total = this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.MoreBuyModel.CouponAmount ;
total = total < 0 ? 0 : total;
+
+ //西瓜极客优惠券
+ if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
+ total -= this.MoreBuyModel.ConnectCount * (this.MoreBuyModel.Price - 52.8) * this.MoreBuyModel.MaxPostfix
+ }
return total.toFixed(2);
}
},
watch: {
'OneBuyModel.CouponId': { //加引号监听对象里的属性
handler: function (newValue, oldValue) {
+ if( this.OneBuyModel.CouponId == 10000000){
+ return;
+ }
var totalAmount = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount;
for (var i = 0; i < this.Coupons.length; i++) {
var item = this.Coupons[i];
@@ -544,6 +557,9 @@
},
'MoreBuyModel.CouponId': { //加引号监听对象里的属性
handler: function (newValue, oldValue) {
+ if( this.OneBuyModel.CouponId == 10000000){
+ return;
+ }
var totalAmount = this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount;
for (var i = 0; i < this.Coupons.length; i++) {
var item = this.Coupons[i];
@@ -585,6 +601,10 @@
immediate: true
}
},
+ created () {
+ this.OneBuyModel.CouponId = 10000000
+ this.MoreBuyModel.CouponId = 10000000
+ },
mounted: function () {
@if(user != null) {
this.getCoupons()
@@ -605,8 +625,17 @@
type: 'GET',
url: url,
success: function (res) {
- console.log(res);
if (res.Code == 10000) {
+ if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
+ var coupon_json = {
+ "Coupon":{
+ "Id":10000000,
+ "Name":"极客-西瓜-满减劵",
+ }
+ }
+ res.Data.push(coupon_json);
+ }
+ console.log(res.Data)
that.Coupons = res.Data.map(m => m.Coupon);
}
}
diff --git a/Host/Views/Product/rebuy.cshtml b/Host/Views/Product/rebuy.cshtml
index 02b97be..c8def72 100644
--- a/Host/Views/Product/rebuy.cshtml
+++ b/Host/Views/Product/rebuy.cshtml
@@ -157,7 +157,7 @@
- 每隔30天淘宝下单可获得一张优惠券
+ 淘宝每次下单获得优惠券
@@ -280,12 +280,19 @@
var restAmout = this.OneBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount ;
total= total < 0 ? 0 : total;
+ //西瓜极客优惠券
+ if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
+ total -= this.OneBuyModel.ConnectCount * (this.OneBuyModel.Price - 52.8)
+ }
return total.toFixed(2);
}
},
watch: {
'OneBuyModel.CouponId': { //加引号监听对象里的属性
handler: function (newValue, oldValue) {
+ if( this.OneBuyModel.CouponId == 10000000){
+ return;
+ }
var totalAmount = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount;
for (var i = 0; i < this.Coupons.length; i++) {
var item = this.Coupons[i];
@@ -321,6 +328,9 @@
mounted: function () {
this.getCoupons();
},
+ created () {
+ this.OneBuyModel.CouponId = 10000000
+ },
methods: {
getCoupons: function () {
var that = this;
@@ -330,7 +340,16 @@
url: url,
success: function (res) {
console.log(res);
- if (res.Code == 10000) {
+ if (res.Code == 10000) {
+ if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
+ var coupon_json = {
+ "Coupon":{
+ "Id":10000000,
+ "Name":"极客-西瓜-满减劵",
+ }
+ }
+ res.Data.push(coupon_json);
+ }
that.Coupons = res.Data.map(m => m.Coupon);
}
}
diff --git a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs
index d197c4e..1d9f466 100644
--- a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs
+++ b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs
@@ -258,6 +258,9 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var is_user_price = true;
var price = packageEntity.Price;
+ if(packageEntity.Id == 64||packageEntity.Id==1004){
+ price = 52.8M;
+ }
var userPrice = await this.m_ProductUserPriceService.Query(true).FirstOrDefaultAsync(m => m.UserId == userId && m.PackageId == packageEntity.Id && m.Status == 1);
if (userPrice != null && userPrice.UserPrice > 0)
{
@@ -372,7 +375,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var userEntity = await m_UserService.GetById(order.UserId);
//使用优惠券
var couponAmount = 0m;
- if (order.CouponId > 0)
+ if (order.CouponId > 0 && order.CouponId != 10000000)
{
var currentCoupon = await m_CouponService.GetOneUserAvailableCoupon(userEntity.Id, order.CouponId.Value);
if(currentCoupon.Coupon.Id<16 ){