How does ant-design-pro call the server interface?

mock, is used in ant-design-pro. Now I"m going to call the test server interface api.
I banned mock in .uplohogrc.mock.js
modified mock according to ant-design-pro "s official documentation

// 
const noProxy = (process.env.NO_PROXY === "true");
.
.
.

export default noProxy
  ? {"/*": "http://192.168.6.88"}
  : delay(proxy, 1000);

but it is local after startup instead of the IP of the test server http://192.168.6.88.

Mar.18,2021

specify the proxy address in mock .
in addition, you can also ignore mock by configuring proxy of webpack .


set proxy in webpacktrc

clipboard.png



API.js/lesson,localhost:8080nginx


/ / const noProxy = false;
export default {
'GET / *':' http://192.168.6.88:8080',
'POST / *':' http://192.168.6.88:8080',
};

try to change it directly to this

Is the

problem solved? Please let me know.

Menu