New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议作者将前端接口做一些简要说明 #184
Comments
等有时间了整理一下,你先去两个前端项目的 src/api/index.ts 文件里看看,前端调了哪些接口都在那里 |
谢谢啦
你提到的文件我已经看过了,但是有些定义看看是不是有点问题,比如说歌单接口下返回指定歌单ID的歌曲,url是不是应该调整一下呢?对应的Controller也就需要调整
// 返回歌单里指定歌单ID的歌曲,原文为listSong
getListSongOfSongId: (songListId) => get(`songList/detail?songListId=${songListId}`),
另外想请教一下歌曲循环以及随机的后端是不是没有做啊?没有找到相关的接口
…------------------ 原始邮件 ------------------
发件人: "Yin-Hongwei/music-website" ***@***.***>;
发送时间: 2022年5月28日(星期六) 中午11:16
***@***.***>;
抄送: "the ***@***.******@***.***>;
主题: Re: [Yin-Hongwei/music-website] 建议作者将前端接口做一些简要说明 (Issue #184)
等有时间了整理一下,你先去两个前端项目的 src/api/index.ts 文件里看看,前端调了哪些接口都在那里
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
歌曲循环以及随机是前端的逻辑,不需要接口,接口有不严谨地方,等有时间了在调吧。 |
嗯嗯谢谢啦
我看了歌曲循环前端的逻辑,似乎随机以外的逻辑是顺序下一曲
所以我仿照你的前端代码写了循环功能,但是歌曲结束后下一曲回到原歌曲后不会自动播放了,可以帮忙看看么?
我改了两处:
// 自动播放下一首
autoNext() {
if(this.playState === Icon.XUNHUAN) {
this.cycle();
}else{
this.next();
}
},
//循环
cycle(){
this.$store.commit("setCurrentPlayIndex", this.currentPlayIndex);
this.toPlay(this.currentPlayList[this.currentPlayIndex].url);
},
…------------------ 原始邮件 ------------------
发件人: "Yin-Hongwei/music-website" ***@***.***>;
发送时间: 2022年5月31日(星期二) 上午9:59
***@***.***>;
抄送: "the ***@***.******@***.***>;
主题: Re: [Yin-Hongwei/music-website] 建议作者将前端接口做一些简要说明 (Issue #184)
歌曲循环以及随机是前端的逻辑,不需要接口,接口有不严谨地方,等有时间了在调吧。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
虽然在前端API中能够查找到API,但是如果想优化后端功能找前端接口有一些困难,比如说循环歌曲,项目中循环,随机歌曲功能并没有实现。目前我在对后端采用MP重写后找不到前端上述的接口,希望可以简要介绍一下
The text was updated successfully, but these errors were encountered: