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
dca95362
Commit
dca95362
authored
Mar 26, 2020
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9cb8e20d
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
152 additions
and
77 deletions
+152
-77
taskPrize_blood.png
egret/resource/assets/TaskCenterPrize/taskPrize_blood.png
+0
-0
taskPrize_bomb.png
egret/resource/assets/TaskCenterPrize/taskPrize_bomb.png
+0
-0
taskPrize_chuizi.png
egret/resource/assets/TaskCenterPrize/taskPrize_chuizi.png
+0
-0
taskPrize_icon1.png
egret/resource/assets/TaskCenterPrize/taskPrize_icon1.png
+0
-0
taskPrize_icon2.png
egret/resource/assets/TaskCenterPrize/taskPrize_icon2.png
+0
-0
taskPrize_icon3.png
egret/resource/assets/TaskCenterPrize/taskPrize_icon3.png
+0
-0
taskPrize_step.png
egret/resource/assets/TaskCenterPrize/taskPrize_step.png
+0
-0
default.res.json
egret/resource/default.res.json
+21
-16
TaskCenterPrizeSkin.exml
egret/resource/skins/TaskCenterPrizeSkin.exml
+2
-5
TaskCenterSkin.exml
egret/resource/skins/TaskCenterSkin.exml
+5
-2
TaskCenter.ts
egret/src/panels/TaskCenter/TaskCenter.ts
+18
-7
TaskCenterPrize.ts
egret/src/panels/TaskCenter/TaskCenterPrize.ts
+40
-41
getConfigInfo.json
mock/happyclear/getConfigInfo.json
+1
-1
getTaskInfo.json
mock/happyclear/getTaskInfo.json
+62
-2
taskAward.json
mock/happyclear/taskAward.json
+3
-3
No files found.
egret/resource/assets/TaskCenterPrize/taskPrize_blood.png
0 → 100644
View file @
dca95362
11.4 KB
egret/resource/assets/TaskCenterPrize/taskPrize_bomb.png
deleted
100644 → 0
View file @
9cb8e20d
13.1 KB
egret/resource/assets/TaskCenterPrize/taskPrize_chuizi.png
deleted
100644 → 0
View file @
9cb8e20d
13.5 KB
egret/resource/assets/TaskCenterPrize/taskPrize_icon1.png
0 → 100644
View file @
dca95362
14.2 KB
egret/resource/assets/TaskCenterPrize/taskPrize_icon2.png
0 → 100644
View file @
dca95362
16.8 KB
egret/resource/assets/TaskCenterPrize/taskPrize_icon3.png
0 → 100644
View file @
dca95362
14.1 KB
egret/resource/assets/TaskCenterPrize/taskPrize_step.png
deleted
100644 → 0
View file @
9cb8e20d
13.8 KB
egret/resource/default.res.json
View file @
dca95362
...
...
@@ -205,7 +205,7 @@
"name"
:
"taskcenter"
},
{
"keys"
:
"TaskCenterPrize_bg_png,taskPrize_money_png,taskPrize_
step_png,taskPrize_bomb_png,taskPrize_chuizi
_png"
,
"keys"
:
"TaskCenterPrize_bg_png,taskPrize_money_png,taskPrize_
icon1_png,taskPrize_blood_png,taskPrize_icon3_png,taskPrize_icon2
_png"
,
"name"
:
"taskcenterprize"
},
{
...
...
@@ -5143,21 +5143,6 @@
"type"
:
"image"
,
"name"
:
"taskPrize_money_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_step.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_step_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_bomb.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_bomb_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_chuizi.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_chuizi_png"
},
{
"url"
:
"assets/blood/choujiang.png"
,
"type"
:
"image"
,
...
...
@@ -5297,6 +5282,26 @@
"url"
:
"assets/mainScene/check5.png"
,
"type"
:
"image"
,
"name"
:
"check5_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_icon1.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_icon1_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_blood.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_blood_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_icon3.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_icon3_png"
},
{
"url"
:
"assets/TaskCenterPrize/taskPrize_icon2.png"
,
"type"
:
"image"
,
"name"
:
"taskPrize_icon2_png"
}
]
}
\ No newline at end of file
egret/resource/skins/TaskCenterPrizeSkin.exml
View file @
dca95362
...
...
@@ -12,11 +12,8 @@
</e:skinName>
</e:Button>
<e:Image
id=
"img"
y=
"374.77"
touchEnabled=
"true"
width=
"518"
height=
"243"
scaleX=
"1"
scaleY=
"1"
source=
"{data.url}"
horizontalCenter=
"2"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
/>
<e:Image
id=
"money"
y=
"460.77"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"-58.5"
source=
"taskPrize_money_png"
/>
<e:Label
id=
"propnums2"
text=
"30"
textColor=
"0x885037"
bold=
"true"
y=
"526.64"
width=
"75"
textAlign=
"right"
x=
"287.6"
fontFamily=
"FZY3JW"
visible=
"false"
/>
<e:Image
id=
"blood"
y=
"376.16"
source=
"common_blood_png"
scaleX=
"0.7"
scaleY=
"0.7"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Group
id=
"numsgroup"
x=
"384.4"
y=
"468.27"
anchorOffsetX=
"0"
width=
"188"
anchorOffsetY=
"0"
height=
"62"
>
<e:Image
id=
"numsbg"
source=
"signprize_numsbg_png"
x=
"0"
y=
"0"
visible=
"false"
/>
<e:Image
id=
"prop"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"-58.5"
source=
"taskPrize_money_png"
verticalCenter=
"-104"
/>
<e:Group
id=
"numsgroup"
x=
"384.4"
anchorOffsetX=
"0"
width=
"188"
anchorOffsetY=
"0"
height=
"62"
verticalCenter=
"-100"
>
<e:Label
id=
"nums"
text=
"×8"
size=
"48"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"FZY3JW"
textColor=
"0xc17343"
left=
"0"
bold=
"true"
/>
</e:Group>
<e:Label
id=
"tipsLabel"
text=
"继续完成任务可以获得更多元宝哦~"
y=
"632.73"
textColor=
"0xF54500"
fontFamily=
"FZY3JW"
size=
"26"
horizontalCenter=
"0"
/>
...
...
egret/resource/skins/TaskCenterSkin.exml
View file @
dca95362
...
...
@@ -11,13 +11,16 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Scroller
width=
"674"
height=
"5
15"
y=
"382
.81"
horizontalCenter=
"2"
anchorOffsetY=
"0"
>
<e:Group
anchorOffsetX=
"0"
width=
"222.73"
anchorOffsetY=
"0"
height=
"53
2.33"
x=
"0"
y=
"4
"
>
<e:Scroller
width=
"674"
height=
"5
43"
y=
"370
.81"
horizontalCenter=
"2"
anchorOffsetY=
"0"
>
<e:Group
anchorOffsetX=
"0"
width=
"222.73"
anchorOffsetY=
"0"
height=
"53
6.34"
x=
"0"
y=
"-1.33
"
>
<e:List
id=
"list"
left=
"0"
right=
"0"
horizontalCenter=
"0"
y=
"0"
>
<e:layout>
<e:VerticalLayout
gap=
"22"
/>
</e:layout>
</e:List>
<e:layout>
<e:VerticalLayout
gap=
"5"
/>
</e:layout>
</e:Group>
</e:Scroller>
</e:Skin>
\ No newline at end of file
egret/src/panels/TaskCenter/TaskCenter.ts
View file @
dca95362
...
...
@@ -6,6 +6,7 @@ import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import
{
Buried
}
from
"../../../libs/tw/util/Buried"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
import
{
NetName
}
from
"../../../libs/tw/enum/NetName"
;
import
tr
=
egret
.
sys
.
tr
;
export
default
class
TaskCenter
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
...
...
@@ -90,16 +91,26 @@ class TaskCenterItem extends eui.ItemRenderer {
let
config
=
DataManager
.
ins
.
getData
(
NetName
.
GET_CONFIG
).
data
||
null
;
let
taskConfig
=
config
.
taskConfs
||
[];
for
(
let
i
=
0
;
i
<
taskConfig
.
length
;
i
++
)
{
// if(this.data.subActivityId == ){
//
// }
let
has
=
false
;
for
(
let
task
of
taskConfig
)
{
if
(
this
.
data
.
subActivityId
==
task
.
taskMark
)
{
for
(
let
prize
of
task
.
prizeList
)
{
if
(
prize
.
categoryType
==
4
&&
prize
.
minValue
==
prize
.
maxValue
)
{
has
=
true
;
this
.
moneyGroup
.
visible
=
true
;
this
.
moneyCount
.
text
=
`×
${
prize
.
maxValue
}
`
;
this
.
moneyGroup
.
x
=
this
.
remark
.
x
+
this
.
remark
.
width
+
20
;
}
}
}
}
let
count
=
this
.
data
.
remark
.
match
(
/
(?<
=得
)
.*
?(?=
元宝
)
/
);
this
.
moneyCount
.
text
=
`×
${
count
[
count
.
length
-
1
]}
`
;
if
(
!
has
)
{
this
.
moneyGroup
.
visible
=
false
;
}
this
.
moneyGroup
.
x
=
this
.
remark
.
x
+
this
.
remark
.
width
+
20
;
this
.
setBtn
();
// 设置按钮
}
...
...
egret/src/panels/TaskCenter/TaskCenterPrize.ts
View file @
dca95362
...
...
@@ -8,17 +8,14 @@ import { changeMapScene } from "../../startScene/StartScene";
import
SceneCtrl
from
"../../../libs/new_wx/ctrls/sceneCtrl"
;
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
btn
:
eui
.
Group
;
public
btnLabel
:
eui
.
Label
;
public
closeBtn
:
eui
.
Button
;
public
img
:
eui
.
Image
;
public
prop
:
eui
.
Image
;
public
numsgroup
:
eui
.
Group
;
public
nums
:
eui
.
Label
;
public
tipsLabel
:
eui
.
Label
;
public
btn
:
eui
.
Group
;
public
btnLabel
:
eui
.
Label
;
start
(
data
)
{
super
.
start
();
...
...
@@ -57,38 +54,40 @@ export default class TaskCenterPrize extends Panel {
updateOption
(
option
:
any
)
{
const
{
categoryType
,
img
,
num
,
propType
,
realValue
}
=
option
;
// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this
.
img
.
visible
=
false
;
this
.
numsgroup
.
visible
=
false
;
this
.
prop
.
visible
=
false
;
this
[
'nums'
].
text
=
'x'
+
realValue
;
switch
(
categoryType
)
{
case
2
:
this
.
numsgroup
.
visible
=
true
;
this
.
prop
.
visible
=
true
;
this
.
nums
.
text
=
'×'
+
num
;
this
.
prop
.
source
=
'taskPrize_blood_png'
;
this
.
tipsLabel
.
text
=
'继续完成任务可以获得更多体力哦~'
;
break
;
case
3
:
this
.
numsgroup
.
visible
=
true
;
this
.
prop
.
visible
=
true
;
this
.
nums
.
text
=
'×'
+
num
;
this
.
prop
.
source
=
`taskPrize_icon
${
propType
}
_png`
;
this
.
tipsLabel
.
text
=
'继续完成任务可以获得更多道具哦~'
;
break
;
// this['nums'].text = 'x1';
// if(num)
// this['nums'].text = 'x' + num;
// switch(categoryType) {
// case 2:
// this['blood'].visible = true;
// this['numsgroup'].visible = true;
// this.tipsLabel.text = '继续完成任务可以获得更多体力哦~';
// break;
// case 3:
// this['numsgroup'].visible = true;
// this['img'].visible = true;
// this.data.url = `turnprize_icon${propType}_png`;
// this.tipsLabel.text = '继续完成任务可以获得更多道具哦~';
// break;
// case 4:
// this['numsgroup'].visible = true;
// this['nums'].text = 'x' + realValue;
// this['money'].visible = true;
// // this['propnums2'].visible = true;
// // this['propnums2'].text = realValue;
// this.tipsLabel.text = '继续完成任务可以获得更多元宝哦~';
// break;
// default:
// this['img'].visible = true;
// this.data.url = img;
// this.tipsLabel.text = '继续完成任务可以获得更多优惠哦~';
// break;
// }
case
4
:
this
.
numsgroup
.
visible
=
true
;
this
.
prop
.
visible
=
true
;
this
.
nums
.
text
=
'×'
+
realValue
;
this
.
prop
.
source
=
'taskPrize_money_png'
;
this
.
tipsLabel
.
text
=
'继续完成任务可以获得更多元宝哦~'
;
break
;
default
:
this
.
img
.
visible
=
true
;
this
.
img
.
source
=
img
;
this
.
tipsLabel
.
text
=
'继续完成任务可以获得更多优惠哦~'
;
break
;
}
}
onTouchTap_closeBtn
()
{
...
...
mock/happyclear/getConfigInfo.json
View file @
dca95362
...
...
@@ -109,7 +109,7 @@
"categoryType"
:
4
,
"title"
:
"固定十元宝"
,
"rate"
:
"100"
,
"minValue"
:
2
,
"minValue"
:
1
2
,
"maxValue"
:
12
,
"coinType"
:
1
,
"realValue"
:
null
,
...
...
mock/happyclear/getTaskInfo.json
View file @
dca95362
...
...
@@ -34,12 +34,72 @@
"count"
:
0
,
"tips"
:
"你好"
},
{
"subActivityId"
:
"SUB446971598063666666"
,
"subActivityName"
:
"狮狮连萌下单"
,
"status"
:
"1"
,
"taskStatus"
:
"0"
,
"remark"
:
"下单"
,
"taskTitle"
:
"狮狮连萌下单任务"
,
"taskViceTitle"
:
"狮狮连萌下单任务"
,
"icon"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
"limit"
:
"1"
,
"done"
:
"1"
,
"appIncompleteText"
:
"去看看"
,
"appCompleteText"
:
"已完成"
,
"appIncompletelink"
:
"http://cprexg.m.cnsuning.com/snWhale.html#/fight"
,
"appCompletelink"
:
"//m.suning.com"
,
"pcIncompleteText"
:
null
,
"pcCompleteText"
:
"已完成"
,
"pcIncompletelink"
:
null
,
"pcCompletelink"
:
""
,
"homeLink"
:
"https://gameactprexg.cnsuning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651405"
,
"receivetype"
:
"0"
,
"browseSecond"
:
null
,
"incompleteLink"
:
null
,
"completeLink"
:
null
,
"terminalType"
:
"9"
,
"taskName"
:
null
,
"taskId"
:
null
,
"count"
:
0
,
"tips"
:
"你好"
},
{
"subActivityId"
:
"SUB446970931785445376"
,
"subActivityName"
:
"狮狮连萌逛店铺"
,
"status"
:
"1"
,
"taskStatus"
:
"99"
,
"remark"
:
"逛店铺15秒得30元宝"
,
"remark"
:
"逛店铺15秒"
,
"taskTitle"
:
"狮狮连萌逛店铺"
,
"taskViceTitle"
:
"200金币"
,
"icon"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
"limit"
:
"3"
,
"done"
:
"3"
,
"appIncompleteText"
:
"去看看"
,
"appCompleteText"
:
"已完成"
,
"appIncompletelink"
:
""
,
"appCompletelink"
:
"//m.suning.com"
,
"pcIncompleteText"
:
null
,
"pcCompleteText"
:
"已完成"
,
"pcIncompletelink"
:
null
,
"pcCompletelink"
:
""
,
"homeLink"
:
"https://gameactprexg.cnsuning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651405"
,
"receivetype"
:
"0"
,
"browseSecond"
:
"10"
,
"incompleteLink"
:
"//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157438697439978713.png"
,
"completeLink"
:
"//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157438697442128421.png"
,
"terminalType"
:
"9"
,
"taskName"
:
"狮狮连萌逛店铺"
,
"taskId"
:
"RW448429803289649152"
,
"count"
:
"2"
,
"tips"
:
"你好02"
},
{
"subActivityId"
:
"SUB446970931785777777"
,
"subActivityName"
:
"狮狮连萌逛店铺"
,
"status"
:
"1"
,
"taskStatus"
:
"99"
,
"remark"
:
"逛店铺15秒"
,
"taskTitle"
:
"狮狮连萌逛店铺"
,
"taskViceTitle"
:
"200金币"
,
"icon"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
...
...
@@ -69,7 +129,7 @@
"subActivityName"
:
"狮狮连萌逛会场"
,
"status"
:
"1"
,
"taskStatus"
:
"99"
,
"remark"
:
"浏览店铺
得9999元宝
"
,
"remark"
:
"浏览店铺"
,
"taskTitle"
:
"狮狮连萌逛会场任务"
,
"taskViceTitle"
:
null
,
"icon"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
...
...
mock/happyclear/taskAward.json
View file @
dca95362
...
...
@@ -7,15 +7,15 @@
"option"
:
{
"id"
:
"224"
,
"day"
:
null
,
"categoryType"
:
4
,
"categoryType"
:
3
,
"title"
:
"炸弹"
,
"rate"
:
"50"
,
"minValue"
:
null
,
"maxValue"
:
null
,
"coinType"
:
null
,
"realValue"
:
30
,
"propType"
:
4
,
"num"
:
null
,
"propType"
:
2
,
"num"
:
2
,
"img"
:
""
,
"appItemId"
:
null
,
"name"
:
""
,
...
...
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