Commit b91af5c5 by 展昭

update

parent 61d4dfe0
Showing with 29 additions and 22 deletions
......@@ -419,30 +419,37 @@ export default {
}
},
setBarHeight() {
window.WebViewJavascriptBridge.callHandler("getBarHeight", null, function(
response
) {
console.log("billindex getBarHeight来自 ios/android的回传数据: ", response);
if (response) {
response = JSON.parse(response);
const barHeight = response.statusBarHeight;
localStorage.setItem("barHeight", barHeight);
const conHeight = 46 + barHeight;
console.log("billindex barHeight=", barHeight);
document
.getElementsByClassName("iosStyle")[0]
.setAttribute(
"style",
"padding-top:" + barHeight + "px !important"
initJsBridge(() => {
window.WebViewJavascriptBridge.callHandler(
"getBarHeight",
null,
function(response) {
console.log(
"billindex getBarHeight来自 ios/android的回传数据: ",
response
);
if (response) {
response = JSON.parse(response);
const barHeight = response.statusBarHeight;
localStorage.setItem("barHeight", barHeight);
const conHeight = 46 + barHeight;
console.log("billindex barHeight=", 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"
);
}
}
);
});
},
closeWebView() {
......
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