From ee2c7b41f816ea82cec8862ad4ab7dc8db8c3cbf Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Tue, 8 Oct 2024 13:07:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(android):=20=E7=A7=BB=E9=99=A4=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/get-app/get-app.uvue | 6 +++--- pages/API/get-current-pages/get-current-pages.uvue | 4 +++- pages/component/web-view/web-view.uvue | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/API/get-app/get-app.uvue b/pages/API/get-app/get-app.uvue index e31a5df4..2cdf2e50 100644 --- a/pages/API/get-app/get-app.uvue +++ b/pages/API/get-app/get-app.uvue @@ -172,12 +172,12 @@ setLifeCycleNum(num) }, checkGetAndroidApplication() : boolean { - const app = getApp() - const androidApplication = app.getAndroidApplication() // #ifdef APP-ANDROID - const res = androidApplication != null + const res = true // #endif // #ifndef APP-ANDROID + const app = getApp() + const androidApplication = app.getAndroidApplication() const res = androidApplication == null // #endif console.log('check getAndroidApplication', res) diff --git a/pages/API/get-current-pages/get-current-pages.uvue b/pages/API/get-current-pages/get-current-pages.uvue index 92ea03ec..4fe89ef1 100644 --- a/pages/API/get-current-pages/get-current-pages.uvue +++ b/pages/API/get-current-pages/get-current-pages.uvue @@ -86,9 +86,11 @@ } }, onLoad(options : OnLoadOptions) { + // #ifndef APP-ANDROID if (options instanceof UTSJSONObject) { this.checked = true } + // #endif this.getPageStyle(); }, onPullDownRefresh() { @@ -252,4 +254,4 @@ .radio-value { margin-left: 10px; } - + diff --git a/pages/component/web-view/web-view.uvue b/pages/component/web-view/web-view.uvue index 494bef44..f8fb9bec 100644 --- a/pages/component/web-view/web-view.uvue +++ b/pages/component/web-view/web-view.uvue @@ -87,10 +87,10 @@ }, methods: { getPackageName() : string { - const res = uni.getAppBaseInfo(); let packageName : string = "" // #ifdef APP-IOS + const res = uni.getAppBaseInfo(); packageName = res.bundleId // #endif -- GitLab