
uni.request({
})
根目录下新建vue.config.js文件 配置
生产环境请用nginx
配置vue.config.js
module.exports = {
devServer: {
proxy: {
"/api": {
target: "https://xxxxx",
changeOrigin: true,
pathRewrite: {
"^/api": ""
}
}
}
}
};