1.vite写法 export default { proxy: { '/api': { target: 'http://v.juhe.cn', changeOrigin: true,//换源 rewrite: path => path.replace(/^\/api/, '') } } } 2.vue写法 3.代理后发起请求 4.使用