Commit e7acc37b authored by zjz1994's avatar zjz1994

调整签到

parent 8392da50
...@@ -239,6 +239,10 @@ ...@@ -239,6 +239,10 @@
{ {
"keys": "help_blood_1_btn_png,help_blood_1_text_png,help_blood_fail_btn_png,help_blood_fail_text_png,help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_blood_success_text_png,help_blood_success_text2_png,help_card_bg_png,help_card_prize_png,help_closebtn1_png,help_invite2_btn_png,help_invite2_btn2_png,help_invite2_text_png,help_invite2_text2_png,help_invite2_text3_png,help_invite2_text4_png,help_invite_bg_png,help_invite_btn1_png,help_invite_fail_btn_png,help_invite_fail_text1_png,help_invite_fail_text2_png,help_invite_fail_text3_png,help_invite_fail_text4_png,help_invite_success_btn_png,help_invite_success_txt_png,help_invite_text_png,help_light_png", "keys": "help_blood_1_btn_png,help_blood_1_text_png,help_blood_fail_btn_png,help_blood_fail_text_png,help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_blood_success_text_png,help_blood_success_text2_png,help_card_bg_png,help_card_prize_png,help_closebtn1_png,help_invite2_btn_png,help_invite2_btn2_png,help_invite2_text_png,help_invite2_text2_png,help_invite2_text3_png,help_invite2_text4_png,help_invite_bg_png,help_invite_btn1_png,help_invite_fail_btn_png,help_invite_fail_text1_png,help_invite_fail_text2_png,help_invite_fail_text3_png,help_invite_fail_text4_png,help_invite_success_btn_png,help_invite_success_txt_png,help_invite_text_png,help_light_png",
"name": "helpGroup" "name": "helpGroup"
},
{
"name": "preload",
"keys": "unsignbtn_png"
} }
], ],
"resources": [ "resources": [
...@@ -5367,6 +5371,11 @@ ...@@ -5367,6 +5371,11 @@
"url": "assets/common/commom_share1.png", "url": "assets/common/commom_share1.png",
"type": "image", "type": "image",
"name": "commom_share1_png" "name": "commom_share1_png"
},
{
"name": "unsignbtn_png",
"type": "image",
"url": "assets/sign/unsignbtn.png"
} }
] ]
} }
\ No newline at end of file
...@@ -19,12 +19,21 @@ ...@@ -19,12 +19,21 @@
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
<e:Label text="连续登录闯关可以获得更丰厚的奖励哦~" y="371" textColor="0xf7713a" size="26" horizontalCenter="0" fontFamily="FZY4JW"/> <e:Label text="连续登录闯关可以获得更丰厚的奖励哦~" y="371" textColor="0xf7713a" size="26" horizontalCenter="0" fontFamily="FZY4JW"/>
<e:Button id="btn1" label="" anchorOffsetX="184" anchorOffsetY="55" x="375" y="916"> <e:Button id="btn1" label="" anchorOffsetX="184" anchorOffsetY="55" x="375" y="916" visible="false">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="signbtn1_png" source.down="signbtn1_png" source.disabled="signbtn1_png"/> <e:Image width="100%" height="100%" source="signbtn1_png" source.down="signbtn1_png" source.disabled="signbtn1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName>
</e:Button>
<e:Button id="btn0" label="" anchorOffsetX="184" anchorOffsetY="55" x="375" y="916" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="unsignbtn_png" source.down="unsignbtn_png" source.disabled="unsignbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Group id="prizegroup" width="750" height="1206" x="0" y="0" visible="false"> <e:Group id="prizegroup" width="750" height="1206" x="0" y="0" visible="false">
......
...@@ -111,6 +111,7 @@ export default class SignPanel extends Panel { ...@@ -111,6 +111,7 @@ export default class SignPanel extends Panel {
console.log("签到数据",configs); console.log("签到数据",configs);
var btnv:boolean = false;
list.forEach((ele, index) => { list.forEach((ele, index) => {
ele.index = index; ele.index = index;
ele.config = configs[index]; ele.config = configs[index];
...@@ -127,6 +128,7 @@ export default class SignPanel extends Panel { ...@@ -127,6 +128,7 @@ export default class SignPanel extends Panel {
else{ else{
ele.btn = 1; ele.btn = 1;
this.signidx = index; this.signidx = index;
btnv = true;
} }
console.log("今日签到数据",index,this.signidx); console.log("今日签到数据",index,this.signidx);
this.todayidx = index; this.todayidx = index;
...@@ -135,6 +137,7 @@ export default class SignPanel extends Panel { ...@@ -135,6 +137,7 @@ export default class SignPanel extends Panel {
} else } else
ele.btn = 4; ele.btn = 4;
}); });
this.changeShowBtn(btnv);
this.signdata = Utils.deepClone(list); this.signdata = Utils.deepClone(list);
if(this.signidx==6&&this.sevenIsGift){ if(this.signidx==6&&this.sevenIsGift){
...@@ -327,6 +330,13 @@ export default class SignPanel extends Panel { ...@@ -327,6 +330,13 @@ export default class SignPanel extends Panel {
},window["signActivityId"]); },window["signActivityId"]);
} }
} }
/**
*
*/
changeShowBtn(_v:boolean){
this["btn1"].visible = _v;
this["btn0"].visible = !_v;
}
removeEvents(){ removeEvents(){
super.removeEvents(); super.removeEvents();
this["closeBtn"].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this); this["closeBtn"].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this);
...@@ -529,7 +539,8 @@ export default class SignPanel extends Panel { ...@@ -529,7 +539,8 @@ export default class SignPanel extends Panel {
// this.list.dataProvider = new eui.ArrayCollection(this.signdata); // this.list.dataProvider = new eui.ArrayCollection(this.signdata);
this.itemEffect("roasign",function(){ this.itemEffect("roasign",function(){
//修改按钮为已签到 //修改按钮为已签到
this.tweenBtn(this['btn1'],'tb'); this.changeShowBtn(false);
this.tweenBtn(this['btn0'],'tb');
}.bind(this)); }.bind(this));
} }
//礼盒弹出后的弹窗 //礼盒弹出后的弹窗
......
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