ソースを参照

Merge branch 'dev2.8.5' of http://192.168.3.207:10080/qmx/jy into dev2.8.5

wangkaiyue 5 年 前
コミット
1c447f43f0

+ 13 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/renew_pay.html

@@ -439,6 +439,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowUpgrade)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+            }
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')

+ 15 - 3
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_upgrade.html

@@ -448,9 +448,9 @@
 			nowDates = nowDates.split("/");
 			var nowMonths = Number(nowDates[1]);
 			var nowYears = Number(nowDates[0]);
-			var as = nowMonths +1
+			var as = nowMonths +1;
 			if(as > 12){
-				as = nowMonths-12;
+				as = as-12;
 				nowYears = nowYears +1;
 			}
 			var bs = nowYears+"/"+as+"/1";
@@ -528,7 +528,6 @@
                 // $('#time_cycle .tips.monthly_tips').hide();
 
                 $('#number_box_month').removeClass('active');
-                $('#number_box_year span:eq(0)').addClass('active');
             }else{
                 $('.computed_price').hide()
                 $('#number_box_month').removeClass('active');
@@ -669,6 +668,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowRenew)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+           	}
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')

+ 19 - 2
src/web/templates/weixin/vipsubscribe/renew_pay.html

@@ -476,6 +476,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowUpgrade)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+            }
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')
@@ -541,8 +554,12 @@
         	}else{
         		$("#buy").attr("checked", true);
         		sessionStorage.buyChecks = true;
-        		if(sessionStorage.renew_cycleunit!==undefined&&sessionStorage.renew_cycleunit!==""){
-        			$(".save_renew").removeAttr("disabled");
+        		if(sessionStorage.renew_cycleunit!==undefined&&sessionStorage.renew_cycleunit!==""&&sessionStorage.renew_cyclecount!==""&&sessionStorage.renew_cyclecount!==undefined){
+        			let cycleunit = Number(sessionStorage.renew_cycleunit);
+        			let cyclecount = Number(sessionStorage.renew_cyclecount);
+ 	 	      		if(cycleunit>0&&cyclecount>0){
+ 	 	      			$(".save_renew").removeAttr("disabled");
+ 	 	      		}
         		}
         	}
         });

+ 15 - 3
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -452,9 +452,9 @@
 			nowDates = nowDates.split("/");
 			var nowMonths = Number(nowDates[1]);
 			var nowYears = Number(nowDates[0]);
-			var as = nowMonths +1
+			var as = nowMonths +1;
 			if(as > 12){
-				as = nowMonths-12;
+				as = as-12;
 				nowYears = nowYears +1;
 			}
 			var bs = nowYears+"/"+as+"/1";
@@ -541,7 +541,6 @@
                 // $('#time_cycle .tips.monthly_tips').hide();
 
                 $('#number_box_month').removeClass('active');
-                $('#number_box_year span:eq(0)').addClass('active');
             }else{
                 $('.computed_price').hide()
                 $('#number_box_month').removeClass('active');
@@ -682,6 +681,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowRenew)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+           	}
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')