提交 19486d98 作者: 王进

右上角分享监听后显示

上级 bd30bef1
......@@ -18,7 +18,6 @@ class WechatSDK {
private userBtn:any // 用户授权按钮
private sdkinit() {
const that = this
this.shareInit()
that.userBtn = this.createUserInfoButton() // 创建用户授权按钮
that.userBtn.hide() // 隐藏按钮
//配置默认参数
......@@ -525,16 +524,7 @@ class WechatSDK {
}))
})
}
private shareInit() {
(wx as any).showShareMenu({
withShareTicket: true,
success: () => {},
fail: () => {},
complete: () => {}
})
}
// 监听右上角的分享按钮
// 右上角分享按钮
public addShareEvent(DATA, CALLBACK) {
const that = this;
const ShareParams = {
......@@ -545,6 +535,13 @@ class WechatSDK {
(wx as any).onShareAppMessage(() => {
return that.deepCopy(DATA, CALLBACK)
})
that.shareInit(CALLBACK)
}
private shareInit(CALLBACK) {
CALLBACK = this.deepCopy({}, {
withShareTicket: true
}, CALLBACK)
(wx as any).showShareMenu(CALLBACK)
}
private customer(params) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论