Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 91448

oc调js时没报错也调用成功

$
0
0

@1160788711 写道:

代码 :
//登录回调

define AddStr(str1,str2) [str1 stringByAppendingString:str2]

tips = AddStr(AddStr(@"IosToCocos2dx.loginAccountCallback('",Data),@"')");
NSLog(@"data===%@",tips);
//const char* code = [NSString UTF8String: *tips];
const char*code = [tips UTF8String];
se::ScriptEngine::getInstance()->evalString(code, NULL);

传的参数code的值为:"IosToCocos2dx.loginAccountCallback('B5BB55684047FD22650E5C4F7EB89BCF|傻乎乎|男|http://thirdqq.qlogo.cn/qqapp/1108047558/E23EC1FBC571D16DF6E0401D3A565263/100|通州')"

帖子: 3

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 91448

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>