Commit 51bb863b authored by zjz1994's avatar zjz1994

地图优化,红包炸弹调整

parent 4962aa7d
......@@ -228,7 +228,7 @@
<script>
window['SAUP'] = {
sendLogData: (click,p) => {
console.log('发送买点',p.sapmodid,p.eleid)
// console.log('发送买点',p.sapmodid,p.eleid)
}
}
</script>
......
......@@ -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,    // 必传;区块编码
......
......@@ -1732,6 +1732,15 @@ export default class MapScene extends Scene {
var i0level = i0+1;
var icon = this.getInShowIconByLevel(i0level);
if(icon&&icon.parent){
//另加判断当前是否有显示
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);
......@@ -1743,6 +1752,7 @@ export default class MapScene extends Scene {
pics.push(pic);
}
}
}
// console.log(keys);
pics.forEach((pic, index) => {
wait(50 * index).then(() => {
......
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