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
0d9939f2
Commit
0d9939f2
authored
Nov 27, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cd469f27
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
38 deletions
+33
-38
MainBase.ts
egret/libs/new_wx/MainBase.ts
+4
-1
TaskCenterPrizeSkin.exml
egret/resource/skins/TaskCenterPrizeSkin.exml
+4
-11
TaskCenter.ts
egret/src/panels/TaskCenter/TaskCenter.ts
+13
-8
TaskCenterPrize.ts
egret/src/panels/TaskCenter/TaskCenterPrize.ts
+10
-16
hbRainBaseInfo.json
mock/happyclear/hbRainBaseInfo.json
+2
-2
No files found.
egret/libs/new_wx/MainBase.ts
View file @
0d9939f2
...
...
@@ -42,7 +42,6 @@ import BloodPanel2 from "../../src/panels/BloodPanel2";
import
ExchangePanel
from
"../../src/panels/ExchangePanel"
;
import
{
initstatistics
}
from
"../../src/statistics"
;
import
ADPanel
from
"../../src/panels/ADPanel"
;
import
TaskPanel
from
"../../src/panels/TaskPanel"
;
import
TaskPrizePanel
from
"../../src/panels/TaskPrizePanel"
;
import
BackPanel
from
"../../src/panels/BackPanel"
;
import
InvitePanel
from
"../../src/panels/InvitePanel"
;
...
...
@@ -74,6 +73,7 @@ import { GFun } from "../tc/util/GFun";
import
TaskCenter
from
"../../src/panels/TaskCenter/TaskCenter"
;
import
TaskCenterPrize
from
"../../src/panels/TaskCenter/TaskCenterPrize"
;
import
TaskCenterNoPrize
from
"../../src/panels/TaskCenter/TaskCenterNoPrize"
;
import
{
GDispatcher
}
from
"../tc/util/GDispatcher"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
...
...
@@ -526,11 +526,14 @@ export default class MainBase extends eui.UILayer {
},
window
[
'collectRuleId'
]);
// }
GDispatcher
.
dispatchEvent
(
'docVisible'
);
// 触发document显示事件
}
if
(
document
.
visibilityState
==
"hidden"
)
{
stopBg
();
stopGamebg
();
GDispatcher
.
dispatchEvent
(
'docHide'
);
// 触发document隐藏事件
}
})
...
...
egret/resource/skins/TaskCenterPrizeSkin.exml
View file @
0d9939f2
...
...
@@ -12,20 +12,13 @@
</e:skinName>
</e:Button>
<e:Image
id=
"img"
y=
"375.77"
touchEnabled=
"true"
width=
"512"
height=
"240"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"0"
source=
"{data.url}"
visible=
"false"
/>
<e:Image
id=
"money"
y=
"366.4"
horizontalCenter=
"
0
.5"
scaleX=
"0.7"
scaleY=
"0.7"
source=
"common_money_png"
/>
<e:Label
id=
"propnums2"
text=
"30"
textColor=
"0x885037"
bold=
"true"
y=
"52
7.64"
width=
"75"
textAlign=
"right"
x=
"282
.6"
fontFamily=
"FZY3JW"
/>
<e:Image
id=
"money"
y=
"366.4"
horizontalCenter=
"
5
.5"
scaleX=
"0.7"
scaleY=
"0.7"
source=
"common_money_png"
/>
<e:Label
id=
"propnums2"
text=
"30"
textColor=
"0x885037"
bold=
"true"
y=
"52
6.64"
width=
"75"
textAlign=
"right"
x=
"287
.6"
fontFamily=
"FZY3JW"
/>
<e:Image
id=
"blood"
y=
"368.16"
horizontalCenter=
"0"
source=
"common_blood_png"
scaleX=
"0.7"
scaleY=
"0.7"
visible=
"false"
/>
<e:Group
id=
"numsgroup"
x=
"396.38"
y=
"378.12"
visible=
"false"
>
<e:Image
id=
"numsbg"
source=
"signprize_numsbg_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"nums"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"FZY3JW"
/>
</e:Group>
<e:Label
id=
"tipsLabel"
text=
"继续完成任务可以获得更多元宝哦~"
y=
"632.73"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"26"
horizontalCenter=
"0"
/>
<e:Button
id=
"close2Btn"
label=
""
y=
"676.73"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"TaskCenterGame_png"
source.down=
"TaskCenterGame_png"
source.disabled=
"TaskCenterGame_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image
id=
"btn"
y=
"676"
source=
"TaskCenterGame_png"
horizontalCenter=
"0"
/>
</e:Skin>
egret/src/panels/TaskCenter/TaskCenter.ts
View file @
0d9939f2
...
...
@@ -2,6 +2,7 @@ import Panel from "../../../libs/new_wx/components/Panel";
import
getSkinPath
from
"../../../libs/new_wx/utils/getSkinPath"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
export
default
class
TaskCenter
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
...
...
@@ -9,13 +10,12 @@ export default class TaskCenter extends Panel {
public
list
:
eui
.
List
;
onShowAnim
()
{
let
canvasW
=
750
/
window
.
innerWidth
*
window
.
innerWidth
;
let
canvasH
=
750
/
window
.
innerWidth
*
window
.
innerHeight
;
//
console.log('canvasW:' + canvasW + '\tcanvasH:' + canvasH)
;
console
.
log
({
canvasW
:
canvasW
,
canvasH
:
canvasH
});
//
let canvasW = 750 / window.innerWidth * window.innerWidth
;
//
console.log({
//
canvasW: canvasW,
//
canvasH: canvasH
//
});
egret
.
Tween
.
get
(
this
).
set
({
y
:
canvasH
}).
to
({
y
:
canvasH
-
710
},
300
,
egret
.
Ease
.
quadInOut
);
}
...
...
@@ -24,6 +24,7 @@ export default class TaskCenter extends Panel {
this
.
list
.
useVirtualLayout
=
false
;
this
.
list
.
itemRenderer
=
TaskCenterItem
;
this
.
getTaskInfo
();
GDispatcher
.
addEvent
(
'docVisible'
,
this
.
getTaskInfo
,
this
);
}
private
getTaskInfo
()
{
...
...
@@ -33,13 +34,12 @@ export default class TaskCenter extends Panel {
}
const
data
=
res
.
data
;
this
.
list
.
dataProvider
=
new
eui
.
ArrayCollection
(
data
);
new
eui
.
ArrayCollection
(
data
);
});
}
onTouchTap_closeBtn
()
{
// let canvasW = 750 / window.innerWidth * window.innerWidth;
let
canvasH
=
750
/
window
.
innerWidth
*
window
.
innerHeight
;
// console.log('canvasW:' + canvasW + 'canvasH:' + canvasH);
egret
.
Tween
.
get
(
this
).
to
({
y
:
canvasH
},
300
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
super
.
onTouchTap_closeBtn
();
});
...
...
@@ -48,6 +48,11 @@ export default class TaskCenter extends Panel {
get
skinKey
()
{
return
'TaskCenter'
}
destroy
()
{
super
.
destroy
();
GDispatcher
.
removeEvent
(
'docVisible'
,
this
.
getTaskInfo
,
this
);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
...
...
egret/src/panels/TaskCenter/TaskCenterPrize.ts
View file @
0d9939f2
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
import
{
addAdComp
}
from
"../BoxPanel"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
TaskCenterPrize
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
img
:
eui
.
Image
;
public
money
:
eui
.
Image
;
public
propnums2
:
eui
.
Label
;
public
blood
:
eui
.
Image
;
public
numsgroup
:
eui
.
Group
;
public
numsbg
:
eui
.
Image
;
public
nums
:
eui
.
Label
;
public
tipsLabel
:
eui
.
Label
;
public
close2Btn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
img
:
eui
.
Image
;
public
money
:
eui
.
Image
;
public
propnums2
:
eui
.
Label
;
public
blood
:
eui
.
Image
;
public
numsgroup
:
eui
.
Group
;
public
numsbg
:
eui
.
Image
;
public
nums
:
eui
.
Label
;
public
tipsLabel
:
eui
.
Label
;
public
btn
:
eui
.
Image
;
start
(
data
)
{
super
.
start
();
...
...
@@ -65,8 +63,4 @@ export default class TaskCenterPrize extends Panel {
get
skinKey
()
{
return
'TaskCenterPrize'
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
],
this
[
'close2Btn'
]]
}
}
\ No newline at end of file
mock/happyclear/hbRainBaseInfo.json
View file @
0d9939f2
...
...
@@ -8,13 +8,13 @@
"currentSession"
:
{
"sessionIndex"
:
6
,
"startTime"
:
1573210800000
,
"endTime"
:
15732
108
03000
,
"endTime"
:
15732
999
03000
,
"limitScore"
:
10
},
"nextSession"
:
{
"sessionIndex"
:
10
,
"startTime"
:
1573440915952
,
"endTime"
:
1573
440915952
,
"endTime"
:
1573
299903000
,
"limitScore"
:
10
},
"canJoin"
:
true
...
...
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