From 746edaf5db60de3c277effe2fa2cfbdda673fb50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”>
Date: Fri, 23 Apr 2021 18:17:13 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E8=87=AA=E5=8A=A8=E5=8D=87?=
=?UTF-8?q?=E7=BA=A7=E6=8A=98=E6=89=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Host/Views.Mobile/Product/buy.cshtml | 88 ++++++++++++++++++++++++++
Host/Views.Mobile/Product/rebuy.cshtml | 44 +++++++++++++
Host/Views/Product/buy.cshtml | 4 ++
Host/Views/Product/rebuy.cshtml | 1 +
4 files changed, 137 insertions(+)
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