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
57adc7c2
Commit
57adc7c2
authored
Nov 28, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0d9939f2
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
108 additions
and
67 deletions
+108
-67
TaskCenterBuy.png
egret/resource/assets/TaskCenterPanel/TaskCenterBuy.png
+0
-0
TaskCenterGame.png
egret/resource/assets/TaskCenterPanel/TaskCenterGame.png
+0
-0
TaskCenterShop.png
egret/resource/assets/TaskCenterPanel/TaskCenterShop.png
+0
-0
TaskCenterWatch.png
egret/resource/assets/TaskCenterPanel/TaskCenterWatch.png
+0
-0
TaskCenter_btn.png
egret/resource/assets/TaskCenterPanel/TaskCenter_btn.png
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
MapSkin.exml
egret/resource/skins/MapSkin.exml
+4
-4
TaskCenterNoPrizeSkin.exml
egret/resource/skins/TaskCenterNoPrizeSkin.exml
+12
-33
TaskCenterPrizeSkin.exml
egret/resource/skins/TaskCenterPrizeSkin.exml
+4
-1
TaskCenterSkin.exml
egret/resource/skins/TaskCenterSkin.exml
+6
-2
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+1
-1
TaskCenterIcon.ts
egret/src/mapScene/icon/TaskCenterIcon.ts
+13
-1
TurntableIcon.ts
egret/src/mapScene/icon/TurntableIcon.ts
+6
-0
TaskCenter.ts
egret/src/panels/TaskCenter/TaskCenter.ts
+15
-10
TaskCenterNoPrize.ts
egret/src/panels/TaskCenter/TaskCenterNoPrize.ts
+30
-4
TaskCenterPrize.ts
egret/src/panels/TaskCenter/TaskCenterPrize.ts
+11
-10
No files found.
egret/resource/assets/TaskCenterPanel/TaskCenterBuy.png
deleted
100644 → 0
View file @
0d9939f2
26.2 KB
egret/resource/assets/TaskCenterPanel/TaskCenterGame.png
deleted
100644 → 0
View file @
0d9939f2
27 KB
egret/resource/assets/TaskCenterPanel/TaskCenterShop.png
deleted
100644 → 0
View file @
0d9939f2
27.7 KB
egret/resource/assets/TaskCenterPanel/TaskCenterWatch.png
deleted
100644 → 0
View file @
0d9939f2
28.6 KB
egret/resource/assets/TaskCenterPanel/TaskCenter_btn.png
0 → 100644
View file @
57adc7c2
20.6 KB
egret/resource/default.res.json
View file @
57adc7c2
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
"name"
:
"redbombtips"
"name"
:
"redbombtips"
},
},
{
{
"keys"
:
"TaskCenter_getPrizeBtn_png,TaskCenter_goTaskBtn_png,TaskCenter_bg_png,TaskCenter_taskBg_png,TaskCenterBuy_png,TaskCenterShop_png,TaskCenterGame_png,TaskCenterWatch_png,TaskCenter_doneBtn_png"
,
"keys"
:
"TaskCenter_getPrizeBtn_png,TaskCenter_goTaskBtn_png,TaskCenter_bg_png,TaskCenter_taskBg_png,TaskCenterBuy_png,TaskCenterShop_png,TaskCenterGame_png,TaskCenterWatch_png,TaskCenter_doneBtn_png
,TaskCenter_btn_png
"
,
"name"
:
"taskcenter"
"name"
:
"taskcenter"
},
},
{
{
...
@@ -3690,6 +3690,11 @@
...
@@ -3690,6 +3690,11 @@
"url"
:
"assets/sign/sign_quan36.png"
,
"url"
:
"assets/sign/sign_quan36.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"sign_quan36_png"
"name"
:
"sign_quan36_png"
},
{
"url"
:
"assets/TaskCenterPanel/TaskCenter_btn.png"
,
"type"
:
"image"
,
"name"
:
"TaskCenter_btn_png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
57adc7c2
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Button
id=
"recordBtn"
label=
""
x=
"606.14"
y=
"17
4.01
"
>
<e:Button
id=
"recordBtn"
label=
""
x=
"606.14"
y=
"17
5
"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"recordbtn_png"
source.down=
"recordbtn_png"
source.disabled=
"recordbtn_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"recordbtn_png"
source.down=
"recordbtn_png"
source.disabled=
"recordbtn_png"
/>
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<e:Label
id=
"inviteTips"
text=
"立即到账"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xffffff"
size=
"18"
fontFamily=
"FZY3JW"
/>
<e:Label
id=
"inviteTips"
text=
"立即到账"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xffffff"
size=
"18"
fontFamily=
"FZY3JW"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
<e:Group
id=
"turnTableGroup"
x=
"564.5"
y=
"47
4.01
"
anchorOffsetX=
"0"
width=
"159"
>
<e:Group
id=
"turnTableGroup"
x=
"564.5"
y=
"47
5
"
anchorOffsetX=
"0"
width=
"159"
>
<e:Button
id=
"turnTableBtn"
label=
""
x=
"33.36"
y=
"0"
>
<e:Button
id=
"turnTableBtn"
label=
""
x=
"33.36"
y=
"0"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
<e:Label
id=
"turnTableTips"
text=
"立即到"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xFFFFFF"
size=
"18"
fontFamily=
"FZY3JW"
/>
<e:Label
id=
"turnTableTips"
text=
"立即到"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xFFFFFF"
size=
"18"
fontFamily=
"FZY3JW"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
<e:Group
id=
"scratchGroup"
y=
"631
.01
"
right=
"27"
>
<e:Group
id=
"scratchGroup"
y=
"631"
right=
"27"
>
<e:Button
id=
"scratchBtn"
label=
""
y=
"0"
x=
"-5.32"
>
<e:Button
id=
"scratchBtn"
label=
""
y=
"0"
x=
"-5.32"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
<e:Label
id=
"scratchTips"
text=
"立即到"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xFFFFFF"
size=
"18"
fontFamily=
"FZY3JW"
/>
<e:Label
id=
"scratchTips"
text=
"立即到"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xFFFFFF"
size=
"18"
fontFamily=
"FZY3JW"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
<e:Group
id=
"taskGroup"
y=
"32
4.96
"
right=
"30"
>
<e:Group
id=
"taskGroup"
y=
"32
5
"
right=
"30"
>
<e:Button
id=
"taskBtn"
label=
""
y=
"0"
>
<e:Button
id=
"taskBtn"
label=
""
y=
"0"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
...
...
egret/resource/skins/TaskCenterNoPrizeSkin.exml
View file @
57adc7c2
...
@@ -11,51 +11,30 @@
...
@@ -11,51 +11,30 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Group
id=
"duibaGroup"
width=
"400"
height=
"621"
horizontalCenter=
"0"
top=
"360"
>
<e:Group
id=
"duibaGroup"
horizontalCenter=
"0"
top=
"360"
visible=
"false"
>
<e:Button
id=
"duibaBtn"
label=
""
y=
"508"
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:Label
text=
"啊哦,奖励擦肩而过…"
y=
"0"
textColor=
"0xf54500"
fontFamily=
"FZY3JW"
size=
"40"
horizontalCenter=
"0"
/>
<e:Label
text=
"啊哦,奖励擦肩而过…"
y=
"0"
textColor=
"0xf54500"
fontFamily=
"FZY3JW"
size=
"40"
horizontalCenter=
"0"
/>
</e:Group>
</e:Group>
<e:Group
id=
"shopGroup"
width=
"400"
height=
"621"
horizontalCenter=
"0"
top=
"360"
visible=
"false"
>
<e:Group
id=
"shopGroup"
horizontalCenter=
"0"
top=
"360"
>
<e:Button
id=
"shopBtn"
label=
""
y=
"508"
horizontalCenter=
"0"
>
<e:Label
text=
"继续逛逛店铺,还可以获得更多奖励哦~"
y=
"20"
fontFamily=
"FZY3JW"
size=
"28"
horizontalCenter=
"0"
x=
"10"
textColor=
"0xfb6300"
/>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"TaskCenterShop_png"
source.down=
"TaskCenterShop_png"
source.disabled=
"TaskCenterShop_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
text=
"继续浏逛逛店铺,还可以获得更多奖励哦~"
y=
"20"
fontFamily=
"FZY3JW"
size=
"28"
horizontalCenter=
"0"
x=
"10"
textColor=
"0xfb6300"
/>
<e:Label
text=
"换个姿势,再来一次!"
y=
"-40"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"46"
horizontalCenter=
"0"
x=
"-30"
scaleX=
"1"
scaleY=
"1"
/>
<e:Label
text=
"换个姿势,再来一次!"
y=
"-40"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"46"
horizontalCenter=
"0"
x=
"-30"
scaleX=
"1"
scaleY=
"1"
/>
</e:Group>
</e:Group>
<e:Group
id=
"watchGroup"
width=
"400"
height=
"621"
horizontalCenter=
"0"
top=
"360"
visible=
"false"
>
<e:Group
id=
"watchGroup"
horizontalCenter=
"0"
top=
"360"
visible=
"false"
>
<e:Label
text=
"换个姿势,再来一次!"
y=
"-40"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"46"
horizontalCenter=
"0"
/>
<e:Label
text=
"换个姿势,再来一次!"
y=
"-40"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"46"
horizontalCenter=
"0"
/>
<e:Label
text=
"继续浏览商品,还可以获得更多奖励哦~"
y=
"20"
fontFamily=
"FZY3JW"
size=
"28"
horizontalCenter=
"0"
x=
"10"
textColor=
"0xfb6300"
/>
<e:Label
text=
"继续浏览商品,还可以获得更多奖励哦~"
y=
"20"
fontFamily=
"FZY3JW"
size=
"28"
horizontalCenter=
"0"
x=
"10"
textColor=
"0xfb6300"
/>
<e:Button
id=
"watchBtn"
label=
""
y=
"508"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"TaskCenterWatch_png"
source.down=
"TaskCenterWatch_png"
source.disabled=
"TaskCenterWatch_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
</e:Group>
<e:Group
id=
"buyGroup"
width=
"400"
height=
"621"
horizontalCenter=
"0"
top=
"360"
visible=
"false"
>
<e:Group
id=
"buyGroup"
horizontalCenter=
"0"
top=
"360"
visible=
"false"
>
<e:Label
text=
"换个姿势,再来一次!"
y=
"-40"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"46"
horizontalCenter=
"0"
/>
<e:Label
text=
"换个姿势,再来一次!"
y=
"-40"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"46"
horizontalCenter=
"0"
/>
<e:Label
text=
"继续下单还可以获得更多奖励哦~"
y=
"20"
fontFamily=
"FZY3JW"
size=
"28"
horizontalCenter=
"0"
x=
"10"
textColor=
"0xfb6300"
/>
<e:Label
text=
"继续下单还可以获得更多奖励哦~"
y=
"20"
fontFamily=
"FZY3JW"
size=
"28"
horizontalCenter=
"0"
x=
"10"
textColor=
"0xfb6300"
/>
<e:Button
id=
"buyBtn"
label=
""
y=
"508"
horizontalCenter=
"0"
>
</e:Group>
<e:Group
id=
"btn"
x=
"196"
y=
"875"
width=
"358"
height=
"113"
>
<e:Button
label=
""
y=
"0"
x=
"0"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"TaskCenter
Buy_png"
source.down=
"TaskCenterBuy_png"
source.disabled=
"TaskCenterBuy
_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"TaskCenter
_btn_png"
source.down=
"TaskCenter_btn_png"
source.disabled=
"TaskCenter_btn
_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Label
id=
"btnLabel"
text=
"继续闯关"
y=
"29"
size=
"42"
strokeColor=
"0x2091e9"
stroke=
"3"
horizontalCenter=
"0"
fontFamily=
"FZY3JW"
/>
</e:Group>
</e:Group>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/TaskCenterPrizeSkin.exml
View file @
57adc7c2
...
@@ -20,5 +20,8 @@
...
@@ -20,5 +20,8 @@
<e:Label
id=
"nums"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"FZY3JW"
/>
<e:Label
id=
"nums"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"FZY3JW"
/>
</e:Group>
</e:Group>
<e:Label
id=
"tipsLabel"
text=
"继续完成任务可以获得更多元宝哦~"
y=
"632.73"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"26"
horizontalCenter=
"0"
/>
<e:Label
id=
"tipsLabel"
text=
"继续完成任务可以获得更多元宝哦~"
y=
"632.73"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"26"
horizontalCenter=
"0"
/>
<e:Image
id=
"btn"
y=
"676"
source=
"TaskCenterGame_png"
horizontalCenter=
"0"
/>
<e:Group
id=
"btn"
x=
"214"
y=
"690"
>
<e:Image
y=
"0"
source=
"TaskCenter_btn_png"
scaleX=
"0.9"
scaleY=
"0.9"
x=
"0"
/>
<e:Label
id=
"btnLabel"
text=
"继续闯关"
y=
"27"
size=
"35"
strokeColor=
"0x2091e9"
stroke=
"3"
fontFamily=
"FZY3JW"
x=
"91"
/>
</e:Group>
</e:Skin>
</e:Skin>
egret/resource/skins/TaskCenterSkin.exml
View file @
57adc7c2
...
@@ -11,9 +11,13 @@
...
@@ -11,9 +11,13 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Scroller
id=
"taskScroller"
width=
"674"
height=
"522.34"
y=
"170.81"
horizontalCenter=
"0"
anchorOffsetY=
"0"
>
<e:Scroller
width=
"674"
height=
"522.34"
y=
"170.81"
horizontalCenter=
"0"
anchorOffsetY=
"0"
>
<e:Group
anchorOffsetX=
"0"
width=
"222.73"
anchorOffsetY=
"0"
height=
"525"
>
<e:Group
anchorOffsetX=
"0"
width=
"222.73"
anchorOffsetY=
"0"
height=
"525"
>
<e:List
id=
"list"
left=
"0"
right=
"0"
horizontalCenter=
"0"
y=
"0"
/>
<e:List
id=
"list"
left=
"0"
right=
"0"
horizontalCenter=
"0"
y=
"0"
>
<e:layout>
<e:VerticalLayout
gap=
"22"
/>
</e:layout>
</e:List>
</e:Group>
</e:Group>
</e:Scroller>
</e:Scroller>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/icon/ScratchIcon.ts
View file @
57adc7c2
...
@@ -20,7 +20,7 @@ export default class ScratchIcon extends IconBase {
...
@@ -20,7 +20,7 @@ export default class ScratchIcon extends IconBase {
}
}
updateScratchPosition
(){
updateScratchPosition
(){
this
[
'iconGroup'
].
y
=
318
;
this
.
iconGroup
.
y
-=
150
;
}
}
protected
start
()
{
protected
start
()
{
...
...
egret/src/mapScene/icon/TaskCenterIcon.ts
View file @
57adc7c2
import
IconBase
from
"./IconBase"
;
import
IconBase
from
"./IconBase"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
export
default
class
Scratch
Icon
extends
IconBase
{
export
default
class
TaskCenter
Icon
extends
IconBase
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
}
}
protected
start
()
{
protected
start
()
{
super
.
start
();
super
.
start
();
NetManager
.
ins
.
getTaskInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
}
const
data
=
res
.
data
;
if
(
!
data
||
data
.
length
<=
0
){
this
.
visible
=
false
;
GDispatcher
.
dispatchEvent
(
'updateTurnTablePosition'
);
}
});
}
}
/**
/**
...
...
egret/src/mapScene/icon/TurntableIcon.ts
View file @
57adc7c2
...
@@ -20,6 +20,12 @@ export default class TurntableIcon extends IconBase {
...
@@ -20,6 +20,12 @@ export default class TurntableIcon extends IconBase {
//没有免费次数
//没有免费次数
//如果元宝足够
//如果元宝足够
this
.
updateIcon
();
this
.
updateIcon
();
GDispatcher
.
addEvent
(
'updateTurnTablePosition'
,
this
.
updateTurnTablePosition
,
this
)
}
updateTurnTablePosition
(){
this
.
iconGroup
.
y
-=
150
;
GDispatcher
.
dispatchEvent
(
'updateScratchPosition'
);
// 下面这个跟着上移
}
}
updateIcon
(){
updateIcon
(){
...
...
egret/src/panels/TaskCenter/TaskCenter.ts
View file @
57adc7c2
...
@@ -5,9 +5,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
...
@@ -5,9 +5,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
export
default
class
TaskCenter
extends
Panel
{
export
default
class
TaskCenter
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
taskScroller
:
eui
.
Scroller
;
public
list
:
eui
.
List
;
public
list
:
eui
.
List
;
onShowAnim
()
{
onShowAnim
()
{
let
canvasH
=
750
/
window
.
innerWidth
*
window
.
innerHeight
;
let
canvasH
=
750
/
window
.
innerWidth
*
window
.
innerHeight
;
...
@@ -85,9 +84,11 @@ class TaskCenterItem extends eui.ItemRenderer {
...
@@ -85,9 +84,11 @@ class TaskCenterItem extends eui.ItemRenderer {
// '0xf99f45' getPrize 橙色
// '0xf99f45' getPrize 橙色
// 设置按钮
// 设置按钮
private
setBtn
()
{
private
setBtn
()
{
const
count
=
this
.
data
.
count
;
const
count
=
this
.
data
.
count
;
// 领取奖励*count
const
done
=
this
.
data
.
done
;
const
done
=
this
.
data
.
done
;
const
limit
=
this
.
data
.
limit
;
const
limit
=
this
.
data
.
limit
;
// done/limit
const
appCompletelText
=
this
.
data
.
appCompletelText
;
// 已完成文案
const
appIncompleteText
=
this
.
data
.
appIncompleteText
;
// 未完成文案
this
.
btnLabel
.
stroke
=
2
;
this
.
btnLabel
.
stroke
=
2
;
if
(
count
>
0
)
{
// 可领奖
if
(
count
>
0
)
{
// 可领奖
...
@@ -98,23 +99,27 @@ class TaskCenterItem extends eui.ItemRenderer {
...
@@ -98,23 +99,27 @@ class TaskCenterItem extends eui.ItemRenderer {
// 领奖
// 领奖
NetManager
.
ins
.
taskAward
((
success
,
res
)
=>
{
NetManager
.
ins
.
taskAward
((
success
,
res
)
=>
{
if
(
!
success
)
{
if
(
!
success
)
{
PanelCtrl
.
instance
.
show
(
'taskCenterNoPrize'
);
PanelCtrl
.
instance
.
show
(
'taskCenterNoPrize'
,
res
);
return
;
}
if
(
!
res
.
data
.
option
||
res
.
data
.
option
.
categoryType
==
1
)
{
// 无奖励
PanelCtrl
.
instance
.
show
(
'taskCenterNoPrize'
,
res
);
return
;
return
;
}
}
PanelCtrl
.
instance
.
show
(
'taskCenterPrize'
,
res
.
data
);
PanelCtrl
.
instance
.
show
(
'taskCenterPrize'
,
res
.
data
);
},
this
.
data
.
subActivityId
);
},
this
.
data
.
subActivityId
);
},
this
);
},
this
);
}
else
if
(
done
<
limit
)
{
//
已
完成
}
else
if
(
done
<
limit
)
{
//
未
完成
this
.
btnImg
.
source
=
'TaskCenter_'
+
'goTask'
+
'Btn_png'
;
this
.
btnImg
.
source
=
'TaskCenter_'
+
'goTask'
+
'Btn_png'
;
this
.
btnLabel
.
text
=
`
去完成
(
${
done
}
/
${
limit
}
)`
;
this
.
btnLabel
.
text
=
`
${
appIncompleteText
}
(
${
done
}
/
${
limit
}
)`
;
this
.
btnLabel
.
strokeColor
=
0x1376df
;
this
.
btnLabel
.
strokeColor
=
0x1376df
;
this
.
btnGroup
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
btnGroup
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
// 跳转任务链接
// 跳转任务链接
window
.
open
(
this
.
data
.
appIncompletelink
);
window
.
open
(
this
.
data
.
appIncompletelink
);
},
this
);
},
this
);
}
else
{
}
else
{
// 已完成
this
.
btnImg
.
source
=
'TaskCenter_'
+
'done'
+
'Btn_png'
;
this
.
btnImg
.
source
=
'TaskCenter_'
+
'done'
+
'Btn_png'
;
this
.
btnLabel
.
text
=
'已完成'
;
this
.
btnLabel
.
text
=
`
${
appCompletelText
}
`
;
this
.
btnLabel
.
strokeColor
=
0x7e7e7e
;
this
.
btnLabel
.
strokeColor
=
0x7e7e7e
;
}
}
}
}
...
...
egret/src/panels/TaskCenter/TaskCenterNoPrize.ts
View file @
57adc7c2
...
@@ -5,16 +5,42 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
...
@@ -5,16 +5,42 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
export
default
class
TaskCenterNoPrize
extends
Panel
{
export
default
class
TaskCenterNoPrize
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
duibaGroup
:
eui
.
Group
;
public
duibaGroup
:
eui
.
Group
;
public
duibaBtn
:
eui
.
Button
;
public
shopGroup
:
eui
.
Group
;
public
shopGroup
:
eui
.
Group
;
public
shopBtn
:
eui
.
Button
;
public
watchGroup
:
eui
.
Group
;
public
watchGroup
:
eui
.
Group
;
public
watchBtn
:
eui
.
Button
;
public
buyGroup
:
eui
.
Group
;
public
buyGroup
:
eui
.
Group
;
public
buyBtn
:
eui
.
Button
;
public
btn
:
eui
.
Group
;
public
btnLabel
:
eui
.
Label
;
// duibaGroup 去闯关
// shopGroup 继续逛店铺
// watchGroup 继续浏览商品
// buyGroup 继续下单
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
console
.
log
(
data
);
switch
(
data
.
code
)
{
case
600063
:
// 当前活动未配置任务奖励
case
600068
:
// 未中奖 有可能是奖品概率小于100%
case
600067
:
// 当前任务未配置奖励
case
600066
:
// 当前任务不能领取奖励 领奖时,传参任务id对应的任务没有剩余领奖次数
break
;
case
600064
:
// 开发者无响应
case
600065
:
// 开发者响应内容异常
case
600070
:
// 开发者请求异常
case
600071
:
// 开发者响应业务处理失败 接口响应status非success或者ok
case
600069
:
// 苏宁风控
break
;
default
:
break
;
}
addAdComp
(
84
,
1014
,
this
);
addAdComp
(
84
,
1014
,
this
);
}
}
...
...
egret/src/panels/TaskCenter/TaskCenterPrize.ts
View file @
57adc7c2
...
@@ -3,16 +3,17 @@ import { addAdComp } from "../BoxPanel";
...
@@ -3,16 +3,17 @@ import { addAdComp } from "../BoxPanel";
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
TaskCenterPrize
extends
Panel
{
export
default
class
TaskCenterPrize
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
img
:
eui
.
Image
;
public
img
:
eui
.
Image
;
public
money
:
eui
.
Image
;
public
money
:
eui
.
Image
;
public
propnums2
:
eui
.
Label
;
public
propnums2
:
eui
.
Label
;
public
blood
:
eui
.
Image
;
public
blood
:
eui
.
Image
;
public
numsgroup
:
eui
.
Group
;
public
numsgroup
:
eui
.
Group
;
public
numsbg
:
eui
.
Image
;
public
numsbg
:
eui
.
Image
;
public
nums
:
eui
.
Label
;
public
nums
:
eui
.
Label
;
public
tipsLabel
:
eui
.
Label
;
public
tipsLabel
:
eui
.
Label
;
public
btn
:
eui
.
Image
;
public
btn
:
eui
.
Group
;
public
btnLabel
:
eui
.
Label
;
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
...
...
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