perf: rest请求优化为json文件请求

This commit is contained in:
fit2cloud-chenyw
2021-08-03 16:05:05 +08:00
parent e239ddf052
commit 1aa5b483fb
3 changed files with 35 additions and 4 deletions

View File

@@ -8,9 +8,17 @@ export const areaMapping = () => {
})
}
// export function geoJson(areaCode) {
// return request({
// url: '/api/map/resourceFull/' + areaCode,
// method: 'get',
// loading: true
// })
// }
export function geoJson(areaCode) {
return request({
url: '/api/map/resourceFull/' + areaCode,
url: '/geo/' + areaCode + '_full.json',
method: 'get',
loading: true
})