netmusic-node icon indicating copy to clipboard operation
netmusic-node copied to clipboard

网易云音乐接口

Results 8 netmusic-node issues
Sort by recently updated
recently updated
newest added

想问一下登陆接口坏掉了欸,能不能修一下

前后端部署成功后,会发现前端页面获取后端数据时,会出现跨域问题。翻阅服务端的代码,是可以看到是有处理跨域的(header.set('Access-Control-Allow-Origin', '*')),但是并没有生效。 解决跨域问题的几种常规方式:后端header加跨域设置(没生效),前端使用代理(开发环境有效,生产环境无效),使用nginx代理(生产、开发环境都可以)。 出于仅仅研究项目的目的,此处采用前端代理的方式,如下: 打开前端neteasemusic/src/main.js文件,做出以下修改 //axios.defaults.baseURL = 'http://localhost:3000/v1/'; axios.defaults.baseURL = '/api'; 打开前端neteasemusic/config/index.js文件,做出以下修改 proxyTable: { "/api": { target: "http://localhost:3000/v1/", //设置你调用的接口域名和端口号 changeOrigin: true, //跨域 pathRewrite: { "^/api": "/" } } } 最后,重启前端项目就行了,跨域问题解决了。

获取歌曲URL的接口有cheating问题,可以参考这个修复 https://github.com/darknessomi/musicbox/issues/745

Failed to load http://192.168.1.6:3000/v1/banner: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. 看到作者有设置 res.header("Access-Control-Allow-Origin", "*"); 但是跑起来还是报错

大佬您好,请问下了接口后要怎么启动,直接cmd管理员执行然后app.js吗,我下载好了小程序源码和这个包中的接口,接下来要怎么操作

看了下源码, 就是通过csrf来拿网易云的接口api: https://www.landiannews.com/archives/101953.html