xuzhiheng 5 жил өмнө
parent
commit
c2451e4524

+ 8 - 7
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js

@@ -566,8 +566,8 @@ $(function () {
             $(this).prop('checked',false);
             $(this).parents('li').find('.city').removeClass('active');
         }
-        showOther();
         getResult();
+        showOther();
     })
     // 4.点击半选按钮触发的事件
 //  $('.checkbox.half').on('change', function () {
@@ -597,8 +597,8 @@ $(function () {
         } else {//半选
             oInput.prop("checked",false).addClass('half')
         }
-        showCityTips(this)
         getResult();
+        showCityTips(this)
     })
     // 6. 重置按钮点击事件
     $('.reset-btn').on('click', function() {
@@ -674,20 +674,21 @@ $(function () {
 		}
 		let showCount = selectedCityLength - dataCount;
 		if(showCount > 2){
-			$(".tips_d_text").text("已选择"+selectedCityLength+"个市,建议购买“全省”");
+			$(".tips_d_text").text("已选择"+showCount+"个市,建议购买“全省”");
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();
 		}
-		if(selectedCityLength === cityLength){
+		if(showCount === cityLength){
 			showOther();
 		}
 	}
 	
 	function showOther(){
-		let provinceLength = $(".area-list .checkbox:not(.other):not([disabled]):checked").length;
-		if(provinceLength > 9){
-			$(".tips_d_text").text("已选择"+provinceLength+"个省,建议购买“全国”")
+		let showCounts = newlyAdded.province;
+		console.log(showCounts)
+		if(showCounts > 9){
+			$(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();

+ 9 - 8
src/web/staticres/vipsubscribe/js/updateArea.js

@@ -565,9 +565,9 @@ $(function () {
         }else{
             $(this).prop('checked',false);
             $(this).parents('li').find('.city').removeClass('active');
-        }
-        showOther();
+        };
         getResult();
+        showOther();
     })
     // 4.点击半选按钮触发的事件
 //  $('.checkbox.half').on('change', function () {
@@ -597,8 +597,8 @@ $(function () {
         } else {//半选
             oInput.prop("checked",false).addClass('half')
         }
-        showCityTips(this)
         getResult();
+        showCityTips(this)
     })
     // 6. 重置按钮点击事件
     $('.reset-btn').on('click', function() {
@@ -674,20 +674,21 @@ $(function () {
 		}
 		let showCount = selectedCityLength - dataCount;
 		if(showCount > 2){
-			$(".tips_d_text").text("已选择"+selectedCityLength+"个市,建议购买“全省”");
+			$(".tips_d_text").text("已新增"+showCount+"个市,建议新增“全省”");
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();
 		}
-		if(selectedCityLength === cityLength){
+		if(showCount === cityLength){
 			showOther();
 		}
 	}
 	
 	function showOther(){
-		let provinceLength = $(".area-list .checkbox:not(.other):not([disabled]):checked").length;
-		if(provinceLength > 9){
-			$(".tips_d_text").text("已选择"+provinceLength+"个省,建议购买“全国”")
+		let showCounts = newlyAdded.province;
+		console.log(showCounts)
+		if(showCounts > 9){
+			$(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();