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
c6a384b2
Commit
c6a384b2
authored
Oct 15, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
327a4ca0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
20 deletions
+24
-20
InviteSkin.exml
egret/resource/skins/InviteSkin.exml
+2
-2
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-1
InvitePanel.ts
egret/src/panels/InvitePanel.ts
+20
-16
getInviteInfo.json
mock/happyclear/getInviteInfo.json
+1
-1
No files found.
egret/resource/skins/InviteSkin.exml
View file @
c6a384b2
...
...
@@ -23,11 +23,11 @@
</e:Button>
<e:Label
id=
"numLabel"
text=
"仅差3人可获得"
y=
"679.33"
textColor=
"0xf54500"
size=
"28"
horizontalCenter=
"0"
/>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"883.33"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0"
/>
<e:Scroller
width=
"5
54"
height=
"90"
y=
"766.33"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
x=
"98
"
>
<e:Scroller
width=
"5
45"
height=
"90"
y=
"766.33"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"0
"
>
<e:Group
anchorOffsetX=
"0"
>
<e:List
id=
"list"
x=
"0"
y=
"0"
anchorOffsetX=
"0"
>
<e:layout>
<e:HorizontalLayout
gap=
"66"
horizontalAlign=
"center"
verticalAlign=
"middle
"
/>
<e:HorizontalLayout
horizontalAlign=
"center"
verticalAlign=
"middle"
gap=
"23
"
/>
</e:layout>
</e:List>
<e:layout>
...
...
egret/src/mapScene/MapScene.ts
View file @
c6a384b2
...
...
@@ -52,7 +52,7 @@ export default class MapScene extends Scene {
case
(
res
.
code
==
"0000021"
):
showToast
(
"无效的分享码"
);
break
;
case
(
res
.
code
==
"0000022"
):
showToast
(
"不可以给自己助力哦~"
);
break
;
case
(
res
.
code
==
"0200201"
):
showToast
(
"邀请任务已结束"
);
break
;
case
(
res
.
code
==
"0200202"
):
showToast
(
"已经给好友助力过
l
哦~"
);
break
;
case
(
res
.
code
==
"0200202"
):
showToast
(
"已经给好友助力过
了
哦~"
);
break
;
}
if
(
!
success
)
{
return
;
...
...
egret/src/panels/InvitePanel.ts
View file @
c6a384b2
...
...
@@ -73,11 +73,15 @@ export default class InvitePanel extends Panel {
}
let
dNum
=
this
.
data
.
invitationCount
-
this
.
data
.
invitationUser
.
length
;
this
.
numLabel
.
text
=
`仅差
${
dNum
}
人可获得`
;
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
this
.
data
.
invitationUser
.
push
({
nickname
:
"nickname"
,
avatar
:
this
.
invite_img
,
callFun
:
()
=>
{
});
}
for
(
let
i
=
0
;
i
<
this
.
data
.
invitationUser
.
length
;
i
++
){
this
.
data
.
invitationUser
[
i
][
'callFun'
]
=
()
=>
{
NetManager
.
ins
.
getShareCode
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
...
...
@@ -93,7 +97,6 @@ export default class InvitePanel extends Panel {
}
});
}
});
}
this
.
list
.
useVirtualLayout
=
false
;
this
.
list
.
itemRenderer
=
InviteItem
;
...
...
@@ -168,6 +171,7 @@ class InviteItem extends eui.ItemRenderer {
}
dataChanged
()
{
console
.
log
(
this
.
data
);
this
.
img
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
this
.
data
.
callFun
)
{
...
...
mock/happyclear/getInviteInfo.json
View file @
c6a384b2
...
...
@@ -5,7 +5,7 @@
"timestamp"
:
1566199822308
,
"data"
:
{
"invitationId"
:
"活动id"
,
"invitationCount"
:
4
,
"invitationCount"
:
5
,
"img"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"sysTime"
:
1570630215000
,
"endTime"
:
1570672800000
,
...
...
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