javascript - React with fetch error reporting problem
巴扎黑2017-05-17 10:06:21
0
1
572
I was doing a test, and then used fetch to make the interface, and then an error was reported. . . . #There is definitely a request on the backend. It seems to be a cross-domain problem. Please find a solution! Thanks.
It’s a cross-domain issue. If this is just a development environment and you want to deploy it to the server in the future, you can just set the chrome browser to allow cross-domain --disable-web-security --user-data-dir right-click shortcut Method, add this after the target. If not, ask the backend to open a cross-domain one for you
It’s a cross-domain issue. If this is just a development environment and you want to deploy it to the server in the future, you can just set the chrome browser to allow cross-domain --disable-web-security --user-data-dir right-click shortcut Method, add this after the target.

If not, ask the backend to open a cross-domain one for you
Open this picture and you’ll be good to go