xuzhiheng 5 rokov pred
rodič
commit
89a2f3362e

+ 14 - 6
src/web/templates/weixin/vipsubscribe/renew_pay.html

@@ -352,6 +352,12 @@
                 currentNum = currentNum <= data.numboxMin ? data.numboxMin : currentNum - data
                     .numboxStep;
             }
+            if (currentNum >= 10) {
+            	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
+                $('.profit_tips').show();
+            } else {
+                $('.profit_tips').hide()
+            }
             $number.text(currentNum)
             if(currentNum >= 10){
             	currentNum = 10;
@@ -360,11 +366,12 @@
             $('.computed_price').html('¥' + price)
             var firstButton = $('#number_box_month button:first')
             var lastButton = $('#number_box_month button:last')
-            if (currentNum >= 10) {
-                $('.profit_tips').show()
-            } else {
-                $('.profit_tips').hide()
-            }
+//          if (currentNum >= 10) {
+//          	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
+//              $('.profit_tips').show();
+//          } else {
+//              $('.profit_tips').hide()
+//          }
             // 如果为操作后的结果为1,则锁定减号按钮
             if (currentNum === data.numboxMin) {
                 firstButton.attr('disabled', true)
@@ -398,7 +405,8 @@
             let isChecked = $(this).is(':checked')
             let val = $('.month_number').text();
             if (val >= 10) {
-                $('.profit_tips').show()
+            	$('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”更划算哦~");
+                $('.profit_tips').show();
                 val = 10;
             }
 //          console.log(val)

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

@@ -527,6 +527,12 @@
 		        return
             }
             $(".computed_price").show();
+            if (currentNum >= 10) {
+            	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
+                $('.profit_tips').show();
+            } else {
+                $('.profit_tips').hide()
+            }
             $number.text(currentNum)
             if(currentNum >= 10){
             	currentNum = 10;
@@ -535,11 +541,11 @@
             $('.computed_price').html('¥' + price)
             var firstButton = $('#number_box_month button:first')
             var lastButton = $('#number_box_month button:last')
-            if (currentNum >= 10) {
-                $('.profit_tips').show()
-            } else {
-                $('.profit_tips').hide()
-            }
+//          if (currentNum >= 10) {
+//              $('.profit_tips').show()
+//          } else {
+//              $('.profit_tips').hide()
+//          }
             // 如果为操作后的结果为1,则锁定减号按钮
             if (currentNum === data.numboxMin) {
                 firstButton.attr('disabled', true)
@@ -585,7 +591,8 @@
             let isChecked = $(this).is(':checked')
             let val = $('.month_number').text();
             if (val >= 10) {
-                $('.profit_tips').show()
+                $('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”更划算哦~");
+                $('.profit_tips').show();
             }
             console.log(val)
             if (!isChecked) {