From de503c7bbec675022711c84ab45c6175987fb9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9C=B2=E7=8F=A0?= Date: Wed, 31 Aug 2022 08:55:01 +0000 Subject: [PATCH] =?UTF-8?q?update=20docs/tutorial/app-ios-schemes.md.=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96plus.runtime.arguments=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=BB=B6=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=BB=B6=E6=97=B6=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=B7=B7=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 露珠 --- docs/tutorial/app-ios-schemes.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/app-ios-schemes.md b/docs/tutorial/app-ios-schemes.md index 4d4ad1d14..4fed60b72 100644 --- a/docs/tutorial/app-ios-schemes.md +++ b/docs/tutorial/app-ios-schemes.md @@ -66,13 +66,21 @@ iOS系统中,由于沙盒的限制,导致程序之间相互隔离,需要ur 建议在应用生命周期app.vue的`onshow`事件中获取,示例代码如下: ``` js onShow: function() { + setTimeout(function () { var args= plus.runtime.arguments; if(args){ // 处理args参数,如直达到某新页面等 } + }, 200) } ``` - +在onHide中清空plus.runtime.arguments,不清空每次从后台进程进入前台会重复调用 +``` js + onHide() { + plus.runtime.arguments = '' + console.log('App Hide') + }, +``` - 5+App/Wap2App项目 在HTML页面的js中监听'plusready'和'newintent'事件回调中获取,示例代码如下: ``` js -- Gitee