First, create the following files in the root directory vue.config.js
module.exports = { devServer: { proxy: { '/api': { target: 'http://101.132.176.241', changeOrigin: true, pathRewrite: { "^/api": "" // rewrite path } } } } }
Copy the code into it
Be sure to restart the project! ! ! !
Be sure to restart the project! ! ! !
Be sure to restart the project! ! ! !