Commit 544c681a authored by zjz1994's avatar zjz1994

webview适配暂存

parent 4b9598e3
......@@ -50,9 +50,10 @@ export default class WebView extends egret.DisplayObjectContainer {
var matrixdata1 = matrixdata[1].split(")")[0];
var matrixdata2 = matrixdata1.split(",");
console.log("缩放详细",matrixdata2);
var scaleX = Number(matrixdata2[0]);
var scaleY = Number(matrixdata2[3]);
var mscaleX = Number(matrixdata2[0]);
var mscaleY = Number(matrixdata2[3]);
var tscaleX = Number((1/mscaleX).toFixed(2));
var tscaleY = Number((1/mscaleY).toFixed(2));
var body = document.body;
// stageDelegateDom.style.width="100%";
// stageDelegateDom.style.height="100%";
......@@ -89,8 +90,8 @@ export default class WebView extends egret.DisplayObjectContainer {
console.log("webview长短屏幕适配",whl,islongScreen);
this._iframe.width = this._iframeWrapper.style.width = body.clientWidth*3+"px";
this._iframe.height = this._iframeWrapper.style.height = body.clientHeight*3+"px";
this._iframe.width = this._iframeWrapper.style.width = body.clientWidth*tscaleX+"px";
this._iframe.height = this._iframeWrapper.style.height = body.clientHeight*tscaleY+"px";
// this._iframe.width = this._iframeWrapper.style.width = this._windowW+"px";
// this._iframe.height = this._iframeWrapper.style.height = this._windowH+"px";
......@@ -98,11 +99,11 @@ export default class WebView extends egret.DisplayObjectContainer {
this.closebtn.src = "http://yun.duiba.com.cn/aurora/assets/571906f5a3b59d6e654e6522c916ed1707231551.png";
this.closebtn.style.position = "absolute";
this.closebtn.style.top = "100px";
this.closebtn.style.right = "100px";
this.closebtn.style.top = 30*tscaleX+"px";
this.closebtn.style.right = 30*tscaleY+"px";
this._iframeWrapper.append(this.closebtn);
this.closebtn.style.width = "150px";
this.closebtn.style.height = "150px";
this.closebtn.style.width = 50*tscaleX+"px";
this.closebtn.style.height = 50*tscaleY+"px";
this.closebtn.addEventListener("click",this.clickCloseBtn.bind(this),false);
}
......
......@@ -35,11 +35,11 @@
"advertList":[
{
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"https://cuxiao.m.suning.com/scms/BECHEERY.html?adTypeCode=1137&adId=https%3A%2F%2Flib.suning.com%2Fweex%2FBECHEERY.js%3FpageCode%3DBECHEERY%26adtype%3D3"
"url":"https://cuxiao.suning.com/city/nubia.html?adtype=3"
},
{
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"https://cuxiao.m.suning.com/scms/BECHEERY.html?adTypeCode=1137&adId=https%3A%2F%2Flib.suning.com%2Fweex%2FBECHEERY.js%3FpageCode%3DBECHEERY%26adtype%3D3"
"url":"https://cuxiao.suning.com/city/nubia.html?adtype=3"
}
]
}
......
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 to comment