vue中2种取值的方式

1.url是这种方式的:http://localhost:3000/user/1

取得参数的方式为:this.$route.params.id

2.url为get方式用?拼接参数的:http://localhost:3000/user?phone=131121123&companyId=2aicon-default.png?t=N7T8http://localhost:3000/

 取得参数值的方式为:let phone=this.$route.query.name

你可能感兴趣的:(vue.js,前端,javascript)