Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uni-app SDK 使用 openUniMP 打开页面,在 onLoad 中拿不到参数 #4945

Open
zhuscat opened this issue May 30, 2024 · 0 comments
Open
Labels

Comments

@zhuscat
Copy link

zhuscat commented May 30, 2024

集成到 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 中,可以拿到参数,这个行为似乎与微信小程序不一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants