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
b4cc2486
Commit
b4cc2486
authored
May 11, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
22d888aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
6 deletions
+37
-6
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-1
snpmAdStatic.ts
egret/src/statics/snpmAdStatic.ts
+36
-5
No files found.
egret/src/mapScene/MapScene.ts
View file @
b4cc2486
...
@@ -739,7 +739,7 @@ export default class MapScene extends Scene {
...
@@ -739,7 +739,7 @@ export default class MapScene extends Scene {
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 @
b4cc2486
...
@@ -5,24 +5,54 @@ export class snpmAdStatic{
...
@@ -5,24 +5,54 @@ export class snpmAdStatic{
* @param from 来源1.icon首页小图标,2.dialog大弹窗广告,3.bottom部分弹窗下挂载的
* @param from 来源1.icon首页小图标,2.dialog大弹窗广告,3.bottom部分弹窗下挂载的
*/
*/
static
snpmAdReport
(
type
:
string
,
from
:
string
,
adata
:
object
){
static
snpmAdReport
(
type
:
string
,
from
:
string
,
adata
:
object
){
var
params
:
object
;
var
params
=
{};
console
.
log
(
"准备上报"
,
type
,
from
,
JSON
.
stringify
(
adata
));
switch
(
from
){
switch
(
from
){
case
'icon'
:
case
'icon'
:
params
[
'eleid'
]
=
'111'
;
params
[
'saData'
]
=
{
pageid
:
"map"
,
modid
:
"111"
,
eleid
:
"111"
,
targeturl
:
adata
[
'apsClickUrl'
]
||
adata
[
'url'
]
}
params
[
'sapmodid'
]
=
'111'
;
params
[
'targeturl'
]
=
adata
[
'apsClickUrl'
]
||
adata
[
'url'
]
break
;
break
;
case
'dialog'
:
case
'dialog'
:
params
[
'eleid'
]
=
'222'
;
params
[
'saData'
]
=
{
pageid
:
"dialog"
,
modid
:
"222"
,
eleid
:
"222"
,
targeturl
:
adata
[
'apsClickUrl'
]
||
adata
[
'url'
]
}
params
[
'sapmodid'
]
=
'222'
;
params
[
'targeturl'
]
=
adata
[
'apsClickUrl'
]
||
adata
[
'url'
]
break
;
break
;
case
'bottom'
:
case
'bottom'
:
params
[
'eleid'
]
=
'333'
;
params
[
'saData'
]
=
{
pageid
:
"bottom"
,
modid
:
"333"
,
eleid
:
"333"
,
targeturl
:
adata
[
'apsClickUrl'
]
||
adata
[
'url'
]
}
params
[
'sapmodid'
]
=
'333'
;
params
[
'targeturl'
]
=
adata
[
'apsClickUrl'
]
||
adata
[
'url'
]
break
;
break
;
default
:
default
:
console
.
error
(
"未定义snpm上报"
);
console
.
error
(
"未定义snpm上报"
);
break
;
break
;
}
}
if
(
params
){
if
(
type
==
"show"
){
if
(
type
==
"show"
){
this
.
showAdReport
(
params
);
this
.
showAdReport
(
params
);
}
else
if
(
type
==
"click"
){
}
else
if
(
type
==
"click"
){
this
.
showAdReport
(
params
);
this
.
showAdReport
(
params
);
}
}
}
}
}
/**
/**
* 苏宁曝光上报,snpm
* 苏宁曝光上报,snpm
* @param params
* @param params
...
@@ -64,6 +94,7 @@ export class snpmAdStatic{
...
@@ -64,6 +94,7 @@ export class snpmAdStatic{
img
.
src
=
params
.
targeturl
;
img
.
src
=
params
.
targeturl
;
}
}
if
(
window
[
'SAUP'
]
&&
window
[
'SAUP'
].
sendLogData
)
{
if
(
window
[
'SAUP'
]
&&
window
[
'SAUP'
].
sendLogData
)
{
console
.
log
(
"广告点击上报"
,
params
.
saData
.
pageid
);
//click
//click
//comclick
//comclick
window
[
'SAUP'
].
sendLogData
(
'comclick'
,{
window
[
'SAUP'
].
sendLogData
(
'comclick'
,{
...
...
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