CHATGPT AI
loading
= false;
});
}
/**
* 查询所有的省份
*/
queryAllProvince(){
this.loading = true;
this.areaService.queryAllProvince().then(data => {
this.provinces = data;
this.loading = false;
});
}
/**
* 根据省份查询城市列表信息,如果传入参数为空,则默认返回所有城市信息。
*/
queryCityByProvinceCode(provinceCode?: string){
if(!provinceCode){ // 如果参数为空,则返回所有城市信息。
this.queryAllCity();
}else{ // 如果参数不为空,则根据省份代码返回对应的城市信息。
this.loading = true; // 显示加载中...
this.areaService.queryCityByProvinceCode(provinceCode).then(data => {
this.cities = data; // 返回对应的城市信息。
this.loading = false; // 关闭加载中...
});
}
}
/**
* 根据城市代码返回区县信息,如果传入参数为空,则默认返回所有区县信息。
*/
queryDistrictByCityCode(cityCode?: string){
if(!cityCode){ // 如果参数为空,则返回所有区县信息。
this.queryAllDistrict();
}else{ // 如果参数不为空,则根
});
}
/**
* 查询所有的省份
*/
queryAllProvince(){
this.loading = true;
this.areaService.queryAllProvince().then(data => {
this.provinces = data;
this.loading = false;
});
}
/**
* 根据省份查询城市列表信息,如果传入参数为空,则默认返回所有城市信息。
*/
queryCityByProvinceCode(provinceCode?: string){
if(!provinceCode){ // 如果参数为空,则返回所有城市信息。
this.queryAllCity();
}else{ // 如果参数不为空,则根据省份代码返回对应的城市信息。
this.loading = true; // 显示加载中...
this.areaService.queryCityByProvinceCode(provinceCode).then(data => {
this.cities = data; // 返回对应的城市信息。
this.loading = false; // 关闭加载中...
});
}
}
/**
* 根据城市代码返回区县信息,如果传入参数为空,则默认返回所有区县信息。
*/
queryDistrictByCityCode(cityCode?: string){
if(!cityCode){ // 如果参数为空,则返回所有区县信息。
this.queryAllDistrict();
}else{ // 如果参数不为空,则根
= false;
});
}
/**
* 查询所有的省份
*/
queryAllProvince(){
this.loading = true;
this.areaService.queryAllProvince().then(data => {
this.provinces = data;
this.loading = false;
});
}
/**
* 根据省份查询城市列表信息,如果传入参数为空,则默认返回所有城市信息。
*/
queryCityByProvinceCode(provinceCode?: string){
if(!provinceCode){ // 如果参数为空,则返回所有城市信息。
this.queryAllCity();
}else{ // 如果参数不为空,则根据省份代码返回对应的城市信息。
this.loading = true; // 显示加载中...
this.areaService.queryCityByProvinceCode(provinceCode).then(data => {
this.cities = data; // 返回对应的城市信息。
this.loading = false; // 关闭加载中...
});
}
}
/**
* 根据城市代码返回区县信息,如果传入参数为空,则默认返回所有区县信息。
*/
queryDistrictByCityCode(cityCode?: string){
if(!cityCode){ // 如果参数为空,则返回所有区县信息。
this.queryAllDistrict();
}else{ // 如果参数不为空,则根
0 Comments & Tags
0 hisse senetleri
1 Views