添加行政区选择
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user