刘嘉威
2023-02-24 ddb1df24b17dd22e1fa088fa9fe8573913baec33
perf: 请求项目路径下文件问题
2个文件已修改
6 ■■■■ 已修改文件
src/api/api.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index/center-map.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.ts
@@ -1,7 +1,7 @@
/*
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-10-25 15:34:56
 * @LastEditTime: 2023-02-24 15:04:36
 */
import axios from 'axios';
@@ -114,7 +114,7 @@
 */
export const GETNOBASE = async (url: string, params?: Params): Promise<any> => {
    try {
        const data = await axios.get(location.pathname+url, {
        const data = await axios.get(url, {
            params: params,
        });
        return data;
src/views/index/center-map.vue
@@ -55,7 +55,7 @@
      mapjson = mapjson.geoJSON;
      resolve(mapjson);
    } else {
      mapjson = await GETNOBASE(`map-geojson/${regionCode}.json`).then(
      mapjson = await GETNOBASE(`./map-geojson/${regionCode}.json`).then(
        (data) => data
      );
      code.value=regionCode