微信小程序分享获取携带参数以及参数接收

    onLoad(req) {
            _self=this;
            _globalData=getApp().globalData;
            this.webUrl=_globalData.PageWebUrl;                
            if(this.webUrl=='')
            {
                this.webUrl=req.webUrl;
            }       
            
            
        },
        onShareAppMessage: function () {            
             //微信设置可以转发    
            return {
                    //title: '分享标题',                 
                    path: '/pages/Main/PageWeb?webUrl='+_self.webUrl // 路径,传递参数到指定页面。
                }    
        },

猜你喜欢

转载自www.cnblogs.com/zengxh/p/12426755.html