Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
331 views
in Technique[技术] by (71.8m points)

如果在.vue页面上或者在router.beforeEach()上调用代理地址

image.png

在vue.config.js里面定义了一个代理地址,然后我是想着点击跳转路由的时候把定义好的代理地址加上我要跳转的地址(/demo/index==>http://127.0.0.1:8086/index),但是不知道怎么去拿到代理的地址实现跳转


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

既然有vue.config.js那就是vuecli的项目吧;把这个地址放.env文件里面吧;作为环境变量


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...