添加行政区选择

This commit is contained in:
张成
2025-11-22 22:50:18 +08:00
parent 6eefcd27a9
commit 17015c0cca
11 changed files with 708 additions and 49 deletions

View File

@@ -132,3 +132,16 @@ export const getCityQrCode = async () => {
throw error;
}
}
// 获取行政区列表
export const getDistricts = async (params: { country: string; state: string }) => {
try {
// 调用HTTP服务获取行政区列表
return httpService.post('/cities/cities', params)
} catch (error) {
// 捕获并打印错误信息
console.error("行政区列表获取失败:", error);
// 抛出错误以便上层处理
throw error;
}
}