Former-commit-id: 394df892c4488487bf5e1141b99511ab5643a8a7
Former-commit-id: 9da9e9d3027aa75981a436caeae53979d9472da8
TSXN
wanggang 5 years ago
parent 7055da3a49
commit 1233183148

@ -31,7 +31,7 @@ router.beforeEach((to, from, next) => {
}
else {
if (to.path === from.path) {
router.push({ path: '/router/shared/redirect.html', query: { url: to.fullUrl } })
router.push({ path: '/router/shared/redirect.html', query: { url: to.fullPath } })
}
else {
next();

@ -4,8 +4,8 @@
<script>
export default {
mounted: function () {
console.log('redirect');
this.$router.push(this.$route.query.url);
var url = this.$route.query.url || '/';
this.$router.push(url);
},
methods: {
beforeRouteEnter(to, from, next) {

Loading…
Cancel
Save