|
@@ -660,8 +660,20 @@ $(function () {
|
|
function showCityTips(dom){
|
|
function showCityTips(dom){
|
|
let activeCityLength = $(dom).parent().find('.city.active').length;
|
|
let activeCityLength = $(dom).parent().find('.city.active').length;
|
|
let selectedCityLength = $(dom).parent().find('.city.active:not([disabled])').length;
|
|
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 cityLength = $(dom).parent().find('.city').length;
|
|
- if(selectedCityLength > 2){
|
|
|
|
|
|
+ let dataCount = $(dom).parent().parent().attr("data-buy-city-count");
|
|
|
|
+ if(dataCount === undefined){
|
|
|
|
+ dataCount = 0;
|
|
|
|
+ }else{
|
|
|
|
+ if(Number(dataCount) === disabledCityLength){
|
|
|
|
+ dataCount = 0;
|
|
|
|
+ }else{
|
|
|
|
+ dataCount = dataCount - disabledCityLength;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ let showCount = selectedCityLength - dataCount;
|
|
|
|
+ if(showCount > 2){
|
|
$(".tips_d_text").text("已选择"+selectedCityLength+"个市,建议购买“全省”");
|
|
$(".tips_d_text").text("已选择"+selectedCityLength+"个市,建议购买“全省”");
|
|
$(".tips_d_text").show();
|
|
$(".tips_d_text").show();
|
|
}else{
|
|
}else{
|