Authored by 郭成尧

code-better

... ... @@ -196,25 +196,22 @@
case 2:
this.province.id = id;
this.province.title = caption;
this.city.showList = true;
this.city.showList = this.province.titleActive = true;
this.province.showList = this.area.showList = this.street.showList = false;
this.province.titleActive = true;
this.city.titleActive = this.area.titleActive = this.street.titleActive = false;
break;
case 4:
this.city.id = id;
this.city.title = caption;
this.area.showList = true;
this.area.showList = this.city.titleActive = true;
this.province.showList = this.city.showList = this.street.showList = false;
this.city.titleActive = true;
this.province.titleActive = this.area.titleActive = this.street.titleActive = false;
break;
case 6:
this.area.id = id;
this.area.title = caption;
this.street.showList = true;
this.street.showList = this.area.titleActive = true;
this.province.showList = this.city.showList = this.area.showList = false;
this.area.titleActive = true;
this.province.titleActive = this.city.titleActive = this.street.titleActive = false;
break;
case 9: // 一定要返回结果了
... ... @@ -224,16 +221,14 @@
} else {
this.street.title = caption;
}
this.street.showList = true;
this.street.showList =this.street.titleActive = true;
this.province.showList = this.city.showList = this.area.showList = false;
this.street.titleActive = true;
this.province.titleActive = this.city.titleActive = this.area.titleActive = false;
break;
default:
this.province.title = '请选择';
this.province.showList = true;
this.province.showList = this.province.titleActive = true;
this.city.showList = this.area.showList = this.street.showList = false;
this.province.titleActive = true;
this.city.titleActive = this.area.titleActive = this.street.titleActive = false;
break;
}
... ...