taro 页面跳转传参
当前页面,进行传参toGoodsDetails=(goodsId)=>{//console.log(goodsId)Taro.navigateTo({url:'/pages/shopDetail/index?goodsId='+goodsId})};下一个页面接受参数import {Current} from "@tarojs/taro";componentWillMount(){const
·
当前页面,进行传参
toGoodsDetails=(goodsId)=>{
//console.log(goodsId)
Taro.navigateTo({
url:'/pages/shopDetail/index?goodsId='+goodsId
})
};
下一个页面接受参数
import {Current} from "@tarojs/taro";
componentWillMount(){
const goodsId=Current.router.params.goodsId;
console.log(goodsId);
}
更多推荐
已为社区贡献1条内容
所有评论(0)