javascript - vue-router route jumps to other addresses, how to not keep history records
为情所困
为情所困 2017-05-16 13:42:06
0
3
1011

Page routing is configured with two

{
  path: 'index',
  name: 'introduce',
  component: page.introduce,
},
{
  path: 'detail',
  name: 'detail',
  component: page.detail,
}

First jump from index to detail, detail then jump to other addresses such as Baidu or something, and then click return on WeChat. How to return directly to the first page?

为情所困
为情所困

reply all(3)
Peter_Zhu

After jumping to Baidu, it will no longer be under your control.
You can determine whether the document.referrer is for another URL in your routing or component. If so, return to the first page.

伊谢尔伦

window.location.replace()

Peter_Zhu

this.$router.replace()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template