let req = new wxopensdk.LaunchMiniProgramReq
req.userName = wxObj["weapp_id"]
req.path = wxObj["path"]
const wxApi = wxopensdk.WXAPIFactory.createWXAPI("appid")
let finished = await wxApi.sendReq(getContext() as common.UIAbilityContext, req)
weapp_id 和 path 参数是没有问题的,iOS和安卓都能正常拉起小程序指定页面path
鸿蒙SDK1.0.3版本, 能正常拉起小程序,但是无法拉起小程序指定页面?
path = `pages/home/mainPage?userId=123&userName=abc&uuid=mcwldkxlqwdkqlkwd`
console.log(path);
let req = new wxopensdk.LaunchMiniProgramReq
req.userName = "xxxxxxxx";
req.path = path;
req.miniprogramType = 0;
let finished = await this.wxApi.sendReq(getContext(this) as common.UIAbilityContext, req)
path给出指定页面并携带参数,再小程序端只能接收到第一个参数userId,后面的都接受不不到。
你去小程序打印一下就知道了,query参数就只能传过去第一个参数,真的坑