解决uni-app项目,ios端通过微信浏览器打开app时plus.runtime.arguments无法携带参数问题

1.首先需要打自定义基座在真机测试
2.去除项目page.josn中的condition配置,不去除一直会返回{{name: "", query: "",path: ""}}
3.在项目中App.vue文件中

onShow(() => {
  // #ifdef APP-PLUS
	setTimeout(() => {
            const args = plus.runtime.arguments;
            //  代码逻辑
        }, 500}
// #endif
}
//在onHide中清除
onHide(() => {
	//#ifdef APP-PLUS
		 plus.runtime.arguments = "";
	//#endif
})
posted @ 2024-09-05 08:55  我喝牛奶不舔盖  阅读(413)  评论(0)    收藏  举报
I hear and I forget. I see and I remember. I do and I understand