设置隐藏">立即邀请1.2点击button按钮分享获取邀请码onShareAppMessage: async function(res) { console.log(_uniapp 设置隐藏">
赞
踩
1.小程序原生自带分享到朋友圈
onShareAppMessage: function () {
console.log('转发');
},
1.1button分享按钮
<button class="invitebtn" open-type="share">立即邀请</button>
1.2点击button按钮分享获取邀请码
onShareAppMessage: async function(res) {
console.log(res);
if(res.from == "button"){
let result = await Api.createcode();
if(result.data.code == 200){
this.code = result.data.data.inviteCode
console.log(this.code);
}
console.log(this.code);
}
return {
path: '/pages/home/init?inviteCode='+this.code
}
},
2.隐藏原生自带的分享
onLoad(){
uni.hideShareMenu()
}
3.原生分享到朋友圈
onShareTimeline() {},
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。