uni-app中跨域:
在uni-app中发送get/post请求时遇到跨域问题,浏览器报错:
Access to XMLHttpRequest at ‘http://localhost:8080/api/jspceshi001/DengRu?userName=&password=’ from origin ‘http://localhost:8082’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
解决方案:
第一步:
A:多文件搜索 “h5”
B:点击搜索结果
第二步:设置跨域配置
"h5": {
"