uni-app
uni-app copied to clipboard
uni-app SDK 使用 openUniMP 打开页面,在 onLoad 中拿不到参数
trafficstars
集成到 iOS App 中
示例代码如下:
let conf = DCUniMPConfiguration()
conf.path = "pages/tabBar/API/API?id=1"
conf.extraData = ["hello": "hello"]
DCUniMPSDKEngine.openUniMP(appid, configuration: conf) { instance, error in
if instance != nil {
print("小程序打开成功")
} else {
print(error as Any)
}
}
在 pages/tabBar/API/API 页面的 onLoad 中,拿不到 id 参数,只有在 onLaunch 中,可以拿到参数,这个行为似乎与微信小程序不一致