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
b395da78
Commit
b395da78
authored
Apr 27, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
212eb24e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
AdSmallComp.ts
egret/src/mapScene/AdSmallComp.ts
+5
-5
MapScene.ts
egret/src/mapScene/MapScene.ts
+2
-1
No files found.
egret/src/mapScene/AdSmallComp.ts
View file @
b395da78
...
...
@@ -7,13 +7,13 @@ import wait from "../../libs/new_tc/wait";
export
default
class
AdSmallComp
extends
ComponentBase
{
start
(
data
?)
{
this
.
visible
=
false
;
this
.
visible
=
false
;
let
result
;
// this.touchEnabled = this.touchChildren = false;
super
.
start
(
data
);
NetManager
.
ins
.
hc_advert
(()
=>
{
const
{
data
}
=
DataManager
.
ins
.
getData
(
'hc_advert'
);
let
{
popupAdvert
}
=
data
;
let
{
popupAdvert
}
=
data
;
if
(
popupAdvert
==
null
)
popupAdvert
=
{
enable
:
false
,
advertList
:
[]
}
this
.
visible
=
popupAdvert
.
enable
;
...
...
@@ -28,10 +28,10 @@ export default class AdSmallComp extends ComponentBase {
});
this
[
'img'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
data
.
logid
)
if
(
data
.
logid
)
NetManager
.
ins
.
clickLog
(
getlogItem
(
data
.
logid
));
wait
(
50
).
then
(()
=>
{
window
.
location
.
href
=
result
.
url
;
wait
(
50
).
then
(()
=>
{
if
(
result
.
url
!=
0
)
window
.
location
.
href
=
result
.
url
;
});
},
this
);
}
...
...
egret/src/mapScene/MapScene.ts
View file @
b395da78
...
...
@@ -519,7 +519,8 @@ export default class MapScene extends Scene {
this
[
'adBtn'
].
source
=
result
.
img
;
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
32
));
window
.
location
.
href
=
result
.
url
;
if
(
result
.
url
!=
0
)
window
.
location
.
href
=
result
.
url
;
},
this
);
}
}
...
...
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