Skip to content

Commit b3b176b

Browse files
committed
chore: update network
1 parent a2dde23 commit b3b176b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

plate-client/src/utils/network.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { RegionList } from '@/types/TableInterfaces';
2+
import axios from 'axios';
3+
4+
const baseUrl = import.meta.env.VITE_BASE_URL;
5+
6+
axios.defaults.baseURL = baseUrl;
7+
8+
export async function listRegionPlate(): Promise<RegionList[]> {
9+
try {
10+
const data = await axios.get(`plate-code/region`, {
11+
headers: {
12+
'Content-Type': 'application/json',
13+
},
14+
});
15+
console.log(data.data.data);
16+
17+
return data.data.data;
18+
} catch (error) {
19+
console.log(error);
20+
throw error;
21+
}
22+
}

0 commit comments

Comments
 (0)