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
51bb863b
Commit
51bb863b
authored
May 20, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图优化,红包炸弹调整
parent
4962aa7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
index.html
egret/index.html
+1
-1
SAUP_sendLogData.ts
egret/src/SAUP_sendLogData.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+19
-9
No files found.
egret/index.html
View file @
51bb863b
...
...
@@ -228,7 +228,7 @@
<script>
window
[
'SAUP'
]
=
{
sendLogData
:
(
click
,
p
)
=>
{
console
.
log
(
'发送买点'
,
p
.
sapmodid
,
p
.
eleid
)
//
console.log('发送买点',p.sapmodid,p.eleid)
}
}
</script>
...
...
egret/src/SAUP_sendLogData.ts
View file @
51bb863b
...
...
@@ -9,7 +9,7 @@ export default ([sapmodid, eleid], saData = {}) => {
try
{
elem
.
setAttribute
(
'sa-data'
,
JSON
.
stringify
(
saData
));
if
(
window
[
'SAUP'
]
&&
window
[
'SAUP'
].
sendLogData
)
{
console
.
log
(
'发送埋点'
,
sapmodid
,
eleid
)
//
console.log('发送埋点',sapmodid,eleid)
window
[
'SAUP'
].
sendLogData
(
"click"
,
{
tag
:
elem
,
// 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid
:
sapmodid
,
// 必传;区块编码
...
...
egret/src/mapScene/MapScene.ts
View file @
51bb863b
...
...
@@ -1732,15 +1732,25 @@ export default class MapScene extends Scene {
var
i0level
=
i0
+
1
;
var
icon
=
this
.
getInShowIconByLevel
(
i0level
);
if
(
icon
&&
icon
.
parent
){
keys
.
push
(
icon
.
parent
);
const
p
=
(
icon
.
localToGlobal
(
0
,
0
));
const
pic
=
createRedBagIcon
(
this
);
pic
.
visible
=
false
;
pic
[
'__p2__'
]
=
p
;
pic
[
'__icon__'
]
=
icon
;
p
.
x
+=
50
;
p
.
y
+=
25
;
pics
.
push
(
pic
);
//另加判断当前是否有显示
var
scrollv
=
this
.
scroll
.
viewport
.
scrollV
;
var
stageheight
=
this
.
stage
.
stageHeight
;
var
showy0
=
scrollv
;
var
showy1
=
scrollv
+
stageheight
;
var
icony
=
icon
.
y
+
icon
.
parent
.
y
;
var
offsety
=
100
;
//在显示范围内
if
(
icony
+
offsety
>
showy0
&&
icony
-
offsety
<
showy1
){
keys
.
push
(
icon
.
parent
);
const
p
=
(
icon
.
localToGlobal
(
0
,
0
));
const
pic
=
createRedBagIcon
(
this
);
pic
.
visible
=
false
;
pic
[
'__p2__'
]
=
p
;
pic
[
'__icon__'
]
=
icon
;
p
.
x
+=
50
;
p
.
y
+=
25
;
pics
.
push
(
pic
);
}
}
}
// console.log(keys);
...
...
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