小程序跳转另一个小程序用extraData带参失败
发布于 4 年前 作者 jiexue 15296 次浏览 来自 问答

这是A小程序的代码

这是B小程序的代码,在B小程序,接受A小程序带过来的传数

,我在onLoad和onShow都接收参数,在真机上

onLoad和onShow打印出来都为空

2 回复

在app.js中接app({

    onLaunch:  function (options) {

         var that =  this

        that.globalData.catalog = options.referrerInfo.extraData.id;  //小程序进入的传参

    }

})

回到顶部