Skip to content

Commit

Permalink
feat(Wechat): 支持外部调用 invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed May 22, 2019
1 parent 46de6a0 commit 463005f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Wechat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export class Wechat {
* @param params 传给 API 的参数
* @returns 调用结果
*/
private invoke(jsApi: WechatJsApi, params: Record<string, any> = {}): Promise<any> {
invoke(jsApi: WechatJsApi, params: Record<string, any> = {}): Promise<any> {
return new Promise((resolve, reject) => {
if (typeof wx === 'undefined') return reject('请先引入微信 JSSDK')
if (!wx[jsApi]) return reject(`wx.${jsApi} 不可用`)
Expand Down

0 comments on commit 463005f

Please sign in to comment.