价格方案优化
This commit is contained in:
@@ -228,45 +228,13 @@
|
||||
total= total < 0 ? 0 : total;
|
||||
total = parseFloat(total.toFixed(2));
|
||||
|
||||
if(@(userEntity.agent_id) == 0){
|
||||
var consume_value = @(userEntity.ConsumeAmount);
|
||||
var cost_money = total + consume_value;
|
||||
var discount = 100;
|
||||
if (cost_money>=200 && cost_money<500){
|
||||
discount = 90;
|
||||
this.auto_discount_text = '自动升级至 9 折会员';
|
||||
} else if(cost_money>=500 && cost_money<1500) {
|
||||
discount = 80;
|
||||
this.auto_discount_text = '自动升级至 8 折会员';
|
||||
} else if(cost_money>=1500 && cost_money<3000) {
|
||||
discount = 70;
|
||||
this.auto_discount_text = '自动升级至 7 折会员';
|
||||
} else if(cost_money>=3000 && cost_money<6000) {
|
||||
discount = 65;
|
||||
this.auto_discount_text = '自动升级至 6.5 折会员';
|
||||
} else if(cost_money>=6000) {
|
||||
discount = 60;
|
||||
this.auto_discount_text = '自动升级至 6 折会员';
|
||||
}
|
||||
|
||||
var need_cost = 100000000;
|
||||
|
||||
if(discount != 100){
|
||||
need_cost = @(Model.Package.LinePrice) * this.OneBuyModel.ConnectCount * count * discount / 100 - this.OneBuyModel.CouponAmount;
|
||||
}
|
||||
|
||||
if(need_cost<total){
|
||||
total = need_cost;
|
||||
} else {
|
||||
this.auto_discount_text = '';
|
||||
}
|
||||
|
||||
|
||||
//最低价
|
||||
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount;
|
||||
if(total<min_cost){
|
||||
total = min_cost;
|
||||
}
|
||||
}
|
||||
|
||||
return total.toFixed(2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user