From 167bdc1a30aa67040c3012731e52e13af03cd015 Mon Sep 17 00:00:00 2001 From: lizhongyi Date: Thu, 22 Aug 2024 17:53:28 +0800 Subject: [PATCH] =?UTF-8?q?webview=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=89=8D=E8=BF=9B=E5=90=8E=E9=80=80=E5=8A=9F=E8=83=BD=E4=BE=9D?= =?UTF-8?q?=E8=B5=96uts=E6=8F=92=E4=BB=B6=E6=AD=A3=E5=B8=B8=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/web-view/web-view.uvue | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pages/component/web-view/web-view.uvue b/pages/component/web-view/web-view.uvue index a859ff3e..dad31898 100644 --- a/pages/component/web-view/web-view.uvue +++ b/pages/component/web-view/web-view.uvue @@ -33,6 +33,13 @@ + + + + 前进、后退功能在Windows端需要打自定义基座,MAC端需要配置Xcode环境后进行真机运行或者打自定义基座 + + + @@ -78,6 +85,22 @@ // #endif }, methods: { + getPackageName() : string { + const res = uni.getAppBaseInfo(); + let packageName : string = "" + + // #ifdef APP-IOS + packageName = res.bundleId + // #endif + + return packageName + }, + isProd(): boolean { + if (this.getPackageName() == 'io.dcloud.hellouniappx') { + return true + } + return false + }, back() { this.webviewContext?.back(); }, -- GitLab