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
0ffc784b
Commit
0ffc784b
authored
Nov 05, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
46bcdad9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
26 deletions
+75
-26
HbCutTimeSkin.exml
egret/resource/skins/HbCutTimeSkin.exml
+4
-3
HbCutTime.ts
egret/src/panels/HongbaoRain/HbCutTime.ts
+36
-8
HbGame.ts
egret/src/panels/HongbaoRain/HbGame.ts
+29
-2
HbPrize.ts
egret/src/panels/HongbaoRain/HbPrize.ts
+0
-7
hbRainBaseInfo.json
mock/happyclear/hbRainBaseInfo.json
+6
-6
No files found.
egret/resource/skins/HbCutTimeSkin.exml
View file @
0ffc784b
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"InviteSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
<e:Skin
class=
"InviteSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
y=
"-63.67"
horizontalCenter=
"
0
"
source=
"hbCutTime_bg_png"
/>
<e:Image
y=
"-63.67"
horizontalCenter=
"
-1
"
source=
"hbCutTime_bg_png"
/>
<e:BitmapLabel
id=
"cutTimeLabel"
y=
"525.33"
text=
"00时00分00秒"
letterSpacing=
"8"
font=
"hbCutTimeFont_fnt"
horizontalCenter=
"9"
/>
<e:BitmapLabel
id=
"cutTimeLabel"
y=
"525.33"
text=
"00时00分00秒"
letterSpacing=
"8"
font=
"hbCutTimeFont_fnt"
horizontalCenter=
"9"
/>
<e:Image
id=
"
cutTim
e"
y=
"477"
source=
"hbCutTime_cutLine_disable_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"
tipImag
e"
y=
"477"
source=
"hbCutTime_cutLine_disable_png"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"615"
y=
"208.33"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"615"
y=
"208.33"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Button
id=
"ok_bt
n"
label=
""
y=
"668"
anchorOffsetX=
"150"
anchorOffsetY=
"48"
horizontalCenter=
"0
"
>
<e:Button
id=
"ok_bt
"
label=
""
y=
"668"
anchorOffsetX=
"150"
anchorOffsetY=
"48"
horizontalCenter=
"0"
visible=
"false
"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"hbCutTime_btn_enable_png"
source.down=
"hbCutTime_btn_enable_png"
source.disabled=
"hbCutTime_btn_disable_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"hbCutTime_btn_enable_png"
source.down=
"hbCutTime_btn_enable_png"
source.disabled=
"hbCutTime_btn_disable_png"
/>
...
@@ -29,4 +29,5 @@
...
@@ -29,4 +29,5 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Image
id=
"ok_btn"
y=
"623"
source=
"hbCutTime_btn_enable_png"
horizontalCenter=
"0"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/panels/HongbaoRain/HbCutTime.ts
View file @
0ffc784b
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
CutTimer
from
"../../CutTimer"
;
import
CutTimer
from
"../../CutTimer"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
/**
/**
* 红包雨倒计时
* 红包雨倒计时
*/
*/
export
default
class
HbCutTime
extends
Panel
{
export
default
class
HbCutTime
extends
Panel
{
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
cutTim
e
:
eui
.
Image
;
public
tipImag
e
:
eui
.
Image
;
public
closeBtn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
ok_bt
n
:
eui
.
Button
;
public
ok_bt
:
eui
.
Button
;
public
rule_btn
:
eui
.
Button
;
public
rule_btn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Image
;
private
cutTimer
:
CutTimer
=
null
;
private
cutTimer
:
CutTimer
=
null
;
...
@@ -25,11 +27,37 @@ export default class HbCutTime extends Panel {
...
@@ -25,11 +27,37 @@ export default class HbCutTime extends Panel {
}
}
initUI
()
{
initUI
()
{
this
.
cutTimer
=
new
CutTimer
(
this
.
cutTimeLabel
,
'hh时mm分ss秒'
);
this
.
hbRainBaseInfo
();
if
(
!
this
.
cutTimer
.
start
(
6666666
)){
}
this
.
cutTimer
.
stop
();
this
.
cutTimer
.
start
(
6666666
);
private
hbRainBaseInfo
()
{
}
NetManager
.
ins
.
hbRainBaseInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
}
let
data
=
res
.
data
;
this
.
cutTimer
=
new
CutTimer
(
this
.
cutTimeLabel
,
'hh时mm分ss秒'
,
()
=>
this
.
hbRainBaseInfo
());
let
sysTime
=
res
.
timestamp
;
// 当前系统事件
let
time
;
if
(
data
.
currentSession
){
time
=
data
.
currentSession
.
endTime
-
sysTime
;
if
(
data
.
canJoin
){
this
.
ok_btn
.
source
=
'hbCutTime_btn_enable_png'
;
}
else
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_disable_png'
;
}
this
.
tipImage
.
source
=
'hbCutTime_cutLine_enable_png'
;
}
else
if
(
data
.
nextSession
)
{
time
=
data
.
nextSession
.
startTime
-
sysTime
;
this
.
ok_btn
.
source
=
'hbCutTime_btn_enable_png'
;
this
.
tipImage
.
source
=
'hbCutTime_cutLine_enable_png'
;
}
if
(
!
this
.
cutTimer
.
start
(
time
))
{
this
.
cutTimer
.
stop
();
this
.
cutTimer
.
start
(
time
);
}
})
}
}
protected
onSkinComplete
()
{
protected
onSkinComplete
()
{
...
@@ -42,7 +70,7 @@ export default class HbCutTime extends Panel {
...
@@ -42,7 +70,7 @@ export default class HbCutTime extends Panel {
this
.
rule_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
tapRuleBtn
,
this
);
this
.
rule_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
tapRuleBtn
,
this
);
}
}
private
tapRuleBtn
(){
private
tapRuleBtn
()
{
}
}
...
...
egret/src/panels/HongbaoRain/HbGame.ts
View file @
0ffc784b
...
@@ -8,6 +8,10 @@ import { DatapashData } from "../../../libs/tw/data/game/datapash/DatapashData";
...
@@ -8,6 +8,10 @@ import { DatapashData } from "../../../libs/tw/data/game/datapash/DatapashData";
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
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
Utils
from
"../../Utils"
;
/**
/**
* 红包雨主游戏
* 红包雨主游戏
...
@@ -70,14 +74,37 @@ export default class HbGame extends Panel {
...
@@ -70,14 +74,37 @@ export default class HbGame extends Panel {
// let session = DataManager.ins.getData(NetName.HBRAIN_BASEINFO).data.currentSession.sessionIndex;
// let session = DataManager.ins.getData(NetName.HBRAIN_BASEINFO).data.currentSession.sessionIndex;
let
session
=
1
;
let
session
=
1
;
NetManager
.
ins
.
hbRainDoJoin
((
success
,
res
)
=>
{
NetManager
.
ins
.
hbRainDoJoin
((
success
,
res
)
=>
{
// if(!success) {
// return;
// }
const
data
=
res
.
data
;
const
code
=
res
.
code
;
if
(
!
success
)
{
if
(
!
success
)
{
switch
(
true
)
{
case
(
code
==
"600015"
):
// 命中风控参与规则
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
break
;
case
(
code
==
"600016"
):
// 苏宁风控 命中
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
break
;
default
:
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
break
;
}
return
;
return
;
}
}
if
(
!
res
.
data
.
option
)
{
if
(
!
data
.
option
||
data
.
categoryType
==
1
)
{
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
}
else
{
}
else
{
PanelCtrl
.
instance
.
show
(
'
HbPrize'
);
PanelCtrl
.
instance
.
show
(
'
TurnPrizePanel'
,
data
);
}
}
// if(!res.data.option) {
// PanelCtrl.instance.show("HbNoPrize");
// } else {
// PanelCtrl.instance.show('TurnPrizePanel', res.data);
// }
},
session
,
this
.
score
);
},
session
,
this
.
score
);
}
}
...
...
egret/src/panels/HongbaoRain/HbPrize.ts
View file @
0ffc784b
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
getHomeData
from
"../../getHomeData"
;
import
{
changeMapScene
}
from
"../../startScene/StartScene"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
addAdComp
}
from
"../BoxPanel"
;
import
Utils
from
"../../Utils"
;
import
CutTimer
from
"../../CutTimer"
;
/**
/**
* 红包雨奖励
* 红包雨奖励
...
...
mock/happyclear/hbRainBaseInfo.json
View file @
0ffc784b
{
{
"code"
:
"0000000000"
,
"code"
:
"0000000000"
,
"data"
:
{
"data"
:
{
"canJoin"
:
tru
e
,
"canJoin"
:
fals
e
,
"currentRemainTimes"
:
1
,
"currentRemainTimes"
:
1
,
"currentSession"
:
{
"currentSession"
:
{
"endTime"
:
15729210
59355
,
"endTime"
:
15729210
6000
,
"sessionIndex"
:
1
,
"sessionIndex"
:
1
,
"startTime"
:
157292105
9355
"startTime"
:
157292105
000
},
},
"nextSession"
:
{
"nextSession"
:
{
"endTime"
:
15729210
59355
,
"endTime"
:
15729210
6000
,
"sessionIndex"
:
2
,
"sessionIndex"
:
2
,
"startTime"
:
157292105
9355
"startTime"
:
157292105
000
}
}
},
},
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"success"
:
true
,
"success"
:
true
,
"timestamp"
:
15729210
59357
"timestamp"
:
15729210
0000
}
}
\ 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