Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
b84a4daa
Commit
b84a4daa
authored
May 25, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配暂存
parent
a084fc12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
18 deletions
+31
-18
MainBase.ts
egret/libs/new_wx/MainBase.ts
+5
-5
MapScene.ts
egret/src/mapScene/MapScene.ts
+2
-0
WebView.ts
egret/src/webview/WebView.ts
+23
-12
getTaskInfo.json
mock/happyclear/getTaskInfo.json
+1
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
b84a4daa
...
...
@@ -605,13 +605,13 @@ export default class MainBase extends eui.UILayer {
console
.
log
(
"苏宁安卓开始准备"
);
if
(
!
window
[
'baseApi'
]){
await
new
Promise
((
resolve
,
reject
)
=>
{
//
let t1 = setTimeout(() => {
//
console.log("苏宁准备失败");
//
resolve();
//
}, 6000);
let
t1
=
setTimeout
(()
=>
{
console
.
log
(
"苏宁准备失败"
);
resolve
();
},
6000
);
document
.
addEventListener
(
"deviceready"
,
function
()
{
console
.
log
(
"苏宁baseapi准备完毕222"
);
//
clearTimeout(t1);
clearTimeout
(
t1
);
resolve
();
}.
bind
(
this
),
false
);
...
...
egret/src/mapScene/MapScene.ts
View file @
b84a4daa
...
...
@@ -775,6 +775,8 @@ export default class MapScene extends Scene {
NetManager
.
ins
.
clickLog1
(
getlogItem
(
32
));
snpmAdStatic
.
snpmAdReport
(
"click"
,
"icon"
,
result
);
if
(
result
.
url
!=
0
){
var
canvas
=
document
.
getElementsByTagName
(
"canvas"
)[
0
];
console
.
log
(
"测试大小适配"
,
canvas
.
width
,
canvas
.
height
);
var
webview
=
WebView
.
getInstance
();
webview
.
setSrc
(
result
.
url
);
webview
.
show
();
...
...
egret/src/webview/WebView.ts
View file @
b84a4daa
...
...
@@ -89,12 +89,24 @@ export default class WebView extends egret.DisplayObjectContainer {
var
islongScreen
=
whl
>
0.5
?
false
:
true
;
console
.
log
(
"webview长短屏幕适配"
,
whl
,
islongScreen
);
this
.
_iframe
.
width
=
this
.
_iframeWrapper
.
style
.
width
=
body
.
clientWidth
*
tscaleX
+
"px"
;
this
.
_iframe
.
height
=
this
.
_iframeWrapper
.
style
.
height
=
body
.
clientHeight
*
tscaleY
+
"px"
;
var
mwidth
=
1125
;
var
mscale
=
mwidth
/
(
body
.
clientWidth
*
tscaleX
);
var
mheight
=
body
.
clientHeight
*
tscaleY
*
mscale
;
// this._iframe.width = this._iframeWrapper.style.width = mwidth+"px";//body.clientWidth*tscaleX+"px";
// this._iframe.height = this._iframeWrapper.style.height = mheight+"px";//body.clientHeight*tscaleY+"px";
// this._iframe.width = this._iframeWrapper.style.width = this._windowW+"px";
// this._iframe.height = this._iframeWrapper.style.height = this._windowH+"px";
var
canvas
=
document
.
getElementsByTagName
(
"canvas"
)[
0
];
var
canvas_wid
=
canvas
.
width
;
var
canvas_hei
=
canvas
.
height
;
// if(canvas_wid<990){
// canvas_hei = canvas_hei*990/canvas_wid;
// canvas_wid = 990;
// }
this
.
_iframe
.
width
=
this
.
_iframeWrapper
.
style
.
width
=
canvas_wid
+
"px"
;
this
.
_iframe
.
height
=
this
.
_iframeWrapper
.
style
.
height
=
canvas_hei
+
"px"
;
console
.
log
(
"iframe大小"
,
this
.
_iframe
.
width
,
this
.
_iframe
.
height
);
this
.
closebtn
=
document
.
createElement
(
"img"
);
this
.
closebtn
.
src
=
"http://yun.duiba.com.cn/aurora/assets/571906f5a3b59d6e654e6522c916ed1707231551.png"
;
...
...
@@ -105,10 +117,6 @@ export default class WebView extends egret.DisplayObjectContainer {
this
.
closebtn
.
style
.
width
=
50
*
tscaleX
+
"px"
;
this
.
closebtn
.
style
.
height
=
50
*
tscaleY
+
"px"
;
this
.
closebtn
.
addEventListener
(
"click"
,
this
.
clickCloseBtn
.
bind
(
this
),
false
);
this
.
_iframe
.
onload
=
function
(){
console
.
log
(
"_iframe Onload"
,
this
);
}
}
clickCloseBtn
(){
...
...
@@ -122,13 +130,16 @@ export default class WebView extends egret.DisplayObjectContainer {
if
(
this
.
nshowurl
&&
this
.
nshowurl
==
src
){
}
else
{
this
.
_iframe
.
contentWindow
.
onload
=
function
(){
// console.log("iframe_title",this._iframe.contentWindow.document.title);
console
.
log
(
"iframe_onload_title"
,
this
);
}
this
.
_iframe
.
src
=
""
;
this
.
nshowurl
=
src
;
this
.
_iframe
.
src
=
src
;
// console.log("测试",this._iframe.contentWindow);
this
.
_iframe
.
onload
=
function
(){
console
.
log
(
"_iframe__Onload"
);
var
ibody
=
this
[
'getElementsByTagName'
](
"body"
);
console
.
log
(
ibody
);
}
}
}
else
if
(
headstr
==
"http:"
){
this
.
_iframe
.
src
=
""
;
...
...
mock/happyclear/getTaskInfo.json
View file @
b84a4daa
...
...
@@ -17,7 +17,7 @@
"done"
:
"0"
,
"appIncompleteText"
:
"去看看"
,
"appCompleteText"
:
"已完成"
,
"appIncompletelink"
:
"http
://cprexg.m.cnsuning.com/snWhale.html#/fight
"
,
"appIncompletelink"
:
"http
s://cuxiao.m.suning.com/scms/BECHEERY.html?adTypeCode=1137&adId=https%3A%2F%2Flib.suning.com%2Fweex%2FBECHEERY.js%3FpageCode%3DBECHEERY%26adtype%3D3
"
,
"appCompletelink"
:
"//m.suning.com"
,
"pcIncompleteText"
:
null
,
"pcCompleteText"
:
"已完成"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment