SmallRuralDog / electron-vue-music

基于 electron-vue 开发的音乐播放器,界面模仿QQ音乐,技术栈electron-vue+vue+vuex+vue-router+element- UI。欢迎star
https://smallruraldog.github.io/vue3-music/
Apache License 2.0
2.12k stars 526 forks source link

请问下:可以让nodejs main进程也作为http server提供rest api server服务吗? #4

Open xeoshow opened 6 years ago

xeoshow commented 6 years ago

如题,需要如何做呢?谢谢

SmallRuralDog commented 6 years ago

已集成,更新即可!

xeoshow commented 6 years ago

谢谢大神。是否有微信或qq或邮箱联系方式可以进一步交流探讨技术?谢谢!~

xeoshow commented 6 years ago

测试了报错,貌似这个本地的rest url还没有: /music/url

错误信息:

:9080/#/playlist-detail?id=180106:1 Uncaught (in promise) <!DOCTYPE html>

Error
Cannot GET /music/url
xeoshow commented 6 years ago

另外日志里还发现这些个错误:

[Vue warn]: Error in nextTick: "TypeError: Cannot read property 'pause' of undefined"

found in

---> at src\renderer\components\Footer\player.vue

at src\renderer\components\Footer\index.vue
at src\renderer\views\main.vue at src\renderer\App.vue
SmallRuralDog commented 6 years ago

@xeoshow 已修复

xeoshow commented 6 years ago

谢谢!rest url的问题解决了,但是点击任何一个歌曲播放时,还有undefined问题如下:


vue.esm.js?efeb:1741 TypeError: Cannot read property 'play' of undefined at VueComponent.eval (player.vue?55e8:118) at Array.eval (vue.esm.js?efeb:1837) at flushCallbacks (vue.esm.js?efeb:1758) at logError @ vue.esm.js?efeb:1741 globalHandleError @ vue.esm.js?efeb:1732 handleError @ vue.esm.js?efeb:1721 (anonymous) @ vue.esm.js?efeb:1839 flushCallbacks @ vue.esm.js?efeb:1758