我试图从Vue.js中的API中获取数据并console.log响应,但我得到了一个CORS问题,更具体地说:from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 我读到我需要创建一个vue.config.js文件,我做了,但没有改变,我也试着只使用fetch api,也许我在Vue中以错误的方式进行http调用,我如何获得
我第一次在Laravel5.3中使用vue,目前我可以在vue中使用Jquery请求来获取数据,但是我在显示它时遇到了一些困难。这是我目前的脚本:这是我的观点:
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu" id="messagesArea">
<messages></messages>
</ul>
</li>
<!-- Further Do