你好。我用的是uni-app生成的app。现在做个跳转到小程序的功能,但是报bad_param。id确实是原始id。 [图片]
app跳转微信小程序 报bad_param errCode:-11002微信开发平台已关联小程序 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字段数据 } } 对应的跳转代码
2020-11-05