this.$route.path

//获取当前路由地址

//http://localhost:8002/#/addGoods   =>  addGoods

this.$route.path.replace('/','')

 

你可能感兴趣的:(vue实战)