Commit 4a8a1c3a by 展昭

update

parent f76b1f14
const setBarHeight = { const setBarHeight = {
mounted() { mounted() {
try { const barHeight = localStorage.get('barHeight');
const conHeight = 46 + barHeight;
window.WebViewJavascriptBridge.callHandler( document
"getBarHeight", .getElementsByClassName("iosStyle")[0]
null, .setAttribute("style", "padding-top:" + barHeight + "px !important");
function (response) {
console.log("getBarHeight来自 ios/android的回传数据: ", response); document
if (response) { .getElementsByClassName("container")[0]
response=JSON.parse(response); .setAttribute("style", "padding-top:" + conHeight + "px !important");
const barHeight = response.statusBarHeight;
const conHeight = 46 + barHeight;
document
.getElementsByClassName("iosStyle")[0]
.setAttribute(
"style",
"padding-top:" + barHeight + "px !important"
);
document
.getElementsByClassName("container")[0]
.setAttribute(
"style",
"padding-top:" + conHeight + "px !important"
);
}
}
);
} catch (err) {
console.log("getBarHeight is error");
}
} }
} }
......
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
}, },
async mounted() { async mounted() {
this.setPageNavState(); this.setPageNavState();
//this.getBarHeight(); this.getBarHeight();
this.globalNavLeftArrowClick(this.navLeftArrowClick); this.globalNavLeftArrowClick(this.navLeftArrowClick);
await this.loadPeriodData(); await this.loadPeriodData();
this.payUrl = await this.loadPayUrl(); this.payUrl = await this.loadPayUrl();
......
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