diff --git a/Host/Views.Mobile/Product/buy.cshtml b/Host/Views.Mobile/Product/buy.cshtml
index 1b7f8af..932cc97 100644
--- a/Host/Views.Mobile/Product/buy.cshtml
+++ b/Host/Views.Mobile/Product/buy.cshtml
@@ -220,6 +220,14 @@
{{OnePayAmount}}元
+
+
+
+
淘宝每次下单获得优惠券
@@ -352,6 +360,13 @@
{{MorePayAmount}}元
+
+
+
+
+
{{auto_discount_text}}
+
+
淘宝每次下单获得优惠券
{{Tip}}
@@ -381,6 +396,7 @@
var app = new Vue({
el: '#app',
data: {
+ auto_discount_text:'',
acount_list:'',
showPayType:true,
payHandler:null,
@@ -440,6 +456,42 @@
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;
+ 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 * discount / 100 - this.OneBuyModel.CouponAmount;
+ }
+
+ if(need_cost=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.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix * discount / 100 - this.MoreBuyModel.CouponAmount;
+ }
+
+ if(need_cost{{PayAmount}}元
+
+
+
+
+
{{auto_discount_text}}
+
+
淘宝每次下单获得优惠券
{{Tip}}
@@ -187,6 +194,7 @@
var app = new Vue({
el: '#app',
data: {
+ auto_discount_text:'',
showPayType: true,
Tip:'',
RestAmount: @(userEntity.RestAmount),
@@ -218,6 +226,42 @@
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;
+ 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 * discount / 100 - this.OneBuyModel.CouponAmount;
+ }
+
+ if(need_cost