perf: 优化接口类型

This commit is contained in:
xiaoxian521
2022-08-18 18:35:09 +08:00
parent d6a329a63c
commit a983575b6d
7 changed files with 37 additions and 28 deletions

View File

@@ -1,6 +1,11 @@
import { http } from "../utils/http";
type Result = {
code: number;
info: Array<any>;
};
// 地图数据
export const mapJson = (params?: object) => {
return http.request("get", "/getMapInfo", { params });
return http.request<Result>("get", "/getMapInfo", { params });
};