|
[插件开发]
自定义模块 index页面执行该模块 其中某方法接收不了数据
[复制链接]
JS实现:
var task=null;
task=api.require("taskMsg");
task.sendInit();
task.sendSess({"sess":'c9f98a459ffc454cbb9da4b3eacbe6a4'});
task.sendData(function(ret,err){
api.alert({msg:ret});
});
模块中实现:
/*取得数据传客户端处理*/
-(void)sendDataNSDictionary *)paramDict
{
NSNumber *cbid=[paramDict objectForKey"cbid"];
NSLog(@"%@",paramDict);
if(cbid)
{
[self sendResultEventWithCallbackId:[cbid intValue] dataDict:paramDict errDict:nil doDelete:YES];
}
}
页面执行,未收到数据,xcode中NSLog()是有数据的;
|
|