优化省市区和占位图片

This commit is contained in:
2026-02-09 13:53:19 +08:00
parent cab90aa1cb
commit 49935dd049
11 changed files with 196 additions and 153 deletions

View File

@@ -5,7 +5,7 @@ import { UserService } from "@/services/userService";
export interface PickerOptionState {
cities: any[];
professions: any[];
ntrpLevels: string[];
ntrpLevels: any[];
getCities: () => Promise<any>;
getProfessions: () => Promise<any>;
}
@@ -13,7 +13,40 @@ export interface PickerOptionState {
export const usePickerOption = create<PickerOptionState>((set) => ({
cities: [],
professions: [],
ntrpLevels: ["1.5", "2.0", "2.5", "3.0", "3.5", "4.0", "4.5", "4.5+"],
ntrpLevels: [
{
text: "1.5",
value: "1.5",
},
{
text: "2.0",
value: "2.0",
},
{
text: "2.5",
value: "2.5",
},
{
text: "3.0",
value: "3.0",
},
{
text: "3.5",
value: "3.5",
},
{
text: "4.0",
value: "4.0",
},
{
text: "4.5",
value: "4.5",
},
{
text: "4.5+",
value: "4.5+",
},
],
getCities: async () => {
try {
const res = await UserService.getCities();