Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

几点改进的建议 #36

Open
hugetiny opened this issue Nov 15, 2019 · 1 comment
Open

几点改进的建议 #36

hugetiny opened this issue Nov 15, 2019 · 1 comment

Comments

@hugetiny
Copy link

用户体验很好啊,居然是自己不靠UI框架写出来的,不错。
关于几点改进的建议
1.axios promise后面最好跟一下catch捕获错误,then里面只能打印请求成功但非200的错误信息。
2.既然用了Vuex,那么异步方法全部写到action里面去,用生命周期控制。尽量少用ref,props等,保持代码整洁。
3.一些接口有点变化,比如newsong,lyric。
我也试试大改一下你的代码

@hugetiny
Copy link
Author

还有我发现你不太用computed 一些异步的state应该用computed+mapstate自动刷新更新比较好

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant