我弄微信小程序的分享功能,可以实现分享转发,可以就是监听不到他的回调函数,我的代码是这么写的:
cc.loader.loadRes(“share”,function(err,data){
wx.onShareAppMessage(function(res){
console.log(“onShareAppMessage:” + res);
return {
title: “俄罗斯方块加强版”,
imageUrl: “https://mng.netmarble.com.cn/web/weixin/block/res/raw-assets/resources/share.fde43.png”,
success(res){
self.Info.string = “success!!!”;
console.log(“success:” + res)
},
fail(res){
self.Info.string = “fail!!!”;
console.log(“fail:” + res)
}
}
})
});
定义了 success和fail回调,但是都打印不出来日志。
有人知道是怎么回事吗。。?
谢谢啦!!