From 697894dcd9880eccd704e477fc3651dc162246fc Mon Sep 17 00:00:00 2001 From: handongxun Date: Thu, 26 May 2022 16:02:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20vue3=20app=20=E5=B9=B3=E5=8F=B0=20manif?= =?UTF-8?q?est=20=E5=A2=9E=E5=8A=A0=E6=A3=80=E6=9F=A5Android=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Fwebview=E7=89=88=E6=9C=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/json/app/manifest/checksystemwebview.ts | 8 ++++++++ packages/uni-cli-shared/src/json/app/manifest/index.ts | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 packages/uni-cli-shared/src/json/app/manifest/checksystemwebview.ts diff --git a/packages/uni-cli-shared/src/json/app/manifest/checksystemwebview.ts b/packages/uni-cli-shared/src/json/app/manifest/checksystemwebview.ts new file mode 100644 index 000000000..933a615f1 --- /dev/null +++ b/packages/uni-cli-shared/src/json/app/manifest/checksystemwebview.ts @@ -0,0 +1,8 @@ +export function initCheckSystemWebview(manifestJson: Record) { + // 检查Android系统webview版本 || 下载X5后启动 + let plusWebview = manifestJson.plus.webView + if (plusWebview) { + manifestJson.plus['uni-app'].webView = plusWebview + delete manifestJson.plus.webView + } +} diff --git a/packages/uni-cli-shared/src/json/app/manifest/index.ts b/packages/uni-cli-shared/src/json/app/manifest/index.ts index 97f3a777f..e28b1c647 100644 --- a/packages/uni-cli-shared/src/json/app/manifest/index.ts +++ b/packages/uni-cli-shared/src/json/app/manifest/index.ts @@ -9,6 +9,7 @@ import { initSplashscreen } from './splashscreen' import { initConfusion } from './confusion' import { initUniApp } from './uniApp' import { initLaunchwebview } from './launchwebview' +import { initCheckSystemWebview } from './checksystemwebview' import { initTabBar } from './tabBar' import { initI18n } from './i18n' @@ -33,6 +34,8 @@ export function normalizeAppManifestJson( manifestJson, pagesJson ) + // 依赖 initUniApp 先执行 + initCheckSystemWebview(manifestJson) return initI18n(manifestJson) } -- GitLab