+
95
-

回答

在manifest.json增加proxy配置即可,将https://api.example.com换成你的真实api域名

{
"h5": {
"devServer": {
"proxy": {
"/api": {
"target": "https://api.example.com",
"pathRewrite": {
"^/api": ""
}
}
}
}
}
}


网友回复

我知道答案,我要回答