首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
Vue----跨域
Vue----跨域
mac
2025-02-10
10
跨域
第1步: 配置代理,解决跨域的问题, 只有一个代理
proxy: 'http://store1.mc.com', proxy: { "/api": { target: "http://store1.mc.com", changeOrigin: true }, "/foo": { target: "" } },
第2步: 配置代理,解决跨域的问题, 要注释掉全局默认值 buaseUrl
main.js Vue.prototype.HOST = '/api'
转载请注明原文地址: https://mac.8miu.com/read-500249.html
最新回复
(
0
)