提交 bd30bef1 作者: 王进

增加右上角分享按钮监听接口

上级 fde188ed
......@@ -70,13 +70,6 @@ class WechatSDK {
that.ReportParams.openId = that.sdkParams.open_id = that.sdkParams.uniqueid = res.data.openid
that.sdkParams.session_key = res.data.session_key
that.sdkActive() // SDK激活
const ShareParams = {
title: SDKConfig.shareTitle,
imageUrl: SDKConfig.shareImageUrl,
query: 'fromOpenId=' + that.ReportParams.openId + '&from=share&tag=0'
}
// 监听右上角的分享按钮
that.addShareEvent(ShareParams)
} else {
that.printf(res.msg, 1)
}
......@@ -541,15 +534,16 @@ class WechatSDK {
complete: () => {}
})
}
private addShareEvent(DATA) {
// 监听右上角的分享按钮
public addShareEvent(DATA, CALLBACK) {
const that = this;
const ShareParams = {
title: SDKConfig.shareTitle,
imageUrl: SDKConfig.shareImageUrl,
query: 'fromOpenId=' + that.ReportParams.openId + '&from=share&tag=0'
};
(wx as any).onShareAppMessage(() => {
return that.deepCopy(DATA, {
success: function() {},
fail: function() {},
complete() {}
})
return that.deepCopy(DATA, CALLBACK)
})
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论