JennyGao
解决:
getFormJson(){ let xml
= new XMLHttpRequest(); xml.open(\'get\',\'/static/api/form.json\') xml.send() xml.onreadystatechange = function(){ if(xml.readyState==4 && xml.status==200){ this.formLabel = xml.response; console.log("xmll==="+JSON.stringify(this.formLabel)) } } },

解决:

放在目录里并不意味能通过http访问。要么另起web服务serve这个目录,要么放在static目录里,因为dev-server对该目录文件实现了http访问。

 

分类:

技术点:

相关文章:

  • 2022-01-01
  • 2021-12-03
  • 2021-11-04
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2023-03-05
  • 2022-12-23
  • 2021-11-19
  • 2021-06-11
相关资源
相似解决方案