Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

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

this.$router.push()跳转路由,前面拼接的是什么?

今天突然想到一个问题,平时路由跳转页面,我都是直接用this.$router.push()方法,
比如要调到首页,就直接this.$router.push({'path':'/home'})
跳转之后完整的页面就是:
域名 + url参数 + 路由
我的项目就是
http://xxxx.com?Data=xxxx&token=xxxx&id=xxx?nextAction= #/home

问题1:
我就想知道,http://xxxx.com?Data=xxxx&token=xxxx&id=xxx?nextAction= 这段是怎么拼接上去的?

问题2:
如果我想嵌套 一个链接打开新的页面,
使用iframe或者window.open,
Data和token还会带过去吗?

有没有大佬帮小白解答下T-T~!!! 非常感谢


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

1 Answer

0 votes
by (71.8m points)

window.location.href=‘http://xxxx.com%3Fdata%3Dxxxx... #/home’


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...