Skip to content

Commit

Permalink
fix(Wechat): 兼容低版本微信
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Apr 1, 2019
1 parent 824124d commit acae30d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Wechat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export type WechatJsApi = (
'checkJsApi' |
'updateAppMessageShareData' |
'updateTimelineShareData' |
'onMenuShareTimeline' |
'onMenuShareAppMessage' |
'onMenuShareQQ' |
'onMenuShareQZone' |
'startRecord' |
'stopRecord' |
'onVoiceRecordEnd' |
Expand Down Expand Up @@ -195,6 +199,11 @@ export class Wechat {
return promiseSeries([
() => this.invoke('updateAppMessageShareData', params),
() => this.invoke('updateTimelineShareData', params),
// 兼容低版本微信
() => this.invoke('onMenuShareAppMessage', params),
() => this.invoke('onMenuShareTimeline', params),
() => this.invoke('onMenuShareQQ', params),
() => this.invoke('onMenuShareQZone', params),
]).then(() => {
this.prevShareParams = params
})
Expand Down

0 comments on commit acae30d

Please sign in to comment.