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
8fb9fb12
Commit
8fb9fb12
authored
Feb 21, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0ccf3ac4
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
191 additions
and
130 deletions
+191
-130
index.html
egret/index.html
+56
-54
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+65
-56
Main.ts
egret/src/Main.ts
+3
-1
SA.ts
egret/src/SA.ts
+0
-12
SAMap.ts
egret/src/SAMap.ts
+23
-0
SAUP_sendLogData.ts
egret/src/SAUP_sendLogData.ts
+24
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+3
-2
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+1
-0
TurntableIcon.ts
egret/src/mapScene/icon/TurntableIcon.ts
+2
-1
hbRainBaseInfo.json
mock/happyclear/hbRainBaseInfo.json
+14
-4
No files found.
egret/index.html
View file @
8fb9fb12
...
...
@@ -40,61 +40,61 @@
</head>
<body>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"true"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"true"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script
src=
"libs/modules/egret/egret.js"
></script>
<script
src=
"libs/modules/egret/egret.web.js"
></script>
<script
src=
"libs/modules/eui/eui.js"
></script>
<script
src=
"libs/modules/assetsmanager/assetsmanager.js"
></script>
<script
src=
"libs/modules/tween/tween.js"
></script>
<script
src=
"libs/zepto.min.js"
></script>
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script
src=
"libs/svga.egret.min2.js"
></script>
<script
src=
"libs/aes.js"
></script>
<script
src=
"libs/pad-zeropadding.js"
></script>
<!-- 复制口令苏宁提供的js,线上需要添加 -->
<script
src=
"https://yun.dui88.com/DS-tech/dtt_tech/suning/snShare.min.js"
></script>
<!-- //线上不需要 -->
<script
src=
"libs/fileSave.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
window
.
fresp
=
0.00001
;
// localStorage.clear();
window
[
'testUrl'
]
=
'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521'
;
window
[
'hbRainTime'
]
=
30
;
// 红包雨倒计时
window
[
'plugs'
]
=
[
1
,
2
,
3
];
// localStorage.clear();
window
[
'isInvitePage'
]
=
0
;
var
targetUrl
=
'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404'
;
<script
src=
"libs/modules/egret/egret.js"
></script>
<script
src=
"libs/modules/egret/egret.web.js"
></script>
<script
src=
"libs/modules/eui/eui.js"
></script>
<script
src=
"libs/modules/assetsmanager/assetsmanager.js"
></script>
<script
src=
"libs/modules/tween/tween.js"
></script>
<script
src=
"libs/zepto.min.js"
></script>
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script
src=
"libs/svga.egret.min2.js"
></script>
<script
src=
"libs/aes.js"
></script>
<script
src=
"libs/pad-zeropadding.js"
></script>
<!-- 复制口令苏宁提供的js,线上需要添加 -->
<script
src=
"https://yun.dui88.com/DS-tech/dtt_tech/suning/snShare.min.js"
></script>
<!-- //线上不需要 -->
<script
src=
"libs/fileSave.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
window
.
fresp
=
0.00001
;
// localStorage.clear();
window
[
'testUrl'
]
=
'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521'
;
window
[
'hbRainTime'
]
=
30
;
// 红包雨倒计时
window
[
'plugs'
]
=
[
1
,
2
,
3
];
// localStorage.clear();
window
[
'isInvitePage'
]
=
0
;
var
targetUrl
=
'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404'
;
/*
* 邀请有礼分享
*/
function
inviteShare
(
shareCode
)
{
let
title
=
"求求你可以帮我点一下吗?还差一点点就可以领红包了~"
;
let
content
=
"我在狮狮连萌等你,一起天天领福利哦"
;
let
targetUrl
=
"https://gameact.suning.com/duiba/customShare/share?id=3531"
+
"&shareCode="
+
shareCode
;
// 待修改
let
iconUrl
=
"http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg"
;
let
shareWays
=
"1,2"
;
console
.
log
(
"AppReady"
);
if
(
isIphone
())
{
console
.
log
(
"IOS"
);
console
.
log
(
window
.
SNNativeClient
);
window
.
callNativeShareResult
=
function
()
{
};
window
.
SNNativeClient
.
callNativeShare
(
title
,
content
,
targetUrl
,
iconUrl
,
shareWays
);
}
else
{
console
.
log
(
"安卓"
);
console
.
log
(
shareApi
);
console
.
log
(
shareApi
.
callMediaShare
);
shareApi
.
callNativeShare
(
title
,
content
,
targetUrl
,
iconUrl
,
shareWays
);
/*
* 邀请有礼分享
*/
function
inviteShare
(
shareCode
)
{
let
title
=
"求求你可以帮我点一下吗?还差一点点就可以领红包了~"
;
let
content
=
"我在狮狮连萌等你,一起天天领福利哦"
;
let
targetUrl
=
"https://gameact.suning.com/duiba/customShare/share?id=3531"
+
"&shareCode="
+
shareCode
;
// 待修改
let
iconUrl
=
"http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg"
;
let
shareWays
=
"1,2"
;
console
.
log
(
"AppReady"
);
if
(
isIphone
())
{
console
.
log
(
"IOS"
);
console
.
log
(
window
.
SNNativeClient
);
window
.
callNativeShareResult
=
function
()
{
};
window
.
SNNativeClient
.
callNativeShare
(
title
,
content
,
targetUrl
,
iconUrl
,
shareWays
);
}
else
{
console
.
log
(
"安卓"
);
console
.
log
(
shareApi
);
console
.
log
(
shareApi
.
callMediaShare
);
shareApi
.
callNativeShare
(
title
,
content
,
targetUrl
,
iconUrl
,
shareWays
);
}
}
}
function
isIphone
()
{
var
ua
=
navigator
.
userAgent
.
toLocaleLowerCase
();
if
(
ua
.
match
(
/iphone|ipad/
))
{
...
...
@@ -209,8 +209,10 @@
<script
src=
"output.js"
></script>
<script>
const
SAUP
=
()
=>
{
window
[
'SAUP'
]
=
{
sendLogData
:
(
click
,
p
)
=>
{
console
.
log
(
'发送买点'
,
p
.
sapmodid
,
p
.
eleid
)
}
}
</script>
</body>
...
...
egret/libs/tw/manager/NetManager.ts
View file @
8fb9fb12
This diff is collapsed.
Click to expand it.
egret/src/Main.ts
View file @
8fb9fb12
...
...
@@ -7,7 +7,9 @@ class Main extends MainBase {
export
const
getlogItem
=
(
i
)
=>
{
const
Dpm
=
Buried
.
connectDpm
(
110
,
i
,
1
);
// 点击埋点
const
Dcm
=
Buried
.
connectDcm
(
202
,
0
,
0
);
// 曝光埋点
return
Buried
.
createExposure
(
Dpm
,
Dcm
);
const
obj
=
Buried
.
createExposure
(
Dpm
,
Dcm
);
obj
[
'__area__'
]
=
i
;
return
obj
;
}
window
[
'Main'
]
=
Main
;
...
...
egret/src/SA.ts
deleted
100644 → 0
View file @
0ccf3ac4
export
default
()
=>
{
try
{
window
[
'SAUP'
].
sendLogData
(
"click"
,
{
tag
:
''
,
// 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid
:
"请写入产品提供的 modid"
,
// 必传;区块编码
eleid
:
"请写入产品提供的 eleid"
// 必传;坑位编码
});
//这里的this必须传dom节点
}
catch
(
e
)
{
}
}
egret/src/SAMap.ts
0 → 100644
View file @
8fb9fb12
export
default
{
'1'
:
[
'bingoMapIndex'
,
'bingoBox'
],
'2'
:
[
'bingoMapIndex'
,
'bingoLife'
],
'5'
:
[
'bingoMapIndex'
,
'bingoProp'
],
'19'
:
[
'bingoMapIndex'
,
'bingoLevel'
],
'32'
:
[
'bingoMapIndex'
,
'bingoIndexAd'
],
'33'
:
[
'bingoMapIndex'
,
'bingoInvite'
],
'67'
:
[
'bingoMapIndex'
,
'bingoCoin'
],
'62'
:
[
'bingoMapIndex'
,
'bingoGetCoin'
],
'77'
:
[
'bingoMapIndex'
,
'bingoRedBattle'
],
'57'
:
[
'bingoMapIndex'
,
'bingoRedPacket'
],
'74'
:
[
'bingoMapIndex'
,
'bingoRedBoom'
],
'888001'
:
[
'bingoMapIndex'
,
'bingoLottery'
],
'888006'
:
[
'bingoMapIndex'
,
'bingoGetRed'
],
'30'
:
[
'bingoDialog'
,
'bingoLifeBuy'
],
'4'
:
[
'bingoDialog'
,
'bingoLifeAsk'
],
'6'
:
[
'bingoDialog'
,
'bingoBoomBuy'
],
'8'
:
[
'bingoDialog'
,
'bingoBoomCfm'
],
'9'
:
[
'bingoDialog'
,
'bingoHammerBuy'
],
'12'
:
[
'bingoDialog'
,
'bingoStepBuy'
],
'14'
:
[
'bingoDialog'
,
'bingoStepCfm'
],
}
\ No newline at end of file
egret/src/SAUP_sendLogData.ts
0 → 100644
View file @
8fb9fb12
import
{
elementMonsterResMap
}
from
"./something/enum/ElementType"
;
const
elem
=
document
.
createElement
(
'div'
);
/**
* @param sapmodid 区块编码
* @param eleid 坑位编码
*/
export
default
([
sapmodid
,
eleid
],
saData
=
{})
=>
{
try
{
elem
.
setAttribute
(
'sa-data'
,
JSON
.
stringify
(
saData
));
if
(
window
[
'SAUP'
]
&&
window
[
'SAUP'
].
sendLogData
)
{
window
[
'SAUP'
].
sendLogData
(
"click"
,
{
tag
:
elem
,
// 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid
:
sapmodid
,
// 必传;区块编码
eleid
:
eleid
// 必传;坑位编码
});
}
else
{
console
.
warn
(
'苏宁买点api错误'
)
}
elem
.
setAttribute
(
'sa-data'
,
'{}'
);
}
catch
(
e
)
{
}
}
egret/src/mapScene/MapScene.ts
View file @
8fb9fb12
...
...
@@ -296,7 +296,7 @@ export default class MapScene extends Scene {
console
.
log
(
'必须通关前面的关卡才能开启本关'
);
}
else
PanelCtrl
.
instance
.
show
(
'StartPanel'
,
key
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
19
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
19
))
;
},
this
);
}
}
...
...
@@ -988,6 +988,7 @@ export default class MapScene extends Scene {
this
[
'musicBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_music
,
this
);
this
[
'recordBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
PanelCtrl
.
instance
.
show
(
'bag'
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
5
));
},
this
);
// 消消乐查询信息
...
...
@@ -1115,7 +1116,7 @@ export default class MapScene extends Scene {
onTap_shopBtn
()
{
PanelCtrl
.
instance
.
show
(
'Shop'
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
5
));
//
NetManager.ins.clickLog(getlogItem(5));
}
toggleSettings
()
{
...
...
egret/src/mapScene/icon/ScratchIcon.ts
View file @
8fb9fb12
...
...
@@ -71,6 +71,7 @@ export default class ScratchIcon extends IconBase {
*/
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
888006
));
NetManager
.
ins
.
showLog
(
getlogItem
(
49
));
NetManager
.
ins
.
scratchGetTaskInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
...
...
egret/src/mapScene/icon/TurntableIcon.ts
View file @
8fb9fb12
...
...
@@ -58,7 +58,8 @@ export default class TurntableIcon extends IconBase {
super
.
onTouchBtn
(
e
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turntable.svga'
).
then
(
async
(
mv
:
any
)
=>
{
// await wait(100);
PanelCtrl
.
instance
.
show
(
'turnTable'
,
{
mv
:
mv
})
PanelCtrl
.
instance
.
show
(
'turnTable'
,
{
mv
:
mv
});
NetManager
.
ins
.
clickLog
(
getlogItem
(
888001
));
})
}
...
...
mock/happyclear/hbRainBaseInfo.json
View file @
8fb9fb12
...
...
@@ -5,8 +5,18 @@
"timestamp"
:
1573210800000
,
"data"
:
{
"currentRemainTimes"
:
0
,
"currentSession"
:
null
,
"nextSession"
:
null
,
"canJoin"
:
false
"currentSession"
:
{
"sessionIndex"
:
6
,
"startTime"
:
1573210800000
,
"endTime"
:
1573299903000
,
"limitScore"
:
10
},
"nextSession"
:
{
"sessionIndex"
:
10
,
"startTime"
:
1573440915952
,
"endTime"
:
1573299903000
,
"limitScore"
:
10
},
"canJoin"
:
true
}
}
\ No newline at end of file
}
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