老师为什么我打包后后的dist文件里的index文件打开显示有跨域问题?
来源:14-3 课程总结
lcyjerry
2020-09-15
Access to XMLHttpRequest at ‘http://116.62.247.190:8080/music/api/getTopBanner?g_tk=1928093487&inCharset=utf8&outCharset=utf-8¬ice=0&format=json&platform=yqq.json&hostUin=0&needNewCode=0&-=recom6366777683661886&data={“comm”:{“ct”:24},“category”:{“method”:“get_hot_category”,“param”:{“qq”:""},“module”:“music.web_category_svr”},“recomPlaylist”:{“method”:“get_hot_recommend”,“param”:{“async”:1,“cmd”:2},“module”:“playlist.HotRecommendServer”},“playlist”:{“method”:“get_playlist_by_category”,“param”:{“id”:8,“curPage”:1,“size”:40,“order”:5,“titleid”:8},“module”:“playlist.PlayListPlazaServer”},“new_song”:{“module”:“newsong.NewSongServer”,“method”:“get_new_song_info”,“param”:{“type”:5}},“new_album”:{“module”:“newalbum.NewAlbumServer”,“method”:“get_new_album_info”,“param”:{“area”:1,“sin”:0,“num”:10}},“new_album_tag”:{“module”:“newalbum.NewAlbumServer”,“method”:“get_new_album_area”,“param”:{}},“toplist”:{“module”:“musicToplist.ToplistInfoServer”,“method”:“GetAll”,“param”:{}},“focus”:{“module”:“QQMusic.MusichallServer”,“method”:“GetFocus”,“param”:{}}}’ from origin ‘null’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
2回答
-
ustbhuangyi
2020-09-15
你线上请求的还是我的 url 接口啊042020-09-16 -
lcyjerry
提问者
2020-09-15
老师我用的是阿里云的服务器 部署的地址也把你的地址改成我自己线上的ip地址了
022020-09-15
相似问题