返回上一页 this.$router.go(-1) 返回上一页,否则跳转指定页面 if (window.history.length <= 1) { this.$router.push({path:'/'}) return false } else { this.$router.go(-1) }