目录

chen 的个人博客

VX:ZzzChChen
Phone:13403656751
Email:zxydczzs@gmail.com

X

[system] DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL

报错如图

image.png

解决

问题出现原因为某个请求缺了个“/”,所以在自己的项目中找到了缺失的地方。

1//更新学习到的红外码信息
2//   /iot/tuya/oAuth/updateLearningCode报错时是iot/tuya/oAuth/updateLearningCode
3//将“/”加上即可
4function updateLearningCode(data, resultFunction, failFunction){
5	requestUtils.doPostRequestToTuYa("/iot/tuya/oAuth/updateLearningCode", data, resultFunction, failFunction);
6}

标题:[system] DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
作者:zzzzchen
地址:https://dczzs.com/articles/2021/08/25/1629884961110.html