Make configuring baseURL easier and make the errors friendly (#9)

* feat(utils/request): make configuring baseURL easier

* docs(config/request): update the corresponding changes

5bc29f9200327de1d8aa23ab383bbd7f115db7ee

* feat(utils/request): make the errors friendly

I replaced the ugly if-statement with Map, and
I also make the message user-friendly
since this project is written for users, not only for developers.

And also, I removed the useless "alert", it is useless and annoying for users.
This commit is contained in:
pan93412 2020-10-18 11:42:12 +08:00 committed by GitHub
parent c860745bfe
commit bce09351cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 13 deletions

View file

@ -44,7 +44,7 @@ git clone https://github.com/qier222/YesPlayMusic.git
npm install
```
4. 替换 `/src/utils/request.js` 里面 `baseURL` 的值为网易云 API 地址
4. 替换 `/src/config/request.js` 里面 `baseURL` 的值为网易云 API 地址
```JS
baseURL: "http://example.com",