Commit cf7f0fa5 by 展昭

tj

parent 395eeee6
Showing with 17 additions and 5 deletions
...@@ -159,7 +159,7 @@ import { Icon, Loading } from "vant"; ...@@ -159,7 +159,7 @@ import { Icon, Loading } from "vant";
import { TabHeader } from "@/components"; import { TabHeader } from "@/components";
import * as utils from "../../utils/common"; import * as utils from "../../utils/common";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import setBarHeight from "../../assets/js/setBarHeight.js";
import dayjs from "dayjs"; import dayjs from "dayjs";
export default { export default {
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
[Icon.name]: Icon, [Icon.name]: Icon,
TabHeader TabHeader
}, },
mixins: [setBarHeight],
data() { data() {
return { return {
title: "人事服务", title: "人事服务",
...@@ -418,6 +418,18 @@ export default { ...@@ -418,6 +418,18 @@ export default {
} }
} }
}, },
setBarHeight() {
const barHeight = localStorage.getItem("barHeight");
const conHeight = 46 + barHeight;
console.log("mixins barHeight=", barHeight);
document
.getElementsByClassName("iosStyle")[0]
.setAttribute("style", "padding-top:" + barHeight + "px !important");
document
.getElementsByClassName("container")[0]
.setAttribute("style", "padding-top:" + conHeight + "px !important");
},
closeWebView() { closeWebView() {
try { try {
window.WebViewJavascriptBridge.callHandler( window.WebViewJavascriptBridge.callHandler(
...@@ -435,13 +447,13 @@ export default { ...@@ -435,13 +447,13 @@ export default {
this.closeWebView(); this.closeWebView();
} }
}, },
mounted() {
this.setPageNavState();
},
async mounted() { async mounted() {
this.setPageNavState();
this.setBarHeight();
this.globalNavLeftArrowClick(this.navLeftArrowClick); this.globalNavLeftArrowClick(this.navLeftArrowClick);
await this.loadPeriodData(); await this.loadPeriodData();
this.payUrl = await this.loadPayUrl(); this.payUrl = await this.loadPayUrl();
console.log("mounted barHeight=", barHeight);
} }
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment