提交 167bdc1a 编写于 作者: lizhongyi_'s avatar lizhongyi_

webview页面增加前进后退功能依赖uts插件正常编译的提示

上级 7f3bc165
...@@ -33,6 +33,13 @@ ...@@ -33,6 +33,13 @@
</view> </view>
</view> </view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-IOS -->
<view class="uni-row uni-btn-v" v-if="isProd() === false">
<view class="uni-row uni-flex-item align-items-center">
<text>前进、后退功能在Windows端需要打自定义基座,MAC端需要配置Xcode环境后进行真机运行或者打自定义基座</text>
</view>
</view>
<!-- #endif -->
</view> </view>
<!-- #endif --> <!-- #endif -->
</scroll-view> </scroll-view>
...@@ -78,6 +85,22 @@ ...@@ -78,6 +85,22 @@
// #endif // #endif
}, },
methods: { 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() { back() {
this.webviewContext?.back(); this.webviewContext?.back();
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册