Эх сурвалжийг харах

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

wangshan 5 жил өмнө
parent
commit
6308371f7b

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

@@ -107,8 +107,16 @@ $(function () {
                 let hasActiveCount = $(dom).find('button.active').length
 
                 if (hasActiveCount > buyCount) {
-                    dBuySetCityCount += buyCount
-                    dAddedCityCount += (hasActiveCount - buyCount)
+                    // dBuySetCityCount += buyCount
+                    // dAddedCityCount += (hasActiveCount - buyCount)
+
+					if (alreadySelectedCount - hasActiveCount === 0) {
+						dBuySetCityCount += buyCount
+						dBuySetProvinceCount ++
+					} else {
+						dBuySetCityCount += buyCount
+						dAddedCityCount += (hasActiveCount - buyCount)
+					}
                 } else {
                     // 操作已购买的数量
                     dBuySetCityCount += hasActiveCount
@@ -496,18 +504,18 @@ $(function () {
             // 获取省的名字,并去空格.回车.换行
             let provinceName = $(dom).find('.province').text().replace(/\s+ | [\r\n]/g, '')
             for (let c in citys) {
-				let areaLeng;
-				try{
-					areaLeng = data.area[c].length
-					if (c === provinceName && areaLeng !== 0) {
-					    $(dom).attr('data-buy-city-count', citys[c])
-					}
-				}catch(e){
+				// let areaLeng;
+				// try{
+				// 	areaLeng = data.area[c].length
+				// 	if (c === provinceName && areaLeng !== 0) {
+				// 	    $(dom).attr('data-buy-city-count', citys[c])
+				// 	}
+				// }catch(e){
 					//TODO handle the exception
 					if (c === provinceName) {
 					    $(dom).attr('data-buy-city-count', citys[c])
 					}
-				}
+				// }
             }
         })
         $('.add_new').hide()