xuzhiheng 5 лет назад
Родитель
Сommit
40e3c213f3

+ 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')

+ 13 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_upgrade.html

@@ -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");
+ 	 	      		}
         		}
         	}
         });

+ 13 - 1
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -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')