Commit c6a384b2 authored by 邱旭's avatar 邱旭

1

parent 327a4ca0
...@@ -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="554" height="90" y="766.33" anchorOffsetX="0" anchorOffsetY="0" x="98"> <e:Scroller width="545" 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>
......
...@@ -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;
......
...@@ -73,11 +73,15 @@ export default class InvitePanel extends Panel { ...@@ -73,11 +73,15 @@ 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: () => { });
}
for(let i = 0; i < this.data.invitationUser.length;i++){
this.data.invitationUser[i]['callFun'] = ()=>{
NetManager.ins.getShareCode((success, res) => { NetManager.ins.getShareCode((success, res) => {
if(!success) { if(!success) {
return; return;
...@@ -93,7 +97,6 @@ export default class InvitePanel extends Panel { ...@@ -93,7 +97,6 @@ export default class InvitePanel extends Panel {
} }
}); });
} }
});
} }
this.list.useVirtualLayout = false; this.list.useVirtualLayout = false;
this.list.itemRenderer = InviteItem; this.list.itemRenderer = InviteItem;
...@@ -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) {
......
...@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment