Skip to content

Commit

Permalink
no city or district info for central city
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Aug 14, 2017
1 parent 805a6c8 commit ac84e08
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ <h3>预览<span> preview</span></h3>
$('#city').prop("disabled", true);
}

// 直辖市的县级内容为初始状态
if (isCentralCity) {
$('#district').html(INIT_DISTRICT_CONTENT);
}

// 台湾时,禁用市级,县级下拉列表,只能选择外部轮廓
if (isTaiwan) {
$('#city').html(INIT_CITY_CONTENT);
Expand Down Expand Up @@ -525,7 +530,6 @@ <h3>预览<span> preview</span></h3>
district.setLevel(level);
//行政区查询
district.search(keyword, function(status, result){
console.log(result);
getData(result);
});

Expand Down Expand Up @@ -556,21 +560,17 @@ <h3>预览<span> preview</span></h3>
level = list[0].level;

// 清空下一级别的下拉列表
if(level === 'province'){

if (level === 'province') {
nextLevel = 'city';
$('#city').html(INIT_CITY_CONTENT);
$('#district').html(INIT_DISTRICT_CONTENT);

}else if(level === 'city'){

}
else if (level === 'city') {
nextLevel = 'district';
$('#district').html(INIT_DISTRICT_CONTENT);

} else if(level === 'district') {

}
else if (level === 'district') {
nextLevel = 'biz_area';

}

if(subList){
Expand Down

0 comments on commit ac84e08

Please sign in to comment.