Commit 17582857 by 展昭

Merge branch 'master' into dev

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