Skip to content

Commit

Permalink
Update 201609.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qibaoguang authored Sep 22, 2016
1 parent bd4e108 commit 8b90a53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 工作总结/201609.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
```
参考:[微信支付需要监听WeixinJSBridgeReady](https://my.oschina.net/ailingling/blog/310118)

PS:这种方式也不是很合适

2、确保WeixinJSBridge及WeixinJSBridge.invoke初始化完毕
```javascript
/**
* 检测微信JsAPI
* @param callback
*/
function detectWeixinApi(callback){
if(typeof window.WeixinJSBridge == 'undefined' || typeof window.WeixinJSBridge.invoke == 'undefined'){
if(typeof window.WeixinJSBridge == 'undefined'){
setTimeout(function(){
detectWeixinApi(callback);
},200);
Expand Down

0 comments on commit 8b90a53

Please sign in to comment.