|
@@ -43,16 +43,11 @@ export default {
|
|
|
isIos: null,
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.hideAndroidNav();
|
|
|
+ },
|
|
|
mounted() {
|
|
|
- // 判断是否是App, 活动页app不显示头部,直接使用H5头部
|
|
|
- this.isApp = this.$userAgent.isSzx || this.$userAgent.isSzxBrowser
|
|
|
- this.isAndroid = this.$userAgent.isAndroid;
|
|
|
- this.isIos = this.$userAgent.isIos;
|
|
|
-
|
|
|
- // 安卓隐藏返回按钮
|
|
|
- if (this.isApp && this.isAndroid && !!window.native.goneBack) {
|
|
|
- window.native.goneBack() // 安卓隐藏返回按钮
|
|
|
- }
|
|
|
+ this.hideAndroidNav();
|
|
|
},
|
|
|
computed: {
|
|
|
containerStyle() {
|
|
@@ -97,6 +92,18 @@ export default {
|
|
|
// 浏览器返回上一页
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
+ // 安卓返回按钮
|
|
|
+ hideAndroidNav() {
|
|
|
+ // 判断是否是App, 活动页app不显示头部,直接使用H5头部
|
|
|
+ this.isApp = this.$userAgent.isSzx || this.$userAgent.isSzxBrowser
|
|
|
+ this.isAndroid = this.$userAgent.isAndroid;
|
|
|
+ this.isIos = this.$userAgent.isIos;
|
|
|
+
|
|
|
+ // 安卓隐藏返回按钮
|
|
|
+ if (this.isApp && this.isAndroid && !!window.native.goneBack) {
|
|
|
+ window.native.goneBack() // 安卓隐藏返回按钮
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|