router.beforeEach(function (to, from, next) {
if (!!to.meta.title) {
document.title = to.meta.title
}

<script>
export default {
name: 'searchEntrance',
methods:{
goSearch(item){
this.$router.push(`/install/${item}`)
// 1 消费流水查询 2 月结单查询
},
},
}
</script>
created(){
var id = this.$route.params.id
console.log(id)
if (id == 1 ) {
document.title = '消费流水查询'
}else if(id == 2){
document.title = '月账单查询'
}
}
网友评论