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
Hide 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 @@
...
@@ -23,11 +23,11 @@
</e:Button>
</e:Button>
<e:Label
id=
"numLabel"
text=
"仅差3人可获得"
y=
"679.33"
textColor=
"0xf54500"
size=
"28"
horizontalCenter=
"0"
/>
<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: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:Group
anchorOffsetX=
"0"
>
<e:List
id=
"list"
x=
"0"
y=
"0"
anchorOffsetX=
"0"
>
<e:List
id=
"list"
x=
"0"
y=
"0"
anchorOffsetX=
"0"
>
<e:layout>
<e:layout>
<e:HorizontalLayout
gap=
"66"
horizontalAlign=
"center"
verticalAlign=
"middle
"
/>
<e:HorizontalLayout
horizontalAlign=
"center"
verticalAlign=
"middle"
gap=
"23
"
/>
</e:layout>
</e:layout>
</e:List>
</e:List>
<e:layout>
<e:layout>
...
...
egret/src/mapScene/MapScene.ts
View file @
c6a384b2
...
@@ -52,7 +52,7 @@ export default class MapScene extends Scene {
...
@@ -52,7 +52,7 @@ export default class MapScene extends Scene {
case
(
res
.
code
==
"0000021"
):
showToast
(
"无效的分享码"
);
break
;
case
(
res
.
code
==
"0000021"
):
showToast
(
"无效的分享码"
);
break
;
case
(
res
.
code
==
"0000022"
):
showToast
(
"不可以给自己助力哦~"
);
break
;
case
(
res
.
code
==
"0000022"
):
showToast
(
"不可以给自己助力哦~"
);
break
;
case
(
res
.
code
==
"0200201"
):
showToast
(
"邀请任务已结束"
);
break
;
case
(
res
.
code
==
"0200201"
):
showToast
(
"邀请任务已结束"
);
break
;
case
(
res
.
code
==
"0200202"
):
showToast
(
"已经给好友助力过
l
哦~"
);
break
;
case
(
res
.
code
==
"0200202"
):
showToast
(
"已经给好友助力过
了
哦~"
);
break
;
}
}
if
(
!
success
)
{
if
(
!
success
)
{
return
;
return
;
...
...
egret/src/panels/InvitePanel.ts
View file @
c6a384b2
...
@@ -73,28 +73,31 @@ export default class InvitePanel extends Panel {
...
@@ -73,28 +73,31 @@ export default class InvitePanel extends Panel {
}
}
let
dNum
=
this
.
data
.
invitationCount
-
this
.
data
.
invitationUser
.
length
;
let
dNum
=
this
.
data
.
invitationCount
-
this
.
data
.
invitationUser
.
length
;
this
.
numLabel
.
text
=
`仅差
${
dNum
}
人可获得`
;
this
.
numLabel
.
text
=
`仅差
${
dNum
}
人可获得`
;
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
this
.
data
.
invitationUser
.
push
({
this
.
data
.
invitationUser
.
push
({
nickname
:
"nickname"
,
nickname
:
"nickname"
,
avatar
:
this
.
invite_img
,
avatar
:
this
.
invite_img
,
callFun
:
()
=>
{
NetManager
.
ins
.
getShareCode
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
}
let
shareCode
=
res
.
data
;
// 分享码
CFG
.
wxShareLink
=
"https://gameact.suning.com/duiba/customShare/share?id=3531"
+
"&shareCode="
+
shareCode
;
// 分享链接
if
(
iswx
())
{
//微信端
this
.
wxShareTip
.
visible
=
true
;
window
[
"invokeWX"
]();
}
else
{
//端内
this
.
wxShareTip
.
visible
=
false
;
window
[
"inviteShare"
](
shareCode
);
}
});
}
});
});
}
}
for
(
let
i
=
0
;
i
<
this
.
data
.
invitationUser
.
length
;
i
++
){
this
.
data
.
invitationUser
[
i
][
'callFun'
]
=
()
=>
{
NetManager
.
ins
.
getShareCode
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
}
let
shareCode
=
res
.
data
;
// 分享码
CFG
.
wxShareLink
=
"https://gameact.suning.com/duiba/customShare/share?id=3531"
+
"&shareCode="
+
shareCode
;
// 分享链接
if
(
iswx
())
{
//微信端
this
.
wxShareTip
.
visible
=
true
;
window
[
"invokeWX"
]();
}
else
{
//端内
this
.
wxShareTip
.
visible
=
false
;
window
[
"inviteShare"
](
shareCode
);
}
});
}
}
this
.
list
.
useVirtualLayout
=
false
;
this
.
list
.
useVirtualLayout
=
false
;
this
.
list
.
itemRenderer
=
InviteItem
;
this
.
list
.
itemRenderer
=
InviteItem
;
this
.
list
.
dataProvider
=
new
eui
.
ArrayCollection
(
this
.
data
.
invitationUser
);
this
.
list
.
dataProvider
=
new
eui
.
ArrayCollection
(
this
.
data
.
invitationUser
);
...
@@ -168,6 +171,7 @@ class InviteItem extends eui.ItemRenderer {
...
@@ -168,6 +171,7 @@ class InviteItem extends eui.ItemRenderer {
}
}
dataChanged
()
{
dataChanged
()
{
console
.
log
(
this
.
data
);
this
.
img
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
this
.
data
.
callFun
)
{
if
(
this
.
data
.
callFun
)
{
...
...
mock/happyclear/getInviteInfo.json
View file @
c6a384b2
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"timestamp"
:
1566199822308
,
"timestamp"
:
1566199822308
,
"data"
:
{
"data"
:
{
"invitationId"
:
"活动id"
,
"invitationId"
:
"活动id"
,
"invitationCount"
:
4
,
"invitationCount"
:
5
,
"img"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"img"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"sysTime"
:
1570630215000
,
"sysTime"
:
1570630215000
,
"endTime"
:
1570672800000
,
"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