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
f1d60d1a
Commit
f1d60d1a
authored
Oct 14, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6c421aec
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
9 deletions
+34
-9
MapScene.ts
egret/src/mapScene/MapScene.ts
+6
-2
InviteCutTimePanel.ts
egret/src/panels/InviteCutTimePanel.ts
+9
-0
InvitePanel.ts
egret/src/panels/InvitePanel.ts
+9
-6
InvitePrizePanel.ts
egret/src/panels/InvitePrizePanel.ts
+9
-0
getInviteInfo.json
mock/happyclear/getInviteInfo.json
+1
-1
No files found.
egret/src/mapScene/MapScene.ts
View file @
f1d60d1a
...
@@ -21,6 +21,7 @@ import CountDown from "./CountDown";
...
@@ -21,6 +21,7 @@ import CountDown from "./CountDown";
import
AvatarComp
from
"./AvatarComp"
;
import
AvatarComp
from
"./AvatarComp"
;
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
tr
=
egret
.
sys
.
tr
;
import
tr
=
egret
.
sys
.
tr
;
import
{
GDispatcher
}
from
"../../libs/tc/util/GDispatcher"
;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
...
@@ -51,7 +52,7 @@ export default class MapScene extends Scene {
...
@@ -51,7 +52,7 @@ export default class MapScene extends Scene {
this
.
updateMyInfo
();
this
.
updateMyInfo
();
this
.
updateAdData
();
this
.
updateAdData
();
this
.
getInviteInfo
(
);
// 查询邀请信息,控制邀请有礼角标
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
// 查询邀请信息,控制邀请有礼角标
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -496,7 +497,7 @@ export default class MapScene extends Scene {
...
@@ -496,7 +497,7 @@ export default class MapScene extends Scene {
&&
timer
.
min
===
"00"
&&
timer
.
min
===
"00"
&&
timer
.
sec
===
"00"
)
{
&&
timer
.
sec
===
"00"
)
{
this
.
timer
.
stop
();
this
.
timer
.
stop
();
this
.
getInviteInfo
(
);
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
}
}
this
[
"inviteTips"
].
text
=
`
${
timer
.
hour
}
:
${
timer
.
min
}
:
${
timer
.
sec
}
`
;
this
[
"inviteTips"
].
text
=
`
${
timer
.
hour
}
:
${
timer
.
min
}
:
${
timer
.
sec
}
`
;
}
}
...
@@ -550,6 +551,9 @@ export default class MapScene extends Scene {
...
@@ -550,6 +551,9 @@ export default class MapScene extends Scene {
this
[
'recordBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'recordBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
window
.
location
.
href
=
window
[
'__link__'
]
window
.
location
.
href
=
window
[
'__link__'
]
},
this
);
},
this
);
// 消消乐查询信息
GDispatcher
.
addEvent
(
'getInviteInfo'
,
this
.
getInviteInfo
,
this
);
}
}
initSound
()
{
initSound
()
{
...
...
egret/src/panels/InviteCutTimePanel.ts
View file @
f1d60d1a
...
@@ -5,6 +5,7 @@ import getHomeData from "../getHomeData";
...
@@ -5,6 +5,7 @@ import getHomeData from "../getHomeData";
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
GDispatcher
}
from
"../../libs/tc/util/GDispatcher"
;
/**
/**
* 邀请规则面板
* 邀请规则面板
...
@@ -32,20 +33,28 @@ export default class InviteCutTimePanel extends Panel {
...
@@ -32,20 +33,28 @@ export default class InviteCutTimePanel extends Panel {
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
this
.
closeBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
}
onTouchTap_closeBtn
()
{
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
super
.
onTouchTap_closeBtn
();
}
onTouchOK
()
{
onTouchOK
()
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
changeMapScene
();
changeMapScene
();
super
.
hidePanel
();
super
.
hidePanel
();
return
;
return
;
}
}
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
}
}
...
...
egret/src/panels/InvitePanel.ts
View file @
f1d60d1a
...
@@ -5,6 +5,8 @@ import InviteRulePanel from "./InviteRulePanel";
...
@@ -5,6 +5,8 @@ import InviteRulePanel from "./InviteRulePanel";
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
import
{
GDispatcher
}
from
"../../libs/tc/util/GDispatcher"
;
export
default
class
InvitePanel
extends
Panel
{
export
default
class
InvitePanel
extends
Panel
{
public
prizeImg
:
eui
.
Image
;
public
prizeImg
:
eui
.
Image
;
...
@@ -36,13 +38,18 @@ export default class InvitePanel extends Panel {
...
@@ -36,13 +38,18 @@ export default class InvitePanel extends Panel {
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
// this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
helpBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapRule
,
this
);
this
.
helpBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapRule
,
this
);
}
}
onTouchTap_closeBtn
()
{
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
super
.
onTouchTap_closeBtn
();
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
// this['inviteBtn'].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
this
.
closeBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
helpBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapRule
,
this
);
this
.
helpBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapRule
,
this
);
}
}
...
@@ -54,10 +61,6 @@ export default class InvitePanel extends Panel {
...
@@ -54,10 +61,6 @@ export default class InvitePanel extends Panel {
this
.
addChild
(
rule
);
this
.
addChild
(
rule
);
}
}
onTapInvite
()
{
}
protected
onSkinComplete
()
{
protected
onSkinComplete
()
{
this
.
getGameRes
().
then
(
r
=>
this
.
initUI
());
this
.
getGameRes
().
then
(
r
=>
this
.
initUI
());
}
}
...
...
egret/src/panels/InvitePrizePanel.ts
View file @
f1d60d1a
...
@@ -3,6 +3,7 @@ import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
...
@@ -3,6 +3,7 @@ import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import
getHomeData
from
"../getHomeData"
;
import
getHomeData
from
"../getHomeData"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
GDispatcher
}
from
"../../libs/tc/util/GDispatcher"
;
/**
/**
* 邀请规则面板
* 邀请规则面板
...
@@ -28,22 +29,30 @@ export default class InvitePrizePanel extends Panel {
...
@@ -28,22 +29,30 @@ export default class InvitePrizePanel extends Panel {
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapGoPrize
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapGoPrize
,
this
);
this
.
game_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
game_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
this
.
closeBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapGoPrize
,
this
);
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapGoPrize
,
this
);
this
.
game_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
game_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
}
onTouchTap_closeBtn
()
{
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
super
.
onTouchTap_closeBtn
();
}
onTouchOK
()
{
onTouchOK
()
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
changeMapScene
();
changeMapScene
();
super
.
hidePanel
();
super
.
hidePanel
();
return
;
return
;
}
}
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
}
}
...
...
mock/happyclear/getInviteInfo.json
View file @
f1d60d1a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"avatar"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
"avatar"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
}
}
],
],
"completeFlag"
:
1
,
"completeFlag"
:
0
,
"openPrizeMsg"
:
"图片"
,
"openPrizeMsg"
:
"图片"
,
"prizeType"
:
"nickname"
,
"prizeType"
:
"nickname"
,
"prizeName"
:
"nickname"
,
"prizeName"
:
"nickname"
,
...
...
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