shenchengwoshi
shenchengwoshi
2017-04-25 01:45

ionic angular js 跨域Access-Control-Allow-Origin

20
  • ionic
 var myUrl = "http://10.1.20.9:8080/bingo-web/system/listWapOutJson.vhtml?wuLiaoID=40010000040";

    $http.get(myUrl).success(function (response) {
      if(response.success){
        console.log("2123");
        $scope.chat = response.data;
      }else {
        console.log("qweqwe");
      }
    })

这样写就会出现以下错误,

XMLHttpRequest cannot load http://10.1.20.9:8080/bingo-web/system/listWapOutJson.vhtml?wuLiaoID=40010000040. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.40.6:8100' is therefore not allowed access.

求大神,这个问题应该怎么解决呀?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答