xuzhiheng 5 年之前
父节点
当前提交
5a1c6de232
共有 1 个文件被更改,包括 10 次插入15 次删除
  1. 10 15
      src/web/staticres/vipsubscribe/js/updateArea.js

+ 10 - 15
src/web/staticres/vipsubscribe/js/updateArea.js

@@ -406,6 +406,9 @@ $(function () {
 							added.province ++
 							allDisabledButHasCityCount[pName] = buyCityCount
 						} else if (activeButtonLength === allCitylength) {
+							if(alreadySelectedCount < activeButtonLength){
+								allDisabledButHasCityCount[pName] = buyCityCount
+							}
 							added.province ++
 						} else {
 							added.city[pName] = aCityCount
@@ -471,23 +474,12 @@ $(function () {
                 } else {
                     let allCitylength = $(dom).find('button').length
 
-                    if (state === 'disabled') {
+                    if (state === 'notDisabled') {
                         // 判断是否全省被选中
-                        if ($(dom).find('button.active').length === allCitylength) {
-                            // 判断省下有没有不可点击的按钮
-                            if ($(dom).attr('data-buy-city-count')) {
-                                $(dom).find('button.active').each(function(c, dom) {
-                                    let cName = $(dom).text().replace(/\s+ | [\r\n]/g, '')
-                                    selectedObj.children.push(cName)
-                                })
-                                if (selectedObj.children.length) {
-                                    arr.push(selectedObj)
-                                }
-                            } else {
-                                arr.push(selectedObj)
-                            }
+                        if ($(dom).find('button.active:not([disabled])').length === allCitylength) {
+                            arr.push(selectedObj)
                         } else {
-                            $(dom).find('button.active').each(function(c, dom) {
+                            $(dom).find('button.active:not([disabled])').each(function(c, dom) {
                                 let cName = $(dom).text().replace(/\s+ | [\r\n]/g, '')
                                 selectedObj.children.push(cName)
                             })
@@ -921,6 +913,9 @@ $(function () {
         sessionStorage.vipSubSelectAreaUpgrade = JSON.stringify(activeCityDetail);
         sessionStorage.vipSubSelectAreaAdd = JSON.stringify(areaCount);
 		sessionStorage.vipallDisabledButHasCityCount = JSON.stringify(lastSet);
+		//
+		// if()
+		
         history.go(-1);
     })
 	//