Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
ed57f269
Commit
ed57f269
authored
Nov 25, 2019
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
35b3a58e
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
330 additions
and
217 deletions
+330
-217
.DS_Store
.DS_Store
+0
-0
build.js
build.js
+11
-1
.DS_Store
egret/.DS_Store
+0
-0
index.html
egret/index.html
+153
-154
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+5
-7
.DS_Store
egret/resource/.DS_Store
+0
-0
creditsTip_panel.tmproject
egret/resource/TextureMerger/creditsTip_panel.tmproject
+0
-1
hbNoPrize.tmproject
egret/resource/TextureMerger/hbNoPrize.tmproject
+1
-0
hbPrize.tmproject
egret/resource/TextureMerger/hbPrize.tmproject
+1
-0
hbRainGame.tmproject
egret/resource/TextureMerger/hbRainGame.tmproject
+1
-0
index_scene.tmproject
egret/resource/TextureMerger/index_scene.tmproject
+1
-0
noMore_panel.tmproject
egret/resource/TextureMerger/noMore_panel.tmproject
+0
-1
noNetWork.tmproject
egret/resource/TextureMerger/noNetWork.tmproject
+1
-0
noPrize_panel.tmproject
egret/resource/TextureMerger/noPrize_panel.tmproject
+0
-1
noTimes_panel.tmproject
egret/resource/TextureMerger/noTimes_panel.tmproject
+0
-1
preload.tmproject
egret/resource/TextureMerger/preload.tmproject
+0
-1
prize_panel.tmproject
egret/resource/TextureMerger/prize_panel.tmproject
+0
-1
start_scene.tmproject
egret/resource/TextureMerger/start_scene.tmproject
+0
-1
.DS_Store
egret/resource/assets/.DS_Store
+0
-0
.DS_Store
egret/resource/assets/noNetWork_panel/.DS_Store
+0
-0
noNetWork_bg.png
egret/resource/assets/noNetWork_panel/noNetWork_bg.png
+0
-0
noNetWork_ok.png
egret/resource/assets/noNetWork_panel/noNetWork_ok.png
+0
-0
default.res.json
egret/resource/default.res.json
+14
-0
default.thm.json
egret/resource/default.thm.json
+19
-16
NoNetWorkPanelSkin.exml
egret/resource/skins/NoNetWorkPanelSkin.exml
+20
-0
MyExmlPlugin.ts
egret/scripts/MyExmlPlugin.ts
+2
-1
Main.ts
egret/src/Main.ts
+2
-3
NoNetWorkPanel.ts
egret/src/Panels/NoNetWorkPanel.ts
+45
-0
RulePanel.ts
egret/src/Panels/RulePanel/RulePanel.ts
+1
-1
NetConst.ts
egret/src/comm/NetConst.ts
+11
-10
onNotSuccess.ts
egret/src/comm/onNotSuccess.ts
+8
-3
IndexScene.ts
egret/src/indexScene/IndexScene.ts
+32
-14
sceneTypes.ts
egret/src/types/sceneTypes.ts
+1
-0
package.json
package.json
+1
-0
No files found.
.DS_Store
View file @
ed57f269
No preview for this file type
build.js
View file @
ed57f269
...
@@ -14,4 +14,14 @@ if (cmd === 'build' && process.argv[3] === 'prod') {
...
@@ -14,4 +14,14 @@ if (cmd === 'build' && process.argv[3] === 'prod') {
if
(
process
.
argv
[
4
]
===
'exml'
)
if
(
process
.
argv
[
4
]
===
'exml'
)
cmd
=
'buildProdEXML'
;
cmd
=
'buildProdEXML'
;
}
}
build
[
cmd
](
'egret'
);
\ No newline at end of file
else
if
(
cmd
===
'build'
&&
process
.
argv
[
3
]
===
'prod2'
)
{
// if (cmd === 'build' && remain[1] === 'prod') {
cmd
=
'notinypng'
;
if
(
process
.
argv
[
4
]
===
'ts'
)
cmd
=
'buildProdTS'
;
if
(
process
.
argv
[
4
]
===
'exml'
)
cmd
=
'buildProdEXML'
;
}
build
[
cmd
](
'egret'
);
console
.
log
();
\ No newline at end of file
egret/.DS_Store
View file @
ed57f269
No preview for this file type
egret/index.html
View file @
ed57f269
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
Egret
</title>
<title>
Egret
</title>
<meta
name=
"viewport"
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<style>
<style>
html
,
html
,
body
{
body
{
...
@@ -25,164 +25,163 @@
...
@@ -25,164 +25,163 @@
</head>
</head>
<body>
<body>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
<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-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=
"true"
data-show-log=
"false"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"true"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
</div>
<img
id=
"shareImg"
/>
<img
id=
"shareImg"
/>
<div
id=
"sCloseBtn"
></div>
<div
id=
"sCloseBtn"
></div>
<script
src=
"libs/modules/egret/egret.js"
></script>
<script
src=
"libs/modules/egret/egret.js"
></script>
<script
src=
"libs/modules/egret/egret.web.js"
></script>
<script
src=
"libs/modules/egret/egret.web.js"
></script>
<script
src=
"libs/modules/eui/eui.js"
></script>
<script
src=
"libs/modules/eui/eui.js"
></script>
<script
src=
"libs/modules/assetsmanager/assetsmanager.js"
></script>
<script
src=
"libs/modules/assetsmanager/assetsmanager.js"
></script>
<script
src=
"libs/modules/tween/tween.js"
></script>
<script
src=
"libs/modules/tween/tween.js"
></script>
<script
src=
"libs/modules/game/game.min.js"
></script>
<script
src=
"libs/modules/game/game.min.js"
></script>
<script
src=
"libs/modules/promise/promise.js"
></script>
<script
src=
"libs/modules/promise/promise.js"
></script>
<script
src=
"libs/zepto.min.js"
></script>
<script
src=
"libs/zepto.min.js"
></script>
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/security.js"
></script>
<script
src=
"scripts/svga.egret.min2.js"
></script>
<script
src=
"scripts/svga.egret.min2.js"
></script>
<script
src=
"libs/physics.min.js"
></script>
<script
src=
"libs/physics.min.js"
></script>
<script
src=
"output.js"
></script>
<script
src=
"output.js"
></script>
<!--<script src="https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"></script>-->
<!--<script>-->
<!--<script>-->
<!-- // init vConsole-->
<!-- // init vConsole-->
<!-- var vConsole = new VConsole();-->
<!-- var vConsole = new VConsole();-->
<!-- console.log('Hello world');-->
<!-- console.log('Hello world');-->
<!--</script>-->
<!--</script>-->
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script>
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script>
<script
src=
"//statics-web.iqiyi.com/common/jssdk/iqiyiJsBridge-v2-min.js"
></script>
<script
src=
"//statics-web.iqiyi.com/common/jssdk/iqiyiJsBridge-v2-min.js"
></script>
<script>
<script>
window
[
'hbRainTime'
]
=
20
;
window
[
'hbRainTime'
]
=
20
;
window
[
'hbTips'
]
=
77.8
;
window
[
'hbTips'
]
=
88.8
;
function
iqiyiShare
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
iqiyi
&&
iqiyi
.
share
({
title
:
'百度'
,
//标题
desc
:
'百度'
,
//描述
imgUrl
:
''
,
//图片
link
:
'https://www.baidu.com/'
,
//链接
success
:
function
(
res
)
{
resolve
(
res
);
},
fail
:
function
()
{
reject
(
'分享失败'
);
},
cancel
:
function
()
{
reject
(
'分享取消'
);
}
});
});
}
// 初始化分享数据(native右上角分享)
function
iqiyiShare
()
{
iqiyi
.
onShare
(
{
return
new
Promise
((
resolve
,
reject
)
=>
{
title
:
'onShare分享标题'
,
iqiyi
&&
iqiyi
.
share
({
desc
:
'onShare分享内容'
,
title
:
'百度'
,
//标题
// imgUrl: 'http://partner.vip.qiyi.com/mobact2rd/public/img/default.jpg',
desc
:
'百度'
,
//描述
// link: 'https://m.iqiyi.com/',
imgUrl
:
''
,
//图片
link
:
window
.
location
.
href
,
link
:
'https://www.baidu.com/'
,
//链接
dialogTitle
:
'onShare 分享选择浮层在这里'
,
success
:
function
(
res
)
{
// gifUrl: 'http://qq.yh31.com/tp/zjbq/201711142021166458.gif',
resolve
(
res
);
success
:
function
()
{
},
setResult
(
'分享成功'
);
fail
:
function
()
{
},
reject
(
'分享失败'
);
fail
:
function
()
{
},
setResult
(
'分享失败'
);
cancel
:
function
()
{
}
reject
(
'分享取消'
);
,
}
cancel
:
function
()
{
});
setResult
(
'分享取消'
);
}
);
}
}
})
;
</script>
// 初始化分享数据(native右上角分享)
<script>
iqiyi
.
onShare
({
// 网鱼网咖图标额外奖励插件
title
:
'onShare分享标题'
,
window
[
'extraPlugId'
]
=
123
;
desc
:
'onShare分享内容'
,
// 引导奖励插件
// imgUrl: 'http://partner.vip.qiyi.com/mobact2rd/public/img/default.jpg',
window
[
'guidePrizePlugId'
]
=
1309
;
// link: 'https://m.iqiyi.com/',
link
:
window
.
location
.
href
,
dialogTitle
:
'onShare 分享选择浮层在这里'
,
// gifUrl: 'http://qq.yh31.com/tp/zjbq/201711142021166458.gif',
success
:
function
()
{
setResult
(
'分享成功'
);
},
fail
:
function
()
{
setResult
(
'分享失败'
);
},
cancel
:
function
()
{
setResult
(
'分享取消'
);
}
});
var
development
=
true
;
</script>
var
gameId
=
1
;
<script>
var
CFG
=
{
// 网鱼网咖图标额外奖励插件
actId
:
'3028151'
,
window
[
'extraPlugId'
]
=
123
;
oaId
:
'3028151'
,
// 引导奖励插件
unitName
:
'捞币'
,
window
[
'guidePrizePlugId'
]
=
1309
;
btnUnitName
:
'捞币'
,
doJoin
:
'/hdtool/doJoin?dpm=47663.3.1.0&activityId=3028151'
,
quireOrder
:
'/hdtool/getOrderStatus'
,
styleConfig
:
'/hdtool/getHdtoolConfig'
,
getElement
:
'/hdtool/ajaxElement'
,
getPrizeDetail
:
'/hdtool/prizeDetail'
,
ajaxThroughInfo
:
'/hdtool/ajaxThroughInfo'
,
throughSubmit
:
'/hdtool/throughSubmit'
,
gameGetOrder
:
'/hdtool/getOrderInfo'
,
//游戏获取订单信息接口
gameSubmit
:
'/hdtool/gameSubmit'
,
//游戏结果提交接口
doSubmit
:
'/hdtool/submit'
,
adslotId
:
''
,
consumerId
:
'2706990041'
,
isNotLoginUser
:
false
,
uid
:
'4fc1aa4eec053b15134ad2b106f47f43-1667b9d0e0e'
,
hdType
:
'duiba'
,
hdToolId
:
'40166'
,
appType
:
'credits'
,
subType
:
'custom'
,
directSendCoupon
:
'false'
,
ajaxAction
:
''
,
recommendQueue
:
'/recommend/getRecommend'
,
recommendSkin
:
'/recommend/getRecommendSkin'
,
isShowDetail
:
true
,
preview
:
false
,
from
:
''
,
login
:
'//activity.m.duiba.com.cn/hdtool/login?dpm=47663.3.3.0'
,
flowRedirectUrl
:
''
,
flowRedirectTuiaUrl
:
''
,
isOpenRecommend
:
true
,
appId
:
'47663'
,
recordUrl
:
'//activity.m.duiba.com.cn/crecord/record?dbnewopen&dpm=47663.3.2.0'
,
shareDesc
:
''
,
entranceDesc
:
''
,
isSHowMeat
:
true
,
needCouponModal
:
true
,
// 给前端用,判断是否需要使用配置的优惠券弹窗
needRecommendModal
:
true
,
// 给前端用,判断是否需要公用推荐位弹窗
asyncFiles
:
[],
// 给前端用,异步加载的文件
shareAndroidLinkActivity
:
'https://superapp.kiwa-tech.com/weexWeb/index.html?page=download.web.js&moduleId=third-party'
,
shareIosLinkActivity
:
'https://superapp.kiwa-tech.com/weexWeb/index.html?page=download.web.js&moduleId=third-party'
};
var
regular
=
"(
\\
S+)//(
\\
S+)/(
\\
S+)/(
\\
S+)/(
\\
S+)"
;
var
development
=
true
;
var
re
=
new
RegExp
(
regular
,
"g"
);
var
gameId
=
1
;
data
=
window
.
location
.
href
.
replace
(
re
,
"$4"
)
var
CFG
=
{
actId
:
'3028151'
,
oaId
:
'3028151'
,
unitName
:
'捞币'
,
btnUnitName
:
'捞币'
,
doJoin
:
'/hdtool/doJoin?dpm=47663.3.1.0&activityId=3028151'
,
quireOrder
:
'/hdtool/getOrderStatus'
,
styleConfig
:
'/hdtool/getHdtoolConfig'
,
getElement
:
'/hdtool/ajaxElement'
,
getPrizeDetail
:
'/hdtool/prizeDetail'
,
ajaxThroughInfo
:
'/hdtool/ajaxThroughInfo'
,
throughSubmit
:
'/hdtool/throughSubmit'
,
gameGetOrder
:
'/hdtool/getOrderInfo'
,
//游戏获取订单信息接口
gameSubmit
:
'/hdtool/gameSubmit'
,
//游戏结果提交接口
doSubmit
:
'/hdtool/submit'
,
adslotId
:
''
,
consumerId
:
'2706990041'
,
isNotLoginUser
:
false
,
uid
:
'4fc1aa4eec053b15134ad2b106f47f43-1667b9d0e0e'
,
hdType
:
'duiba'
,
hdToolId
:
'40166'
,
appType
:
'credits'
,
subType
:
'custom'
,
directSendCoupon
:
'false'
,
ajaxAction
:
''
,
recommendQueue
:
'/recommend/getRecommend'
,
recommendSkin
:
'/recommend/getRecommendSkin'
,
isShowDetail
:
true
,
preview
:
false
,
from
:
''
,
login
:
'//activity.m.duiba.com.cn/hdtool/login?dpm=47663.3.3.0'
,
flowRedirectUrl
:
''
,
flowRedirectTuiaUrl
:
''
,
isOpenRecommend
:
true
,
appId
:
'47663'
,
recordUrl
:
'//activity.m.duiba.com.cn/crecord/record?dbnewopen&dpm=47663.3.2.0'
,
shareDesc
:
''
,
entranceDesc
:
''
,
isSHowMeat
:
true
,
needCouponModal
:
true
,
// 给前端用,判断是否需要使用配置的优惠券弹窗
needRecommendModal
:
true
,
// 给前端用,判断是否需要公用推荐位弹窗
asyncFiles
:
[],
// 给前端用,异步加载的文件
shareAndroidLinkActivity
:
'https://superapp.kiwa-tech.com/weexWeb/index.html?page=download.web.js&moduleId=third-party'
,
shareIosLinkActivity
:
'https://superapp.kiwa-tech.com/weexWeb/index.html?page=download.web.js&moduleId=third-party'
};
var
rule
=
"欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战<br>欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加<br>入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎<br>加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战<br>欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加<br>入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎<br>加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战<br>欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加<br>入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎<br>加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战"
;
var
regular
=
"(
\\
S+)//(
\\
S+)/(
\\
S+)/(
\\
S+)/(
\\
S+)"
;
var
re
=
new
RegExp
(
regular
,
"g"
);
data
=
window
.
location
.
href
.
replace
(
re
,
"$4"
)
var
mapPlugIDList
=
[
1218
,
1219
];
var
rule
=
"欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战<br>欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加<br>入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎<br>加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战<br>欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加<br>入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎<br>加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战<br>欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入<br>夺宝大作战欢迎加入夺宝大作战欢迎加<br>入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎<br>加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大<br>作战欢迎加入夺宝大作战欢迎加入夺宝大作战欢迎加入夺宝大作战"
;
var
weUrl
=
'http://weserver.duibadev.com.cn'
;
var
recordUrl
=
'https://trade.m.duiba.com.cn'
;
function
resolve
(
a
)
{
var
mapPlugIDList
=
[
1218
,
1219
];
var
b
=
eval
(
a
);
var
weUrl
=
'http://weserver.duibadev.com.cn'
;
return
b
;
var
recordUrl
=
'https://trade.m.duiba.com.cn'
;
}
</script>
<script>
function
resolve
(
a
)
{
egret
.
runEgret
({
var
b
=
eval
(
a
);
renderMode
:
"webgl"
,
return
b
;
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
}
});
</script>
</script>
<script>
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
</body>
</body>
...
...
egret/libs/tw/manager/NetManager.ts
View file @
ed57f269
...
@@ -325,7 +325,7 @@ export class NetManager extends ABNetManager {
...
@@ -325,7 +325,7 @@ export class NetManager extends ABNetManager {
callback
:
callback
,
callback
:
callback
,
pollingCount
:
pollingCount
,
pollingCount
:
pollingCount
,
pollingCheck
:
pollingCheck
,
pollingCheck
:
pollingCheck
,
hideMsg
:
true
,
//
hideMsg:true,
};
};
this
.
send
(
net
);
this
.
send
(
net
);
}
}
...
@@ -729,13 +729,11 @@ export class NetManager extends ABNetManager {
...
@@ -729,13 +729,11 @@ export class NetManager extends ABNetManager {
const
net
:
INetData
=
{
const
net
:
INetData
=
{
name
:
NetName
.
IQIYI_ELEMENT
,
name
:
NetName
.
IQIYI_ELEMENT
,
uri
:
'/hdtool/recon/ajaxElement'
,
uri
:
'/hdtool/recon/ajaxElement'
,
type
:
'
pos
t'
,
type
:
'
ge
t'
,
dataType
:
'json'
,
dataType
:
'json'
,
param
:
{
param
:
{
hdType
:
DataManager
.
ins
.
customCfgData
.
hdType
,
duibaId
:
DataManager
.
ins
.
customCfgData
.
hdToolId
,
hdToolId
:
DataManager
.
ins
.
customCfgData
.
hdToolId
,
activityId
:
DataManager
.
ins
.
customCfgData
.
oaId
,
actId
:
DataManager
.
ins
.
customCfgData
.
actId
,
preview
:
DataManager
.
ins
.
customCfgData
.
preview
},
},
callback
:
callback
callback
:
callback
};
};
...
@@ -780,7 +778,7 @@ export class NetManager extends ABNetManager {
...
@@ -780,7 +778,7 @@ export class NetManager extends ABNetManager {
dataType
:
'json'
,
dataType
:
'json'
,
param
:
param
,
param
:
param
,
callback
:
callback
,
callback
:
callback
,
hideMsg
:
tru
e
,
// hideMsg:fals
e,
};
};
this
.
getToken
(
net
);
this
.
getToken
(
net
);
}
}
...
...
egret/resource/.DS_Store
View file @
ed57f269
No preview for this file type
egret/resource/TextureMerger/creditsTip_panel.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"creditsTip_panel","version":5,"files":["../assets/creditsTip_panel/creditsTip_bg.png","../assets/creditsTip_panel/creditsTip_btn.png"]}
\ No newline at end of file
egret/resource/TextureMerger/hbNoPrize.tmproject
0 → 100644
View file @
ed57f269
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbNoPrize","version":5,"files":["../assets/hbNoPrize/hbNoPrize_share_tips.png","../assets/hbNoPrize/hbNoPrize_share_btn.png","../assets/hbNoPrize/hbNoPrize_ok_btn.png","../assets/hbNoPrize/hbNoPrize_bg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/hbPrize.tmproject
0 → 100644
View file @
ed57f269
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbPrize","version":5,"files":["../assets/hbPrize/hbPrize_bg.png","../assets/hbPrize/hbPrize_item_bg.png","../assets/hbPrize/hbPrize_item_line.png","../assets/hbPrize/hbPrize_ok_btn.png","../assets/hbPrize/hbPrize_share_btn.png","../assets/hbPrize/hbPrize_share_tips.png"]}
\ No newline at end of file
egret/resource/TextureMerger/hbRainGame.tmproject
0 → 100644
View file @
ed57f269
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbRainGame","version":5,"files":["../assets/hbGame/hbGame_tips.png","../assets/hbGame/hbGame_hongbao.png","../assets/hbGame/hbGame_hongbao_effect.png","../assets/hbGame/hbGame_bg.png","../assets/hbGame/hbGame_3.png","../assets/hbGame/hbGame_2.png","../assets/hbGame/hbGame_1.png"]}
\ No newline at end of file
egret/resource/TextureMerger/index_scene.tmproject
0 → 100644
View file @
ed57f269
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"index_scene","version":5,"files":["../assets/index_scene/index_bg.png","../assets/index_scene/index_again_btn.png","../assets/index_scene/index_hongbao.png","../assets/index_scene/index_myprize_btn.png","../assets/index_scene/index_panel_bg.png","../assets/index_scene/index_rule_btn.png","../assets/index_scene/index_tips_cuting.png","../assets/index_scene/index_tips_raining.png","../assets/index_scene/index_hongbao_current.png","../assets/index_scene/index_start_btn.png","../assets/index_scene/index_disable_btn.png"]}
\ No newline at end of file
egret/resource/TextureMerger/noMore_panel.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noMore_panel","version":5,"files":["../assets/noMore_panel/noMore_bg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/noNetWork.tmproject
0 → 100644
View file @
ed57f269
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noNetWork","version":5,"files":["../assets/noNetWork_panel/noNetWork_bg.png","../assets/noNetWork_panel/noNetWork_ok.png"]}
\ No newline at end of file
egret/resource/TextureMerger/noPrize_panel.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noPrize_panel","version":5,"files":["../assets/noPrize_panel/noPrize_bg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/noTimes_panel.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noTimes_panel","version":5,"files":["../assets/noTimes_panel/noTimes_bg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/preload.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/common/closeBtn.png","../assets/start_scene/start_atc_btn.png","../assets/start_scene/start_myPrize_btn.png"]}
\ No newline at end of file
egret/resource/TextureMerger/prize_panel.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize_panel","version":5,"files":["../assets/prize_panel/prize_bg.png","../assets/prize_panel/prize_btn.png"]}
\ No newline at end of file
egret/resource/TextureMerger/start_scene.tmproject
deleted
100644 → 0
View file @
35b3a58e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start_scene","version":5,"files":["../assets/start_scene/start_bg.png","../assets/start_scene/start_btn.png","../assets/start_scene/start_panel_bg.png","../assets/start_scene/start_panel.png","../assets/start_scene/start_atc_btn.png","../assets/start_scene/start_myPrize_btn.png"]}
\ No newline at end of file
egret/resource/assets/.DS_Store
View file @
ed57f269
No preview for this file type
egret/resource/assets/noNetWork_panel/.DS_Store
0 → 100644
View file @
ed57f269
File added
egret/resource/assets/noNetWork_panel/noNetWork_bg.png
0 → 100644
View file @
ed57f269
61.1 KB
egret/resource/assets/noNetWork_panel/noNetWork_ok.png
0 → 100644
View file @
ed57f269
15.7 KB
egret/resource/default.res.json
View file @
ed57f269
...
@@ -31,6 +31,10 @@
...
@@ -31,6 +31,10 @@
{
{
"keys"
:
"hbNoPrize_share_tips_png,hbNoPrize_share_btn_png,hbNoPrize_ok_btn_png,hbNoPrize_bg_png"
,
"keys"
:
"hbNoPrize_share_tips_png,hbNoPrize_share_btn_png,hbNoPrize_ok_btn_png,hbNoPrize_bg_png"
,
"name"
:
"hbNoPrize"
"name"
:
"hbNoPrize"
},
{
"keys"
:
"noNetWork_bg_png,noNetWork_ok_png"
,
"name"
:
"noNetWork"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -213,6 +217,16 @@
...
@@ -213,6 +217,16 @@
"url"
:
"assets/index_scene/index_disable_btn.png"
,
"url"
:
"assets/index_scene/index_disable_btn.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"index_disable_btn_png"
"name"
:
"index_disable_btn_png"
},
{
"url"
:
"assets/noNetWork_panel/noNetWork_bg.png"
,
"type"
:
"image"
,
"name"
:
"noNetWork_bg_png"
},
{
"url"
:
"assets/noNetWork_panel/noNetWork_ok.png"
,
"type"
:
"image"
,
"name"
:
"noNetWork_ok_png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
ed57f269
{
{
"skins"
:
{},
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/LoadingSceneSkin.exml"
,
"resource/skins/HbGameSkin.exml"
,
"resource/skins/LoadingSkin.exml"
,
"resource/skins/HbNoPrizeSkin.exml"
,
"resource/skins/HbGameSkin.exml"
,
"resource/skins/HbPrizeItemSkin.exml"
,
"resource/skins/HbPrizeSkin.exml"
,
"resource/skins/HbPrizeSkin.exml"
,
"resource/skins/HbNoPrizeSkin.exml"
,
"resource/skins/HbPrize_backSkin.exml"
,
"resource/skins/IndexSceneSkin.exml"
,
"resource/skins/IndexSceneSkin.exml"
,
"resource/skins/HbPrizeItemSkin.exml"
,
"resource/skins/LoadingSceneSkin.exml"
,
"resource/skins/ToastPanelSkin.exml"
,
"resource/skins/LoadingSkin.exml"
,
"resource/skins/ui/IconButtonSkin.exml"
,
"resource/skins/NoNetWorkPanelSkin.exml"
,
"resource/skins/ui/ProgressBarSkin.exml"
,
"resource/skins/RulePanelSkin.exml"
,
"resource/skins/ui/TimeProgressBarSkin.exml"
"resource/skins/ToastPanelSkin.exml"
,
],
"resource/skins/ui/IconButtonSkin.exml"
,
"path"
:
"resource/default.thm.json"
"resource/skins/ui/ProgressBarSkin.exml"
,
"resource/skins/ui/TimeProgressBarSkin.exml"
],
"path"
:
"resource/default.thm.json"
}
}
\ No newline at end of file
egret/resource/skins/NoNetWorkPanelSkin.exml
0 → 100644
View file @
ed57f269
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"CreditsTip"
width=
"750"
height=
"1335"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
y=
"205"
source=
"noNetWork_bg_png"
horizontalCenter=
"0"
/>
<e:Button
id=
"ok_btn"
label=
""
y=
"703"
scaleX=
"1"
scaleY=
"1"
anchorOffsetY=
"0"
anchorOffsetX=
"0"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"noNetWork_ok_png"
source.down=
"noNetWork_ok_png"
source.disabled=
"noNetWork_ok_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"closeBtn"
label=
""
x=
"603"
y=
"274"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeBtn_png"
source.down=
"closeBtn_png"
source.disabled=
"closeBtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
.33" anchorOffsetX="9.33" anchorOffsetY="25.33"/>
</e:Skin>
\ No newline at end of file
egret/scripts/MyExmlPlugin.ts
View file @
ed57f269
...
@@ -14,7 +14,8 @@ export class MyExmlPlugin extends ExmlPlugin2 implements plugins.Command {
...
@@ -14,7 +14,8 @@ export class MyExmlPlugin extends ExmlPlugin2 implements plugins.Command {
'msgBg1.png'
,
'msgBg1.png'
,
'msgBg2.png'
,
'msgBg2.png'
,
'msgBg3.png'
,
'msgBg3.png'
,
'main_star_an.png'
'main_star_an.png'
,
'cutTimeFont.png'
,
];
];
if
(
excludes
.
indexOf
(
file
.
basename
)
!=
-
1
)
{
if
(
excludes
.
indexOf
(
file
.
basename
)
!=
-
1
)
{
return
file
;
return
file
;
...
...
egret/src/Main.ts
View file @
ed57f269
...
@@ -21,9 +21,7 @@ import IndexScene from "./indexScene/IndexScene";
...
@@ -21,9 +21,7 @@ import IndexScene from "./indexScene/IndexScene";
import
HbPrize
from
"./HongbaoRain/HbPrize"
;
import
HbPrize
from
"./HongbaoRain/HbPrize"
;
import
HbNoPrize
from
"./HongbaoRain/HbNoPrize"
;
import
HbNoPrize
from
"./HongbaoRain/HbNoPrize"
;
import
HbGame
from
"./HongbaoRain/HbGame"
;
import
HbGame
from
"./HongbaoRain/HbGame"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
import
NoNetWorkPanel
from
"./Panels/NoNetWorkPanel"
;
import
{
ABNetManager
}
from
"../libs/tc/manager/ABNetManager"
;
import
{
showToast
}
from
"./comm/UtilsConst"
;
//////
//////
...
@@ -67,6 +65,7 @@ class Main extends eui.UILayer {
...
@@ -67,6 +65,7 @@ class Main extends eui.UILayer {
[
ModuleTypes
.
RULE_PANEL
,
RulePanel
],
[
ModuleTypes
.
RULE_PANEL
,
RulePanel
],
[
ModuleTypes
.
HBPRIZE_PANEL
,
HbPrize
],
[
ModuleTypes
.
HBPRIZE_PANEL
,
HbPrize
],
[
ModuleTypes
.
HBNOPRIZE_PANEL
,
HbNoPrize
],
[
ModuleTypes
.
HBNOPRIZE_PANEL
,
HbNoPrize
],
[
ModuleTypes
.
NO_NETWORK_PANEL
,
NoNetWorkPanel
],
]);
]);
TopLayerCtrl
.
instance
.
registerPanelClass
(
ModuleTypes
.
TOAST_PANEL
,
ToastPanel
);
TopLayerCtrl
.
instance
.
registerPanelClass
(
ModuleTypes
.
TOAST_PANEL
,
ToastPanel
);
...
...
egret/src/Panels/NoNetWorkPanel.ts
0 → 100644
View file @
ed57f269
import
Panel
from
"../views/Panel"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
export
default
class
NoNetWorkPanel
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Button
;
constructor
(
data
?)
{
super
();
}
start
()
{
super
.
start
();
this
.
onLoad
();
}
protected
getTapEvts
():
any
[]
{
return
super
.
getTapEvts
().
concat
([
[
this
.
ok_btn
,
this
.
onTouchClose
,
this
],
[
this
.
closeBtn
,
this
.
onTouchClose
,
this
],
])
}
// onTouchClose(): any {
// // SceneCtrl.instance.change(ModuleTypes.INDEX_SCENE);
// return super.onTouchClose();
// }
protected
onLoad
():
void
{
this
.
initUI
();
}
private
initUI
():
void
{
}
public
get
skinKey
()
{
return
'NoNetWorkPanel'
;
}
get
groupName
()
{
return
'noNetWork'
;
}
}
\ No newline at end of file
egret/src/Panels/RulePanel/RulePanel.ts
View file @
ed57f269
...
@@ -8,7 +8,7 @@ export default class RulePanel extends Panel {
...
@@ -8,7 +8,7 @@ export default class RulePanel extends Panel {
public
ruleLabel
:
eui
.
Label
;
public
ruleLabel
:
eui
.
Label
;
public
get
skinKey
()
{
return
'RulePanel'
}
public
get
skinKey
()
{
return
'RulePanel'
}
public
get
groupName
()
{
return
'prize_panel'
}
//
public get groupName() { return 'prize_panel' }
constructor
(
data
?)
{
constructor
(
data
?)
{
super
(
data
);
super
(
data
);
...
...
egret/src/comm/NetConst.ts
View file @
ed57f269
...
@@ -15,17 +15,18 @@ export const JoinGame = function() {
...
@@ -15,17 +15,18 @@ export const JoinGame = function() {
reject
(
res
);
reject
(
res
);
return
;
return
;
}
}
resolve
(
res
);
const
data
=
res
.
data
;
const
data
=
res
.
data
;
NetManager
.
ins
.
getStartStatus
((
success
,
res
)
=>
{
//
NetManager.ins.getStartStatus((success, res) => {
// Loading.instace.hide();
//
// Loading.instace.hide();
if
(
!
success
)
{
//
if(!success) {
reject
(
res
);
//
reject(res);
return
;
//
return;
}
//
}
resolve
(
res
);
//
resolve(res);
},
data
,
(
res
)
=>
{
//
}, data, (res) => {
return
res
.
code
!=
"0000000000"
;
//
return res.code != "0000000000";
},
10
);
//
}, 10);
});
});
});
});
};
};
...
...
egret/src/comm/onNotSuccess.ts
View file @
ed57f269
import
{
Data
}
from
"../../libs/tw/data/Data"
;
import
{
Data
}
from
"../../libs/tw/data/Data"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
showToast
}
from
"./UtilsConst"
;
import
{
showToast
}
from
"./UtilsConst"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
export
const
onNotSuccess
=
function
(
data
?:
Data
,
netname
?:
NetName
)
{
export
const
onNotSuccess
=
function
(
data
?:
Data
,
netname
?:
NetName
)
{
if
(
!
data
)
{
if
(
!
data
)
{
showToast
(
'网络异常
\
n请隔一段时间再尝试'
);
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_NETWORK_PANEL
);
// showToast('网络异常\n请隔一段时间再尝试');
return
;
return
;
}
}
if
(
data
.
code
==
'E999999999'
)
{
//系统级别错误 系统异常,\n请刷新后重试。
if
(
data
.
code
==
'E999999999'
)
{
//系统级别错误 系统异常,\n请刷新后重试。
showToast
(
'网络异常
\
n请隔一段时间再尝试'
);
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_NETWORK_PANEL
);
// showToast('网络异常\n请隔一段时间再尝试');
}
else
if
(
data
.
code
==
'E100201001'
)
{
}
else
if
(
data
.
code
==
'E100201001'
)
{
showToast
(
'请登录后重试。'
);
showToast
(
'请登录后重试。'
);
}
else
if
(
data
.
code
==
'E100201007'
)
{
}
else
if
(
data
.
code
==
'E100201007'
)
{
...
@@ -16,7 +20,8 @@ export const onNotSuccess = function(data?: Data, netname?: NetName) {
...
@@ -16,7 +20,8 @@ export const onNotSuccess = function(data?: Data, netname?: NetName) {
}
else
if
(
data
.
code
==
'E100202007'
||
data
.
code
==
'E100202008'
||
data
.
code
==
'E100202009'
||
data
.
code
==
'E100202010'
)
{
}
else
if
(
data
.
code
==
'E100202007'
||
data
.
code
==
'E100202008'
||
data
.
code
==
'E100202009'
||
data
.
code
==
'E100202010'
)
{
showToast
(
'对不起 您的今日游戏次数已达上限 明天再来吧~'
);
showToast
(
'对不起 您的今日游戏次数已达上限 明天再来吧~'
);
}
else
{
//其他异常
}
else
{
//其他异常
showToast
(
'网络异常
\
n请隔一段时间再尝试'
);
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_NETWORK_PANEL
);
// showToast('网络异常\n请隔一段时间再尝试');
}
}
};
};
\ No newline at end of file
egret/src/indexScene/IndexScene.ts
View file @
ed57f269
import
Scene
from
"../views/Scene"
;
import
Scene
from
"../views/Scene"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
JoinGame
}
from
"../comm/NetConst"
;
import
{
gotoRecord
,
showToast
}
from
"../comm/UtilsConst"
;
import
{
gotoRecord
,
showToast
}
from
"../comm/UtilsConst"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
CutTimer
from
"../comm/CutTimer"
;
import
CutTimer
from
"../comm/CutTimer"
;
import
Utils
from
"../comm/Utils"
;
import
Utils
from
"../comm/Utils"
;
import
tr
=
egret
.
sys
.
tr
;
import
{
getlogItem
}
from
"../getlogItem"
;
import
{
getlogItem
}
from
"../getlogItem"
;
import
{
Data
}
from
"../../libs/tw/data/Data"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
HtmlTextParser
}
from
"../../libs/tc/util/HtmlTextParser"
;
import
{
HtmlTextParser
}
from
"../../libs/tc/util/HtmlTextParser"
;
...
@@ -34,7 +31,7 @@ export default class IndexScene extends Scene {
...
@@ -34,7 +31,7 @@ export default class IndexScene extends Scene {
}
}
public
get
groupName
()
{
public
get
groupName
()
{
return
'index'
return
'index
_scene
'
}
}
constructor
(
data
?)
{
constructor
(
data
?)
{
...
@@ -53,7 +50,8 @@ export default class IndexScene extends Scene {
...
@@ -53,7 +50,8 @@ export default class IndexScene extends Scene {
private
onTouchTap
(
e
:
egret
.
TouchEvent
)
{
private
onTouchTap
(
e
:
egret
.
TouchEvent
)
{
switch
(
e
.
target
)
{
switch
(
e
.
target
)
{
case
this
.
btn
:
// 开始按钮,再次开始按钮
case
this
.
btn
:
// 开始按钮,再次开始按钮
const
extra
=
DataManager
.
ins
.
getData
(
NetName
.
IQIYI_ELEMENT
).
data
;
const
data
=
DataManager
.
ins
.
getData
(
NetName
.
IQIYI_ELEMENT
).
data
;
const
extra
=
data
.
extra
;
extra
.
shared
?
NetManager
.
ins
.
clickLog
(
getlogItem
(
34
))
:
NetManager
.
ins
.
clickLog
(
getlogItem
(
21
));
extra
.
shared
?
NetManager
.
ins
.
clickLog
(
getlogItem
(
34
))
:
NetManager
.
ins
.
clickLog
(
getlogItem
(
21
));
this
.
btn
.
touchEnabled
=
false
;
this
.
btn
.
touchEnabled
=
false
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
HBGAME_SCENE
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
HBGAME_SCENE
);
...
@@ -94,7 +92,7 @@ export default class IndexScene extends Scene {
...
@@ -94,7 +92,7 @@ export default class IndexScene extends Scene {
private
initUI
():
void
{
private
initUI
():
void
{
this
.
scroller
.
height
=
this
.
width
/
window
.
innerWidth
*
window
.
innerHeight
;
this
.
scroller
.
height
=
this
.
width
/
window
.
innerWidth
*
window
.
innerHeight
;
let
_str
=
`
今日还剩</spen><u><font color="#72f8fd">
${
window
[
'hbTips'
]}
</font></u>次免费抽奖机会
`
;
let
_str
=
`
抢</spen><u><font color="#72f8fd">
${
window
[
'hbTips'
]}
</font></u>元现金红包
`
;
this
.
hbLabel
.
textFlow
=
new
HtmlTextParser
().
parse
(
_str
);
this
.
hbLabel
.
textFlow
=
new
HtmlTextParser
().
parse
(
_str
);
this
.
setMidGroup
();
this
.
setMidGroup
();
this
.
ajaxElement
();
this
.
ajaxElement
();
...
@@ -120,7 +118,20 @@ export default class IndexScene extends Scene {
...
@@ -120,7 +118,20 @@ export default class IndexScene extends Scene {
private
ajaxElement
()
{
private
ajaxElement
()
{
NetManager
.
ins
.
iqiyiAjaxElement
((
success
,
res
)
=>
{
NetManager
.
ins
.
iqiyiAjaxElement
((
success
,
res
)
=>
{
if
(
!
success
)
{
// 设置红包
for
(
let
i
=
1
;
i
<
4
;
i
++
)
{
this
[
`hongbao
${
i
}
`
].
source
=
'index_hongbao_png'
;
this
[
`label
${
i
}
`
].
alpha
=
0.8
;
}
if
(
!
success
||
!
res
||
!
res
.
data
||
!
res
.
data
.
extra
){
this
.
btn
.
visible
=
true
;
this
.
btn
.
source
=
'index_disable_btn_png'
;
this
.
btn
.
touchEnabled
=
false
;
this
.
btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
);
this
.
btn
.
y
=
9
;
this
.
cutLabel
.
visible
=
false
;
this
.
tipsLabel
.
visible
=
false
;
return
;
return
;
}
}
// console.log(res);
// console.log(res);
...
@@ -153,8 +164,20 @@ export default class IndexScene extends Scene {
...
@@ -153,8 +164,20 @@ export default class IndexScene extends Scene {
this
.
tipsLabel
.
visible
=
false
;
this
.
tipsLabel
.
visible
=
false
;
}
else
{
}
else
{
this
.
tipsLabel
.
y
=
5
;
this
.
tipsLabel
.
y
=
5
;
this
.
tipsLabel
.
text
=
`距离下一场开始还剩`
;
switch
(
true
)
{
this
.
btn
.
visible
=
false
;
case
(
currentTimeSlot
==
1
||
currentTimeSlot
==
2
):
this
.
tipsLabel
.
text
=
`距离第一场开始还剩`
;
break
;
case
(
currentTimeSlot
==
4
):
this
.
tipsLabel
.
text
=
`距离第二场开始还剩`
;
break
;
case
(
currentTimeSlot
==
6
):
this
.
tipsLabel
.
text
=
`距离第三场开始还剩`
;
break
;
default
:
this
.
tipsLabel
.
text
=
`距离第一场开始还剩`
;
break
;
}
this
.
cutLabel
.
visible
=
true
;
this
.
cutLabel
.
visible
=
true
;
this
.
tips_img
.
source
=
'index_tips_cuting_png'
;
this
.
tips_img
.
source
=
'index_tips_cuting_png'
;
_label
=
this
.
cutLabel
;
_label
=
this
.
cutLabel
;
...
@@ -173,11 +196,6 @@ export default class IndexScene extends Scene {
...
@@ -173,11 +196,6 @@ export default class IndexScene extends Scene {
this
.
cutTimer
.
start
(
nextTimestamp
-
timestamp
+
3000
);
this
.
cutTimer
.
start
(
nextTimestamp
-
timestamp
+
3000
);
}
}
// 设置红包
for
(
let
i
=
1
;
i
<
4
;
i
++
)
{
this
[
`hongbao
${
i
}
`
].
source
=
'index_hongbao_png'
;
this
[
`label
${
i
}
`
].
alpha
=
0.8
;
}
let
_hbData
=
{
3
:
'1'
,
5
:
'2'
,
7
:
'3'
};
let
_hbData
=
{
3
:
'1'
,
5
:
'2'
,
7
:
'3'
};
if
(
Utils
.
isInArray
(
currentTimeSlot
,
canGameArr
)
&&
extra
.
joinCount
>
0
)
{
if
(
Utils
.
isInArray
(
currentTimeSlot
,
canGameArr
)
&&
extra
.
joinCount
>
0
)
{
this
[
`hongbao
${
_hbData
[
currentTimeSlot
]}
`
].
source
=
'index_hongbao_current_png'
;
this
[
`hongbao
${
_hbData
[
currentTimeSlot
]}
`
].
source
=
'index_hongbao_current_png'
;
...
...
egret/src/types/sceneTypes.ts
View file @
ed57f269
...
@@ -16,5 +16,6 @@ export enum ModuleTypes {
...
@@ -16,5 +16,6 @@ export enum ModuleTypes {
HBPRIZE_PANEL
,
HBPRIZE_PANEL
,
HBNOPRIZE_PANEL
,
HBNOPRIZE_PANEL
,
RULE_PANEL
,
RULE_PANEL
,
NO_NETWORK_PANEL
,
}
}
\ No newline at end of file
package.json
View file @
ed57f269
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
"scripts"
:
{
"scripts"
:
{
"dev"
:
"node build.js dev"
,
"dev"
:
"node build.js dev"
,
"build"
:
"node build.js build prod"
,
"build"
:
"node build.js build prod"
,
"build2"
:
"node build.js build prod2"
,
"buildTS"
:
"node build.js build prod ts"
,
"buildTS"
:
"node build.js build prod ts"
,
"buildExml"
:
"node build.js build prod exml"
,
"buildExml"
:
"node build.js build prod exml"
,
"backup"
:
"node build.js backup"
,
"backup"
:
"node build.js backup"
,
...
...
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