This commit is contained in:
张成
2026-02-05 23:23:21 +08:00
parent ebb7116c25
commit 969066591c
12 changed files with 137 additions and 26 deletions

View File

@@ -731,16 +731,16 @@ export const useListStore = create<TennisStore>()((set, get) => ({
const state = get();
// 从 area 中获取省份area 格式: ["中国", 省份, 城市]
const country = "中国";
const province = state.area?.at(1) || "上海"; // area[1] 是省份
const cn_city = state.area?.at(1) || "上海"; // area[1] 是省份
const res = await getDistricts({
country,
state: province
state: cn_city
});
if (res.code === 0 && res.data) {
const districts = res.data.map((item) => ({
label: item.cn_city,
label: item.cn_county,
value: item.id.toString(),
id: item.id,
}));