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
ae5288ab
Commit
ae5288ab
authored
Oct 24, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1fa2f64c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
103 deletions
+116
-103
ScratchSkin.exml
egret/resource/skins/ScratchSkin.exml
+9
-10
Utils.ts
egret/src/Utils.ts
+16
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+7
-1
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+84
-92
No files found.
egret/resource/skins/ScratchSkin.exml
View file @
ae5288ab
...
...
@@ -6,7 +6,7 @@
<e:Image
id=
"light1"
x=
"376"
y=
"317"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
source=
"scratchbg2_png"
/>
<e:Image
y=
"259.33"
source=
"scratch_bg_png"
horizontalCenter=
"0"
/>
<e:Group
id=
"con"
y=
"-67"
/>
<e:Label
text=
"共2位好友帮你刮了90.3%"
y=
"381.33"
textColor=
"0xF54500"
size=
"28"
horizontalCenter=
"0"
fontFamily=
"Lucida Family"
verticalAlign=
"middle"
textAlign=
"center"
/>
<e:Label
id=
"numLabel"
text=
"共2位好友帮你刮了90.3%"
y=
"381.33"
textColor=
"0xF54500"
size=
"28"
horizontalCenter=
"0"
fontFamily=
"Lucida Family"
verticalAlign=
"middle"
textAlign=
"center"
/>
<e:Image
id=
"prizeImg"
y=
"439.33"
horizontalCenter=
"0.5"
source=
""
width=
"510"
height=
"228"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"605"
y=
"219.33"
>
<e:skinName>
...
...
@@ -25,9 +25,8 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"numLabel"
text=
"仅差3人可获得"
y=
"679.33"
textColor=
"0xf54500"
size=
"28"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"883.33"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0"
/>
<e:Scroller
width=
"487"
height=
"90"
y=
"775"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"32.5"
>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"895.33"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0.5"
/>
<e:Scroller
width=
"487"
height=
"90"
y=
"783"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"32.5"
>
<e:Group
anchorOffsetX=
"0"
y=
"2"
>
<e:List
id=
"list"
x=
"0"
y=
"0"
anchorOffsetX=
"0"
>
<e:layout>
...
...
@@ -43,13 +42,13 @@
<e:Rect
fillAlpha=
"0.7"
left=
"0"
top=
"0"
right=
"0"
bottom=
"0"
/>
<e:Image
x=
"424"
y=
"0"
source=
"scratch_wx_tip_png"
/>
</e:Group>
<e:Group
x=
"1
33"
y=
"711"
width=
"437"
height=
"22
"
>
<e:Image
id=
"progressMask"
source=
"scratch_progress_bg_png"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"0
"
verticalCenter=
"0"
/>
<e:Group
id=
"progressGroup"
horizontalCenter=
"0
"
verticalCenter=
"0"
>
<e:Group
x=
"1
24"
y=
"692"
width=
"506"
height=
"57"
anchorOffsetX=
"0"
anchorOffsetY=
"0
"
>
<e:Image
id=
"progressMask"
source=
"scratch_progress_bg_png"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
x=
"7
"
verticalCenter=
"0"
/>
<e:Group
id=
"progressGroup"
x=
"8
"
verticalCenter=
"0"
>
<e:Image
id=
"progressBg"
source=
"scratch_progress_bg_png"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
x=
"0"
y=
"0"
width=
"437"
height=
"22"
/>
<e:Rect
id=
"progress"
fillColor=
"0xeb1917"
left=
"0"
verticalCenter=
"0"
width=
"
99"
height=
"22
"
/>
<e:Label
text=
"仅剩90.7%"
size=
"18"
verticalCenter=
"0"
horizontalCenter=
"0"
/>
<e:Rect
id=
"progress"
fillColor=
"0xeb1917"
left=
"0"
verticalCenter=
"0"
width=
"
0"
top=
"0"
bottom=
"0
"
/>
<e:Label
id=
"progressLabel"
text=
"仅剩90.7%"
size=
"18"
verticalCenter=
"0"
horizontalCenter=
"0"
/>
</e:Group>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
<e:Image
id=
"hongbao"
x=
"586"
y=
"697"
source=
"scratch_hongbao_png"
/>
</e:Skin>
\ No newline at end of file
egret/src/Utils.ts
View file @
ae5288ab
...
...
@@ -28,6 +28,22 @@ export default class Utils {
return
this
.
getRequest
()[
key
];
}
/**
* 时间戳转几时几分几秒
* @param time 时间戳
*/
public
static
convertTime
(
time
:
number
)
{
let
hour
=
~~
(
time
/
3600000
);
// 小时
let
min
=
~~
((
time
-
hour
*
3600000
)
/
60000
);
// 分
let
sec
=
~~
((
time
-
hour
*
3600000
-
min
*
60000
)
/
1000
);
// 秒
return
{
hour
:
Utils
.
prefixInteger
(
hour
,
2
),
min
:
Utils
.
prefixInteger
(
min
,
2
),
sec
:
Utils
.
prefixInteger
(
sec
,
2
)
}
}
/**
* 数字补0
* @param num 数字
...
...
egret/src/mapScene/MapScene.ts
View file @
ae5288ab
...
...
@@ -70,7 +70,13 @@ export default class MapScene extends Scene {
async
start
(
data
?)
{
// PanelCtrl.instance.show('scratch');
NetManager
.
ins
.
getInviteInfo
((
success
,
res
)
=>
{
if
(
!
success
){
}
PanelCtrl
.
instance
.
show
(
'scratch'
,
res
.
data
);
});
super
.
start
();
this
.
sendInvite
();
...
...
egret/src/panels/ScratchPanel.ts
View file @
ae5288ab
This diff is collapsed.
Click to expand it.
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