微信开发平台已关联小程序
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @""; //拉起的小程序的username
launchMiniProgramReq.path = nil; //拉起小程序页面的可带参路径,不填默认拉起小程序首页
launchMiniProgramReq.miniProgramType = WXMiniProgramTypePreview; //拉起小程序的类型
[WXApi sendReq:launchMiniProgramReq];
// [WXApi openWXApp];
-(void)onResp:(BaseResp *)resp
{
if ([resp isKindOfClass:[WXLaunchMiniProgramResp class]])
{
// NSString *string = resp.extMsg;
NSLog(@"respeee:%@",resp.errStr);
// 对应JsApi navigateBackApplication中的extraData字段数据
}
}
对应的跳转代码