maomao1996 / Vue-mmPlayer

🎵 基于 Vue 的在线音乐播放器 Online music player
https://netease-music.fe-mm.com
MIT License
2.55k stars 776 forks source link

Cannot read properties of undefined (reading 'hots') at search.vue:75:1 #80

Open TownTowner opened 1 year ago

TownTowner commented 1 year ago

打开搜索后页面停滞,F12控制台报错:

/#/music/search:1 Access to XMLHttpRequest at 'https://mu-api.yuk0.com/search/hot' from origin 'https://netease-music.fe-mm.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://v-music.vercel.app' that is not equal to the supplied origin. mu-api.yuk0.com/search/hot:1 Failed to load resource: net::ERR_FAILED search.vue:75 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'hots') at search.vue:75:1

如图: 1680353344908

maomao1996 commented 1 year ago

这个接口偶尔会跨域,后面会更换 api 接口域名