提交 96418ab9 authored 作者: JarvanMo's avatar JarvanMo

fix #471

上级 c180e520
...@@ -104,22 +104,29 @@ FlutterMethodChannel *fluwxMethodChannel = nil; ...@@ -104,22 +104,29 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
WXSubscribeMsgResp *subscribeMsgResp = (WXSubscribeMsgResp *) resp; WXSubscribeMsgResp *subscribeMsgResp = (WXSubscribeMsgResp *) resp;
NSMutableDictionary *result = [NSMutableDictionary dictionary]; NSMutableDictionary *result = [NSMutableDictionary dictionary];
if(subscribeMsgResp.openId != nil){ NSString *openid = subscribeMsgResp.openId;
result[@"openid"] = subscribeMsgResp.openId; if(openid != nil && openid != NULL && ![openid isKindOfClass:[NSNull class]]){
result[@"openid"] = openid;
} }
if(subscribeMsgResp.openId != nil){
result[@"templateId"] = subscribeMsgResp.templateId; NSString *templateId = subscribeMsgResp.templateId;
} if(templateId != nil && templateId != NULL && ![templateId isKindOfClass:[NSNull class]]){
if(subscribeMsgResp.openId != nil){ result[@"templateId"] = templateId;
result[@"action"] = subscribeMsgResp.action;
} }
if(subscribeMsgResp.openId != nil){
result[@"reserved"] = subscribeMsgResp.reserved; NSString *action = subscribeMsgResp.action;
if(action != nil && action != NULL && ![action isKindOfClass:[NSNull class]]){
result[@"action"] = action;
} }
if(subscribeMsgResp.openId != nil){
result[@"scene"] = @(subscribeMsgResp.scene); NSString *reserved = subscribeMsgResp.action;
if(reserved != nil && reserved != NULL && ![reserved isKindOfClass:[NSNull class]]){
result[@"reserved"] = reserved;
} }
UInt32 scene = subscribeMsgResp.scene;
result[@"scene"] = @(scene);
[fluwxMethodChannel invokeMethod:@"onSubscribeMsgResp" arguments:result]; [fluwxMethodChannel invokeMethod:@"onSubscribeMsgResp" arguments:result];
} else if ([resp isKindOfClass:[WXLaunchMiniProgramResp class]]) { } else if ([resp isKindOfClass:[WXLaunchMiniProgramResp class]]) {
if ([_delegate respondsToSelector:@selector(managerDidRecvLaunchMiniProgram:)]) { if ([_delegate respondsToSelector:@selector(managerDidRecvLaunchMiniProgram:)]) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论