Commit 3f4f9c36 by 展昭

update

parent e22e5bd2
Showing with 21 additions and 23 deletions
......@@ -418,30 +418,28 @@ export default {
},
getBarHeight() {
try {
initJsBridge(() => {
window.WebViewJavascriptBridge.callHandler(
"getBarHeight",
{},
function(response) {
console.log("来自 ios/android的回传数据: ", response);
const barHeight = response;
const conHeight = 46 + response;
document
.getElementsByClassName("iosStyle")[0]
.setAttribute(
"style",
"padding-top:" + barHeight + "px !important"
);
window.WebViewJavascriptBridge.callHandler(
"getBarHeight",
null,
function(response) {
console.log("来自 ios/android的回传数据: ", response);
const barHeight = response;
const conHeight = 46 + response;
document
.getElementsByClassName("iosStyle")[0]
.setAttribute(
"style",
"padding-top:" + barHeight + "px !important"
);
document
.getElementsByClassName("container")[0]
.setAttribute(
"style",
"padding-top:" + conHeight + "px !important"
);
}
);
});
document
.getElementsByClassName("container")[0]
.setAttribute(
"style",
"padding-top:" + conHeight + "px !important"
);
}
);
} catch (err) {
console.log("getBarHeight is error");
}
......
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