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
a75a4ffc
Commit
a75a4ffc
authored
Oct 30, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e929f92f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
22 deletions
+2
-22
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+2
-3
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+0
-19
No files found.
egret/src/mapScene/icon/ScratchIcon.ts
View file @
a75a4ffc
...
...
@@ -72,17 +72,16 @@ export default class ScratchIcon extends IconBase {
return
;
}
let
status
=
res
.
data
.
taskStatus
;
let
data
=
Utils
.
deepClone
(
res
.
data
);
switch
(
true
)
{
case
(
status
==
0
):
// 当前无任务(一般icon不会出现),拦截
break
;
case
(
status
==
1
):
// 当前任务进行中 打开任务面板
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
// await wait(100);
let
data
=
Utils
.
deepClone
(
res
.
data
);
data
.
mv
=
mv
;
PanelCtrl
.
instance
.
show
(
'scratch'
,
data
);
});
// PanelCtrl.instance.show('scratch', res.data);
break
;
case
(
status
==
2
):
// 当前任务完成待领奖 请求领奖接口
NetManager
.
ins
.
scratchTakePrize
((
success
,
res
)
=>
{
...
...
@@ -92,7 +91,7 @@ export default class ScratchIcon extends IconBase {
}
return
;
}
PanelCtrl
.
instance
.
show
(
"scratchPrize"
,
res
.
data
);
PanelCtrl
.
instance
.
show
(
"scratchPrize"
,
data
);
},
res
.
data
.
scratchCardTaskId
);
break
;
...
...
egret/src/panels/ScratchPanel.ts
View file @
a75a4ffc
...
...
@@ -188,25 +188,6 @@ export default class ScratchPanel extends Panel {
let
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
let
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
let
i
=
new
eui
.
Image
();
// if(progress >= 100) {
// this["scratch_progress"].visible = false;
// } else if(progress >= 98 && progress < 100) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_98_png";
// } else if(progress >= 96 && progress < 98) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_96_png";
// } else if(progress >= 94 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_94_png";
// } else if(progress >= 92 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_92_png";
// } else if(progress < 92) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_90_png";
// }
}
private
setWXShareTip
()
{
...
...
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