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
45b95f97
Commit
45b95f97
authored
May 12, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
2e2fdf22
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4048 additions
and
8 deletions
+4048
-8
index.html
egret/index.html
+7
-0
sa_simple.js
egret/libs/sa_simple.js
+4007
-0
ADSmallSkin.exml
egret/resource/skins/ADSmallSkin.exml
+1
-1
AdSmallComp.ts
egret/src/mapScene/AdSmallComp.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+2
-2
snpmAdStatic.ts
egret/src/statics/snpmAdStatic.ts
+30
-4
No files found.
egret/index.html
View file @
45b95f97
...
@@ -11,6 +11,13 @@
...
@@ -11,6 +11,13 @@
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<!-- <input type="hidden" id="resourceType" value="inapp">
<meta content="inapp" name="siteid">
<input type="hidden" id="pagename" value="pgcate=10004;tag=100060/null;pgtitle=赚钱消消乐">
<meta content="true" name="autoclick">
<meta content="aNVgWFAAaA" name="pageid">
<script src="libs/sa_simple.js"></script> -->
<style>
<style>
html
,
html
,
body
{
body
{
...
...
egret/libs/sa_simple.js
0 → 100644
View file @
45b95f97
This source diff could not be displayed because it is too large. You can
view the blob
instead.
egret/resource/skins/ADSmallSkin.exml
View file @
45b95f97
...
@@ -5,5 +5,5 @@
...
@@ -5,5 +5,5 @@
<e:Image
source=
"nsad1_png"
horizontalCenter=
"0"
y=
"35"
/>
<e:Image
source=
"nsad1_png"
horizontalCenter=
"0"
y=
"35"
/>
<e:Image
id=
"img"
y=
"44"
width=
"560"
height=
"160"
source=
"{data.img}"
anchorOffsetY=
"0"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"img"
y=
"44"
width=
"560"
height=
"160"
source=
"{data.img}"
anchorOffsetY=
"0"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"adsmask"
source=
"adsmask_png"
horizontalCenter=
"0.5"
y=
"45"
width=
"560"
height=
"160"
/>
<e:Image
id=
"adsmask"
source=
"adsmask_png"
horizontalCenter=
"0.5"
y=
"45"
width=
"560"
height=
"160"
/>
<e:Image
source=
"nsad2_png"
horizontalCenter=
"-7.5"
/>
<e:Image
source=
"nsad2_png"
horizontalCenter=
"-7.5"
touchEnabled=
"false"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/AdSmallComp.ts
View file @
45b95f97
...
@@ -40,7 +40,7 @@ export default class AdSmallComp extends ComponentBase {
...
@@ -40,7 +40,7 @@ export default class AdSmallComp extends ComponentBase {
snpmAdStatic
.
snpmAdReport
(
"click"
,
"bottom"
,
result
);
snpmAdStatic
.
snpmAdReport
(
"click"
,
"bottom"
,
result
);
wait
(
50
).
then
(()
=>
{
wait
(
50
).
then
(()
=>
{
if
(
result
.
url
!=
0
)
window
.
location
.
href
=
result
.
url
;
//
if (result.url != 0) window.location.href = result.url;
});
});
},
this
);
},
this
);
}
}
...
...
egret/src/mapScene/MapScene.ts
View file @
45b95f97
...
@@ -736,10 +736,10 @@ export default class MapScene extends Scene {
...
@@ -736,10 +736,10 @@ export default class MapScene extends Scene {
snpmAdStatic
.
snpmAdReport
(
"show"
,
"icon"
,
result
);
snpmAdStatic
.
snpmAdReport
(
"show"
,
"icon"
,
result
);
this
[
'adBtn'
].
source
=
result
.
img
;
this
[
'adBtn'
].
source
=
result
.
img
;
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
32
));
//
NetManager.ins.clickLog(getlogItem(32));
snpmAdStatic
.
snpmAdReport
(
"click"
,
"icon"
,
result
);
snpmAdStatic
.
snpmAdReport
(
"click"
,
"icon"
,
result
);
if
(
result
.
url
!=
0
){
if
(
result
.
url
!=
0
){
window
.
location
.
href
=
result
.
url
;
//
window.location.href = result.url;
}
}
},
this
);
},
this
);
}
}
...
...
egret/src/statics/snpmAdStatic.ts
View file @
45b95f97
...
@@ -49,7 +49,7 @@ export class snpmAdStatic{
...
@@ -49,7 +49,7 @@ export class snpmAdStatic{
if
(
type
==
"show"
){
if
(
type
==
"show"
){
this
.
showAdReport
(
params
);
this
.
showAdReport
(
params
);
}
else
if
(
type
==
"click"
){
}
else
if
(
type
==
"click"
){
this
.
show
AdReport
(
params
);
this
.
click
AdReport
(
params
);
}
}
}
}
}
}
...
@@ -59,6 +59,7 @@ export class snpmAdStatic{
...
@@ -59,6 +59,7 @@ export class snpmAdStatic{
*/
*/
static
showAdReport
(
params
){
static
showAdReport
(
params
){
try
{
try
{
console
.
log
(
"曝光上报"
,
JSON
.
stringify
(
params
));
let
elem
=
document
.
createElement
(
'div'
)
let
elem
=
document
.
createElement
(
'div'
)
params
.
saData
.
eleid
=
params
.
eleid
;
params
.
saData
.
eleid
=
params
.
eleid
;
elem
.
setAttribute
(
'sa-data'
,
JSON
.
stringify
(
params
.
saData
))
elem
.
setAttribute
(
'sa-data'
,
JSON
.
stringify
(
params
.
saData
))
...
@@ -71,7 +72,16 @@ export class snpmAdStatic{
...
@@ -71,7 +72,16 @@ export class snpmAdStatic{
if
(
window
[
'SAUP'
]
&&
window
[
'SAUP'
].
sendLogData
)
{
if
(
window
[
'SAUP'
]
&&
window
[
'SAUP'
].
sendLogData
)
{
//expoManual
//expoManual
//exposure
//exposure
window
[
'SAUP'
].
sendLogData
(
"exposure"
,
elem
);
window
[
'SAUP'
].
sendLogData
(
"expoManual"
,
elem
);
// window['SAUP'].sendLogData("expoManual", {
// tag:elem,
// sapmodid:params.sapmodid,
// event_name:'exposure',
// targeturl:params.targeturl,
// pageid:params.saData.pageid,
// modid:params.saData.modid,
// eleid:params.saData.eleid,
// });
}
}
}
catch
(
e
){
}
catch
(
e
){
...
@@ -83,6 +93,18 @@ export class snpmAdStatic{
...
@@ -83,6 +93,18 @@ export class snpmAdStatic{
*/
*/
static
clickAdReport
(
params
){
static
clickAdReport
(
params
){
try
{
try
{
console
.
log
(
'点击上报'
,
JSON
.
stringify
(
params
));
if
(
params
.
targeturl
&&
params
.
targeturl
.
length
){
window
[
'$'
].
ajax
({
type
:
'get'
,
url
:
params
.
targeturl
,
dataType
:
'json'
,
success
:
res
=>
{
},
error
:
err
=>
{
}
})
}
let
elem
=
document
.
createElement
(
'div'
);
let
elem
=
document
.
createElement
(
'div'
);
elem
.
setAttribute
(
'sa-data'
,
JSON
.
stringify
(
params
.
saData
));
elem
.
setAttribute
(
'sa-data'
,
JSON
.
stringify
(
params
.
saData
));
//广告埋点
//广告埋点
...
@@ -97,10 +119,14 @@ export class snpmAdStatic{
...
@@ -97,10 +119,14 @@ export class snpmAdStatic{
console
.
log
(
"广告点击上报"
,
params
.
saData
.
pageid
);
console
.
log
(
"广告点击上报"
,
params
.
saData
.
pageid
);
//click
//click
//comclick
//comclick
window
[
'SAUP'
].
sendLogData
(
'c
omc
lick'
,{
window
[
'SAUP'
].
sendLogData
(
'click'
,{
tag
:
elem
,
tag
:
elem
,
sapmodid
:
params
.
sapmodid
,
sapmodid
:
params
.
sapmodid
,
eleid
:
params
.
eleid
targeturl
:
params
.
targeturl
,
event_name
:
'comclick'
,
pageid
:
params
.
saData
.
pageid
,
modid
:
params
.
saData
.
modid
,
eleid
:
params
.
saData
.
eleid
,
})
})
}
}
elem
.
setAttribute
(
'sa-data'
,
'{}'
);
elem
.
setAttribute
(
'sa-data'
,
'{}'
);
...
...
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