//JSconstapp=newgetApp();Page({/***页面的初始数据*/data:{//点击链接进入小程序显示支付按钮paymentShow:false,},/***生命周期函数--监听页面加载*/onLoad:function(options){console.warn("分享出去获取到的数据===",options.id);if(options.id=="123"){this.setData({paymentShow:true})}},//分享onShareAppMessage:function(res){console.log(res);if(res.from==='button'){//来自页面内转发按钮console.log(res.target)}return{title:'测试',path:'/pages/index/index?id=123',success:function(res){//转发成功},fail:function(res){//转发失败}}},})//WXMLviewclass='footer'buttonclass='inviteBtn'bindtap='onShareAppMessage'open-type='share'分享/button/view

TAG标签: 小程序分享传值点击分享链接取值小程序生成分享链接微信小程序复制链接

http://www.xiaochengxub.com/read-96954.html