Commit bc38bffc by kaisa

feat:修改游戏房webview宽高

parent af499786
Showing with 28 additions and 0 deletions
......@@ -1174,6 +1174,28 @@
return params;
}
function setWebViewRatio() {
try {
var obj = {
cid: 43,
reqCode: new Date().getTime(),
data: {
msg: "修改webview宽高",
type: 2,
width: 100,
height: 105,
position: 1,
unit: 1
},
};
var obj2 = JSON.stringify(obj);
appCollaboration(obj2);
} catch (e) {
//TODO handle the exception
}
}
function appCollaboration(msg) {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
......@@ -1224,6 +1246,11 @@
layer.msg("請稍後重試");
}
}
// 页面加载完后修改webview宽高比
window.onload = function () {
setWebViewRatio();
};
</script>
</html>
\ No newline at end of file
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