在uniapp根目录下的 manifest.json 添加 (注意:使用代理就不要用baseurl, 如果baseURL有值,就不会走代理)
“h5”: {
“devServer”: {
“proxy”: {
“/8888”: {
“target”: “https://www.baidu.com/api“,
“changeOrigin”: true,
“pathRewrite”: {
“^/8888”: “/“
}
},
}
}
在uniapp根目录下的 manifest.json 添加 (注意:使用代理就不要用baseurl, 如果baseURL有值,就不会走代理)
“h5”: {
“devServer”: {
“proxy”: {
“/8888”: {
“target”: “https://www.baidu.com/api“,
“changeOrigin”: true,
“pathRewrite”: {
“^/8888”: “/“
}
},
}
}
让时间为你证明