极客西瓜月卡自动优惠券
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
<span class="yingfu" style="font-size: 35px;font-weight: bold;">{{OnePayAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<p class="grayText songquan">每隔30天淘宝下单可获得一张优惠券</p>
|
||||
<p class="grayText songquan">淘宝每次下单获得优惠券</p>
|
||||
<p class="redText songquan">{{Tip}}</p>
|
||||
<div class="ok">
|
||||
<button type="button" class="btnPay pay-botton" v-on:click="onePay">确认支付</button>
|
||||
@@ -348,7 +348,7 @@
|
||||
<span class="yingfu">{{MorePayAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<p class="grayText songquan">每隔30天淘宝下单可获得一张优惠券</p>
|
||||
<p class="grayText songquan">淘宝每次下单获得优惠券</p>
|
||||
<p class="redText songquan">{{Tip}}</p>
|
||||
<div class="ok">
|
||||
<button type="button" class="btnPay pay-botton" @@click="morePay">确认支付</button>
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
<span class="yingfu" style="font-size: 35px;font-weight: bold;">{{PayAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<p class="grayText songquan">每隔30天淘宝下单可获得一张优惠券</p>
|
||||
<p class="grayText songquan">淘宝每次下单获得优惠券</p>
|
||||
<p class="grayText songquan" style="color:red">{{Tip}}</p>
|
||||
<div class="ok">
|
||||
<button type="button" class="pay-botton btnPay" v-on:click="onePay">确认支付</button>
|
||||
|
||||
@@ -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) {
|
||||
<div class="item packageitem packageitem71" id="@("pkg"+package.Id)" a-pkg-id="@package.Id">
|
||||
|
||||
<p><span class="price">@package.Price</span>元</p>
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 text-left">
|
||||
<span class="grayText">每隔30天淘宝下单可获得一张优惠券</span>
|
||||
<span class="grayText">淘宝每次下单获得优惠券</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -345,7 +345,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 text-left">
|
||||
<span class="grayText">每隔30天淘宝下单可获得一张优惠券</span>
|
||||
<span class="grayText">淘宝每次下单获得优惠券</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -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) {
|
||||
<text>this.getCoupons()</text>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 text-left">
|
||||
<span class="grayText">每隔30天淘宝下单可获得一张优惠券</span>
|
||||
<span class="grayText">淘宝每次下单获得优惠券</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ){
|
||||
|
||||
Reference in New Issue
Block a user