taro页面获取传的参数
-
比如Apage跳转到Bpage,A页面写:
Taro.navigateTo({ url: '/pages/goods/detail?goods_id=150147' })
B页面接收:
componentWillMount () { console.log(this.$router.params); }
但是什么都获取不到,怎么搞啊,网上都是这样说的
-
@jd_62cf4b19e347f
componentDidMount(){
const { ...params } = this.$router.params
}
-
getCurrentInstance().router.params 3.0