Fix liuyao UX: CSS coins, region auto-select, and clearer AI flow.
Replace missing coin images with CSS 3D coins, auto-select city on province change, expand Shandong cities, and improve AI interpretation prompts after six casts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-8
@@ -11,10 +11,12 @@ export type RegionsData = Record<string, RegionNode>;
|
||||
export const regions = regionsData as RegionsData;
|
||||
|
||||
export function getProvinces(): { code: string; name: string }[] {
|
||||
return Object.entries(regions).map(([code, node]) => ({
|
||||
code,
|
||||
name: node.name,
|
||||
}));
|
||||
return Object.entries(regions)
|
||||
.map(([code, node]) => ({
|
||||
code,
|
||||
name: node.name,
|
||||
}))
|
||||
.sort((a, b) => a.name.localeCompare(b.name, "zh-CN"));
|
||||
}
|
||||
|
||||
export function getCities(provinceCode: string): { code: string; name: string }[] {
|
||||
@@ -22,10 +24,12 @@ export function getCities(provinceCode: string): { code: string; name: string }[
|
||||
if (!province?.children) {
|
||||
return [];
|
||||
}
|
||||
return Object.entries(province.children).map(([code, node]) => ({
|
||||
code,
|
||||
name: node.name,
|
||||
}));
|
||||
return Object.entries(province.children)
|
||||
.map(([code, node]) => ({
|
||||
code,
|
||||
name: node.name,
|
||||
}))
|
||||
.sort((a, b) => a.name.localeCompare(b.name, "zh-CN"));
|
||||
}
|
||||
|
||||
export function getRegionLocation(
|
||||
|
||||
Reference in New Issue
Block a user