提交 19486d98 作者: 王进

右上角分享监听后显示

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