We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OC: typedef void (^WVJBResponseCallback)(id responseData);
[_bridge registerHandler:@"logOut" handler:^(id data, WVJBResponseCallback responseCallback) { [[LoginManager sharedInstance] logout]; responseCallback(@{@"status":@"1", @"respData":@{@"test":@"test"}}); }];
JS: self.bridge().registerHandler_handler("logOut", block("id, WVJBResponseCallback", function(data, responseCallback){ console.log("回调成功") }))
以上这样写回调不成功....
The text was updated successfully, but these errors were encountered:
不清楚是哪个回调不成功,不过 block("id, WVJBResponseCallback, )" 得写成 block("id, NSBlock*", )
block("id, WVJBResponseCallback, )"
block("id, NSBlock*", )
Sorry, something went wrong.
谢谢, 这样可以了. 也就是说 block 作为参数 得用 NSBlock* 谢谢 bang..
No branches or pull requests
OC:
typedef void (^WVJBResponseCallback)(id responseData);
[_bridge registerHandler:@"logOut" handler:^(id data, WVJBResponseCallback responseCallback) {
[[LoginManager sharedInstance] logout];
responseCallback(@{@"status":@"1", @"respData":@{@"test":@"test"}});
}];
JS:
self.bridge().registerHandler_handler("logOut", block("id, WVJBResponseCallback", function(data, responseCallback){
console.log("回调成功")
}))
以上这样写回调不成功....
The text was updated successfully, but these errors were encountered: