ajax请求json 文件

 举例说明:

$.ajax({
            url: "./map/city/" + cityMap[name] + ".json",
            type:"GET",
            dataType:'json',
            success: data => {
              echarts.registerMap(name, data);
              const d = this.transformXianData();
              this.rederXianMap(name, d);
            }
          });

猜你喜欢

转载自www.cnblogs.com/lzzxm/p/12421470.html