8000 GitHub - Rain120/cloud-music-web: React + Antd + TS to build the web netease music
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rain120/cloud-music-web

Repository files navigation

React + Antd + Axios 网易云音乐网页版

测试账号 phone: 7480719899

架构图

web-struct

分支

  • routes 路由设置
  • axios-config axios请求配置

Error

Axios 问题

1、跨域问题

Q: CORS

start.js start-load-proxy

paths.js path-load-proxy

我们在start.js中找到webpack读取proxy的配置发现最终是读取package.json中的配置项proxy, 故:

A: package.json添加下面配置

"proxy": {
    "/api": {
      "target": "http://localhost:3000",
      "changeOrigin": true,
      "pathRewrite": {
        "^/api": "/"
      }
    }
  }

2、Axios 404

axios-404 network

A: package.jsonproxy配置问题

About

React + Antd + TS to build the web netease music

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0