Commit eb15652f by 展昭

tj

parent 1c26d8e6
Showing with 2 additions and 17 deletions
...@@ -46,6 +46,7 @@ Vue.prototype.setPageNavState = function () { ...@@ -46,6 +46,7 @@ Vue.prototype.setPageNavState = function () {
console.log("setPageNavState来自 ios/android的回传数据: ", response); console.log("setPageNavState来自 ios/android的回传数据: ", response);
} }
); );
window.WebViewJavascriptBridge.callHandler( window.WebViewJavascriptBridge.callHandler(
"getBarHeight", "getBarHeight",
null, null,
...@@ -58,23 +59,7 @@ Vue.prototype.setPageNavState = function () { ...@@ -58,23 +59,7 @@ Vue.prototype.setPageNavState = function () {
response = JSON.parse(response); response = JSON.parse(response);
const barHeight = response.statusBarHeight; const barHeight = response.statusBarHeight;
localStorage.setItem("barHeight", barHeight); localStorage.setItem("barHeight", barHeight);
const conHeight = 46 + barHeight; console.log('main barHeight=', barHeight);
console.log("main barHeight=", barHeight);
const dom = document.getElementsByClassName("iosStyle")[0];
if (dom) {
dom.setAttribute(
"style",
"padding-top:" + barHeight + "px !important"
);
}
const dom2 = document.getElementsByClassName("container")[0];
if (dom) {
dom2.setAttribute(
"style",
"padding-top:" + conHeight + "px !important"
);
}
} }
} }
); );
......
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