Skip to content

Commit

Permalink
fix(Wechat): 必须顺序调用分享接口,否则会失败
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Mar 30, 2019
1 parent 63af537 commit 716541a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Wechat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ export class Wechat {
...this.prevShareParams,
...params,
}
return Promise.all([
this.invoke('updateAppMessageShareData', params),
this.invoke('updateTimelineShareData', params),
]).then(() => {
this.prevShareParams = params
})
// 必须顺序调用分享接口,否则会失败!
return this.invoke('updateAppMessageShareData', params)
.then(() => this.invoke('updateTimelineShareData', params))
.then(() => {
this.prevShareParams = params
})
}

chooseImage(params?: WechatChooseImageParams): Promise<string[]> {
Expand Down

0 comments on commit 716541a

Please sign in to comment.