问题描述
在我的 VueJS 应用中,我想通过传统的确认链接确认注册。 这个链接看起来像这样
https://dev.xyz.com/auth/register-confirm?some=Data
beforeCreate () {
const query = this.$route.query // Is empty object on live page,works on localhost
this.confirm(query)
},
也很奇怪,当我把原来的链接复制到浏览器进入网站的时候,自动切掉了查询参数,所以链接是这样的
https://dev.xyz.com/auth/register-confirm
无论我输入什么作为查询参数。
解决方法
发现问题。我们在 AWS Amplify 上托管该站点。这是由重写/重定向引起的。