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
d492d1f2
Commit
d492d1f2
authored
Mar 19, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
口令化
parent
e266d867
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
InviteSkin.exml
egret/resource/skins/InviteSkin.exml
+1
-1
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+4
-2
scratchGetTaskInfo.json
mock/happyclear/scratchGetTaskInfo.json
+3
-3
No files found.
egret/resource/skins/InviteSkin.exml
View file @
d492d1f2
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<e:Image
id=
"light1"
source=
"invitebg2_png"
x=
"376"
y=
"317"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
/>
<e:Image
id=
"light1"
source=
"invitebg2_png"
x=
"376"
y=
"317"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
/>
<e:Image
y=
"241.33"
horizontalCenter=
"0"
source=
"invite_bg_png"
/>
<e:Image
y=
"241.33"
horizontalCenter=
"0"
source=
"invite_bg_png"
/>
<e:Group
id=
"con"
y=
"-67"
/>
<e:Group
id=
"con"
y=
"-67"
/>
<e:Label
text=
"邀请
好友
闯关可得现金券!"
y=
"381.33"
textColor=
"0xF54500"
size=
"28"
horizontalCenter=
"0"
fontFamily=
"FZY3JW"
/>
<e:Label
text=
"邀请
新玩家
闯关可得现金券!"
y=
"381.33"
textColor=
"0xF54500"
size=
"28"
horizontalCenter=
"0"
fontFamily=
"FZY3JW"
/>
<e:Image
id=
"prizeImg"
y=
"439.33"
horizontalCenter=
"0.5"
source=
""
width=
"510"
height=
"228"
/>
<e:Image
id=
"prizeImg"
y=
"439.33"
horizontalCenter=
"0.5"
source=
""
width=
"510"
height=
"228"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"605"
y=
"227.33"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"605"
y=
"227.33"
>
<e:skinName>
<e:skinName>
...
...
egret/src/panels/ScratchPanel.ts
View file @
d492d1f2
...
@@ -140,7 +140,7 @@ export default class ScratchPanel extends Panel {
...
@@ -140,7 +140,7 @@ export default class ScratchPanel extends Panel {
this
.
data
.
avatarList
.
push
(
"scratch_invite_png"
);
this
.
data
.
avatarList
.
push
(
"scratch_invite_png"
);
}
}
// 添加假用户
// 添加假用户
this
.
data
.
avatarList
.
unshift
(
"scratch_user1_png"
,
"scratch_user2_png"
);
//
this.data.avatarList.unshift("scratch_user1_png", "scratch_user2_png");
// 创建渲染列表
// 创建渲染列表
let
rendererList
=
[];
let
rendererList
=
[];
...
@@ -182,7 +182,9 @@ export default class ScratchPanel extends Panel {
...
@@ -182,7 +182,9 @@ export default class ScratchPanel extends Panel {
progress
=
0
;
progress
=
0
;
}
}
this
[
'numLabel'
].
textFlow
=
(
new
HtmlTextParser
).
parser
(
`共<b>
${
2
+
this
.
data
.
helpedCount
}
</b>位好友帮你刮了<b>
${
progress
.
toFixed
(
2
)}
</b>%`
);
this
[
'numLabel'
].
textFlow
=
(
new
HtmlTextParser
).
parser
(
`再邀请
${
this
.
data
.
totalNeedCount
-
this
.
data
.
helpedCount
}
位好友助力可得现金券`
);
this
[
"progressLabel"
].
textFlow
=
(
new
HtmlTextParser
).
parser
(
`仅剩<b>
${(
100
-
progress
).
toFixed
(
2
)}
</b>%`
);
// 进度条文字
this
[
"progressLabel"
].
textFlow
=
(
new
HtmlTextParser
).
parser
(
`仅剩<b>
${(
100
-
progress
).
toFixed
(
2
)}
</b>%`
);
// 进度条文字
let
_width
=
this
[
"progressBg"
].
width
*
progress
/
100
;
// 宽度
let
_width
=
this
[
"progressBg"
].
width
*
progress
/
100
;
// 宽度
let
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
let
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
...
...
mock/happyclear/scratchGetTaskInfo.json
View file @
d492d1f2
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
"prizeImage"
:
"//yun.dui88.com/images/201910/gxqaecxymq.jpg"
,
"prizeImage"
:
"//yun.dui88.com/images/201910/gxqaecxymq.jpg"
,
"currentTime"
:
1572427313215
,
"currentTime"
:
1572427313215
,
"endTime"
:
1572513706000
,
"endTime"
:
1572513706000
,
"completePercent"
:
"9
9
"
,
"completePercent"
:
"9
0
"
,
"remainPercent"
:
"9.0"
,
"remainPercent"
:
"9.0"
,
"totalNeedCount"
:
1
,
"totalNeedCount"
:
3
,
"helpedCount"
:
0
,
"helpedCount"
:
1
,
"avatarList"
:
[]
"avatarList"
:
[]
}
}
}
}
\ 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