且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

混合内容问题-不安全的XMLHttpRequest端点

更新时间:2021-11-24 21:19:28

为了工作,您需要指定index.php,以便它知道它正在调用哪个函数.因为这类似于cUrl调用,所以它需要完整路径.为了让呼叫确定使用哪种协议,您需要在开始时使用双斜杠.所以试试这个:

in order to work you need to specify index.php so it knows which function it is calling. Because this is similar to cUrl call it requires full path. And to let call to decide which protocol it is on, you need double slashes at the beginning. So try this:

$.get("//api/Product/GetMore/index.php", { pageIndex: currentPage })

OR

$.get("//api/Product/GetMore/", { pageIndex: currentPage })

解决了我过去的问题.