ios系统url上#后面的信息不会解析,会被忽略掉
比如url:/dist/#/detail?id=10
直解析到/dist/,所以跳转到首页
解决方案:在index页面添加如下代码
beforeCreate() {
window.location.href = window.location.href.split('#')[0] + '#' + this.$route.fullPath
},
亲测有效,可以解决点击分享出去的链接总是跳首页、首次授权会跳首页的问题