Commit 51bb863b authored by zjz1994's avatar zjz1994

地图优化,红包炸弹调整

parent 4962aa7d
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
<script> <script>
window['SAUP'] = { window['SAUP'] = {
sendLogData: (click,p) => { sendLogData: (click,p) => {
console.log('发送买点',p.sapmodid,p.eleid) // console.log('发送买点',p.sapmodid,p.eleid)
} }
} }
</script> </script>
......
...@@ -9,7 +9,7 @@ export default ([sapmodid, eleid], saData = {}) => { ...@@ -9,7 +9,7 @@ export default ([sapmodid, eleid], saData = {}) => {
try { try {
elem.setAttribute('sa-data', JSON.stringify(saData)); elem.setAttribute('sa-data', JSON.stringify(saData));
if (window['SAUP'] && window['SAUP'].sendLogData) { if (window['SAUP'] && window['SAUP'].sendLogData) {
console.log('发送埋点',sapmodid,eleid) // console.log('发送埋点',sapmodid,eleid)
window['SAUP'].sendLogData("click", { window['SAUP'].sendLogData("click", {
tag: elem,   // 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data tag: elem,   // 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid: sapmodid,    // 必传;区块编码 sapmodid: sapmodid,    // 必传;区块编码
......
...@@ -1732,15 +1732,25 @@ export default class MapScene extends Scene { ...@@ -1732,15 +1732,25 @@ export default class MapScene extends Scene {
var i0level = i0+1; var i0level = i0+1;
var icon = this.getInShowIconByLevel(i0level); var icon = this.getInShowIconByLevel(i0level);
if(icon&&icon.parent){ if(icon&&icon.parent){
keys.push(icon.parent); //另加判断当前是否有显示
const p = (icon.localToGlobal(0, 0)); var scrollv = this.scroll.viewport.scrollV;
const pic = createRedBagIcon(this); var stageheight = this.stage.stageHeight;
pic.visible = false; var showy0 = scrollv;
pic['__p2__'] = p; var showy1 = scrollv+stageheight;
pic['__icon__'] = icon; var icony = icon.y+icon.parent.y;
p.x += 50; var offsety = 100;
p.y += 25; //在显示范围内
pics.push(pic); 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); // console.log(keys);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment