{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/weex/issues/261","repository_url":"https://api.github.com/repos/alibaba/weex","labels_url":"https://api.github.com/repos/alibaba/weex/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/weex/issues/261/comments","events_url":"https://api.github.com/repos/alibaba/weex/issues/261/events","html_url":"https://github.com/alibaba/weex/issues/261","id":154978100,"number":261,"title":"在native中使用返回值作为回调参数","user":{"login":"Demon-liao","id":2654683,"avatar_url":"https://avatars.githubusercontent.com/u/2654683?v=3","gravatar_id":"","url":"https://api.github.com/users/Demon-liao","html_url":"https://github.com/Demon-liao","followers_url":"https://api.github.com/users/Demon-liao/followers","following_url":"https://api.github.com/users/Demon-liao/following{/other_user}","gists_url":"https://api.github.com/users/Demon-liao/gists{/gist_id}","starred_url":"https://api.github.com/users/Demon-liao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demon-liao/subscriptions","organizations_url":"https://api.github.com/users/Demon-liao/orgs","repos_url":"https://api.github.com/users/Demon-liao/repos","events_url":"https://api.github.com/users/Demon-liao/events{/privacy}","received_events_url":"https://api.github.com/users/Demon-liao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"sospartan","id":115201,"avatar_url":"https://avatars.githubusercontent.com/u/115201?v=3","gravatar_id":"","url":"https://api.github.com/users/sospartan","html_url":"https://github.com/sospartan","followers_url":"https://api.github.com/users/sospartan/followers","following_url":"https://api.github.com/users/sospartan/following{/other_user}","gists_url":"https://api.github.com/users/sospartan/gists{/gist_id}","starred_url":"https://api.github.com/users/sospartan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sospartan/subscriptions","organizations_url":"https://api.github.com/users/sospartan/orgs","repos_url":"https://api.github.com/users/sospartan/repos","events_url":"https://api.github.com/users/sospartan/events{/privacy}","received_events_url":"https://api.github.com/users/sospartan/received_events","type":"User","site_admin":false},"assignees":[{"login":"sospartan","id":115201,"avatar_url":"https://avatars.githubusercontent.com/u/115201?v=3","gravatar_id":"","url":"https://api.github.com/users/sospartan","html_url":"https://github.com/sospartan","followers_url":"https://api.github.com/users/sospartan/followers","following_url":"https://api.github.com/users/sospartan/following{/other_user}","gists_url":"https://api.github.com/users/sospartan/gists{/gist_id}","starred_url":"https://api.github.com/users/sospartan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sospartan/subscriptions","organizations_url":"https://api.github.com/users/sospartan/orgs","repos_url":"https://api.github.com/users/sospartan/repos","events_url":"https://api.github.com/users/sospartan/events{/privacy}","received_events_url":"https://api.github.com/users/sospartan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-05-16T07:46:50Z","updated_at":"2016-08-30T05:58:05Z","closed_at":"2016-08-30T05:58:05Z","body":"之前咨询过关于native API的问题，native和JS之间传递数据也能通过回调函数进行执行。今天我尝试用另一种方式来返回数据给到JS，如下：\r\n```java\r\n @WXModuleAnno(moduleMethod = true,runOnUIThread = true)\r\n  public  String testText(String string){\r\n    String _string=\"demo_\"+string;\r\n    return string;\r\n  }\r\n```\r\n想在native里面注册一个方法直接return数据回来。貌似得到的结果是`undefined`。\r\n可否考虑执行下这种方式呢？个人觉得这样同步操作，会更方便的获取一些信息。也能避免异步尝试的一些其他问题。"}}
{"actor":{"display_login":"Jinjiang"}}