Browse Source

新版超级订阅11月计价改为一年

wangkaiyue 4 năm trước cách đây
mục cha
commit
6ebc8a37f5

+ 7 - 5
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/price.js

@@ -46,7 +46,7 @@ var Calculation = {
             },
             "provincePrice": 3800,
             "provinceMaxCount": 15,
-            "monthMaxCount": 9
+            "monthMaxCount": 10
         },
         "discount": 1
     }, //套餐价格表
@@ -59,7 +59,7 @@ var Calculation = {
         this.OldBuyset = oldBuyset;
         this.RenewList = renewList;
         this.EndTime = endTime;
-        //this.PriceRule = price;
+        if (price) this.PriceRule = price;
     },
     Check: function (tmpBuyset, oldBuyset) { //校验是否合法
         if (!oldBuyset) {
@@ -208,6 +208,7 @@ var Calculation = {
         } else {//新版大会员价格计算
             let pCount = vipbuyset.areacount
             let count = t[0]
+            let unit = t[1]
             if (pCount > this.PriceRule.new.provinceMaxCount) {
                 pCount = -1
             }
@@ -215,10 +216,11 @@ var Calculation = {
                 pCount = 0
             }
             //当选择月份大于  按照全年计算
-            if (t[0] > this.PriceRule.new.monthMaxCount && t[1] === 2) { //月份十个月以上价格一样
-                count = 10
+            if (t[0] > this.PriceRule.new.monthMaxCount && unit === 2) { //月份十个月以上价格一样
+                count = 1
+                unit = 1
             }
-            return this.getSetMealPrice_new(pCount, t[1]) * count //全国1行业套餐
+            return this.getSetMealPrice_new(pCount, unit) * count //全国1行业套餐
         }
     },
     getSetMealPrice_old: function (c, iCount, u) { //旧套餐价格计算

+ 2 - 1
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -562,7 +562,8 @@ func (this *vipSubscribeStruct) GetSubVipPriceByBuySet(buySet *SubvipBuySet, cou
 			}
 			//当选择月份大于  按照全年计算
 			if count > SubVipPrice.New.MonthMaxCount && unit == 2 { //月份十个月以上价格一样
-				count = 10
+				unit = 1
+				count = 1
 			}
 			return getSetMealPrice(pCount, unit) * count //全国1行业套餐
 		}

+ 1 - 1
src/jfw/modules/subscribepay/src/subvip_price.json

@@ -35,7 +35,7 @@
     },
     "provincePrice": 3800,
     "provinceMaxCount": 15,
-    "monthMaxCount": 9
+    "monthMaxCount": 10
   },
   "discount": 1
 }

+ 7 - 5
src/web/staticres/vipsubscribe/js/price.js

@@ -46,7 +46,7 @@ var Calculation = {
             },
             "provincePrice": 3800,
             "provinceMaxCount": 15,
-            "monthMaxCount": 9
+            "monthMaxCount": 10
         },
         "discount": 1
     }, //套餐价格表
@@ -59,7 +59,7 @@ var Calculation = {
         this.OldBuyset = oldBuyset;
         this.RenewList = renewList;
         this.EndTime = endTime;
-        //this.PriceRule = price;
+        if (price) this.PriceRule = price;
     },
     Check: function (tmpBuyset, oldBuyset) { //校验是否合法
         if (!oldBuyset) {
@@ -208,6 +208,7 @@ var Calculation = {
         } else {//新版大会员价格计算
             let pCount = vipbuyset.areacount
             let count = t[0]
+            let unit = t[1]
             if (pCount > this.PriceRule.new.provinceMaxCount) {
                 pCount = -1
             }
@@ -215,10 +216,11 @@ var Calculation = {
                 pCount = 0
             }
             //当选择月份大于  按照全年计算
-            if (t[0] > this.PriceRule.new.monthMaxCount && t[1] === 2) { //月份十个月以上价格一样
-                count = 10
+            if (t[0] > this.PriceRule.new.monthMaxCount && unit === 2) { //月份十个月以上价格一样
+                count = 1
+                unit = 1
             }
-            return this.getSetMealPrice_new(pCount, t[1]) * count //全国1行业套餐
+            return this.getSetMealPrice_new(pCount, unit) * count //全国1行业套餐
         }
     },
     getSetMealPrice_old: function (c, iCount, u) { //旧套餐价格计算