|
@@ -625,11 +625,6 @@ $(function () {
|
|
|
// province: 0,
|
|
|
// city: 0
|
|
|
// }
|
|
|
- //
|
|
|
- sessionStorage.removeItem("vipAddCount")
|
|
|
- sessionStorage.removeItem("vipSubSelectCity")
|
|
|
- sessionStorage.removeItem("vipSubSelectAreaUpgrade")
|
|
|
- sessionStorage.removeItem("vipSubSelectAreaAdd")
|
|
|
// 数组置0,在重新从数据中计算初始状态结果并返回
|
|
|
for (let i in alreadyBuy) {
|
|
|
for(let ii in alreadyBuy[i]) {
|
|
@@ -679,20 +674,28 @@ $(function () {
|
|
|
let selectedCityLength = $(dom).parent().find('.city.active:not([disabled])').length;
|
|
|
let disabledCityLength = $(dom).parent().find('.city[disabled]').length;
|
|
|
let cityLength = $(dom).parent().find('.city').length;
|
|
|
- let dataCount = $(dom).parent().parent().attr("data-buy-city-count");
|
|
|
+ let dataCount = Number($(dom).parent().parent().attr("data-buy-city-count"));
|
|
|
if(dataCount === undefined){
|
|
|
dataCount = 0;
|
|
|
}else{
|
|
|
- if(Number(dataCount) === disabledCityLength){
|
|
|
- dataCount = 0;
|
|
|
- }else{
|
|
|
- dataCount = dataCount - disabledCityLength;
|
|
|
+ if(Number(dataCount) !== disabledCityLength){
|
|
|
+ if(disabledCityLength === 0){
|
|
|
+ dataCount = 0;
|
|
|
+ }else{
|
|
|
+ dataCount = dataCount - disabledCityLength;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- let showCount = selectedCityLength - dataCount;
|
|
|
+ let countShow = 0;
|
|
|
+ let showCount = selectedCityLength + dataCount;
|
|
|
+ // let showCount = selectedCityLength - dataCount;
|
|
|
if(showCount > 2){
|
|
|
- $(".tips_d_text").text("已新增"+showCount+"个市,建议新增“全省”");
|
|
|
- $(".tips_d_text").show();
|
|
|
+ if(selectedCityLength === 0){
|
|
|
+ $(".tips_d_text").hide();
|
|
|
+ }else{
|
|
|
+ $(".tips_d_text").text("已选择"+showCount+"个市,建议购买“全省”");
|
|
|
+ $(".tips_d_text").show();
|
|
|
+ }
|
|
|
}else{
|
|
|
$(".tips_d_text").hide();
|
|
|
}
|
|
@@ -702,9 +705,15 @@ $(function () {
|
|
|
}
|
|
|
|
|
|
function showOther(){
|
|
|
- let showCounts = newlyAdded.province;
|
|
|
+ let areaCount = areaData.data.buyset.areacount;
|
|
|
+ let showCounts = 0;
|
|
|
+ if(areaCount === -1){
|
|
|
+ $(".tips_d_text").hide();
|
|
|
+ }else{
|
|
|
+ showCounts = newlyAdded.province + areaCount;
|
|
|
+ }
|
|
|
if(showCounts > 9){
|
|
|
- $(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
|
|
|
+ $(".tips_d_text").text("已选择"+showCounts+"个省,建议购买“全国”")
|
|
|
$(".tips_d_text").show();
|
|
|
}else{
|
|
|
$(".tips_d_text").hide();
|