Commit 57adc7c2 authored by 邱旭's avatar 邱旭

1

parent 0d9939f2
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
"name": "redbombtips" "name": "redbombtips"
}, },
{ {
"keys": "TaskCenter_getPrizeBtn_png,TaskCenter_goTaskBtn_png,TaskCenter_bg_png,TaskCenter_taskBg_png,TaskCenterBuy_png,TaskCenterShop_png,TaskCenterGame_png,TaskCenterWatch_png,TaskCenter_doneBtn_png", "keys": "TaskCenter_getPrizeBtn_png,TaskCenter_goTaskBtn_png,TaskCenter_bg_png,TaskCenter_taskBg_png,TaskCenterBuy_png,TaskCenterShop_png,TaskCenterGame_png,TaskCenterWatch_png,TaskCenter_doneBtn_png,TaskCenter_btn_png",
"name": "taskcenter" "name": "taskcenter"
}, },
{ {
...@@ -3690,6 +3690,11 @@ ...@@ -3690,6 +3690,11 @@
"url": "assets/sign/sign_quan36.png", "url": "assets/sign/sign_quan36.png",
"type": "image", "type": "image",
"name": "sign_quan36_png" "name": "sign_quan36_png"
},
{
"url": "assets/TaskCenterPanel/TaskCenter_btn.png",
"type": "image",
"name": "TaskCenter_btn_png"
} }
] ]
} }
\ No newline at end of file
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="recordBtn" label="" x="606.14" y="174.01"> <e:Button id="recordBtn" label="" x="606.14" y="175">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/> <e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<e:Label id="inviteTips" text="立即到账" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xffffff" size="18" fontFamily="FZY3JW"/> <e:Label id="inviteTips" text="立即到账" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xffffff" size="18" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="turnTableGroup" x="564.5" y="474.01" anchorOffsetX="0" width="159"> <e:Group id="turnTableGroup" x="564.5" y="475" anchorOffsetX="0" width="159">
<e:Button id="turnTableBtn" label="" x="33.36" y="0"> <e:Button id="turnTableBtn" label="" x="33.36" y="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<e:Label id="turnTableTips" text="立即到" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xFFFFFF" size="18" fontFamily="FZY3JW"/> <e:Label id="turnTableTips" text="立即到" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xFFFFFF" size="18" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="scratchGroup" y="631.01" right="27"> <e:Group id="scratchGroup" y="631" right="27">
<e:Button id="scratchBtn" label="" y="0" x="-5.32"> <e:Button id="scratchBtn" label="" y="0" x="-5.32">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
<e:Label id="scratchTips" text="立即到" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xFFFFFF" size="18" fontFamily="FZY3JW"/> <e:Label id="scratchTips" text="立即到" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" textColor="0xFFFFFF" size="18" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="taskGroup" y="324.96" right="30"> <e:Group id="taskGroup" y="325" right="30">
<e:Button id="taskBtn" label="" y="0"> <e:Button id="taskBtn" label="" y="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
......
...@@ -11,51 +11,30 @@ ...@@ -11,51 +11,30 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Group id="duibaGroup" width="400" height="621" horizontalCenter="0" top="360"> <e:Group id="duibaGroup" horizontalCenter="0" top="360" visible="false">
<e:Button id="duibaBtn" label="" y="508" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="TaskCenterGame_png" source.down="TaskCenterGame_png" source.disabled="TaskCenterGame_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label text="啊哦,奖励擦肩而过…" y="0" textColor="0xf54500" fontFamily="FZY3JW" size="40" horizontalCenter="0"/> <e:Label text="啊哦,奖励擦肩而过…" y="0" textColor="0xf54500" fontFamily="FZY3JW" size="40" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:Group id="shopGroup" width="400" height="621" horizontalCenter="0" top="360" visible="false"> <e:Group id="shopGroup" horizontalCenter="0" top="360">
<e:Button id="shopBtn" label="" y="508" horizontalCenter="0"> <e:Label text="继续逛逛店铺,还可以获得更多奖励哦~" y="20" fontFamily="FZY3JW" size="28" horizontalCenter="0" x="10" textColor="0xfb6300"/>
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="TaskCenterShop_png" source.down="TaskCenterShop_png" source.disabled="TaskCenterShop_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label text="继续浏逛逛店铺,还可以获得更多奖励哦~" y="20" fontFamily="FZY3JW" size="28" horizontalCenter="0" x="10" textColor="0xfb6300"/>
<e:Label text="换个姿势,再来一次!" y="-40" textColor="0xF54500" fontFamily="FZY3JW" size="46" horizontalCenter="0" x="-30" scaleX="1" scaleY="1"/> <e:Label text="换个姿势,再来一次!" y="-40" textColor="0xF54500" fontFamily="FZY3JW" size="46" horizontalCenter="0" x="-30" scaleX="1" scaleY="1"/>
</e:Group> </e:Group>
<e:Group id="watchGroup" width="400" height="621" horizontalCenter="0" top="360" visible="false"> <e:Group id="watchGroup" horizontalCenter="0" top="360" visible="false">
<e:Label text="换个姿势,再来一次!" y="-40" textColor="0xF54500" fontFamily="FZY3JW" size="46" horizontalCenter="0"/> <e:Label text="换个姿势,再来一次!" y="-40" textColor="0xF54500" fontFamily="FZY3JW" size="46" horizontalCenter="0"/>
<e:Label text="继续浏览商品,还可以获得更多奖励哦~" y="20" fontFamily="FZY3JW" size="28" horizontalCenter="0" x="10" textColor="0xfb6300"/> <e:Label text="继续浏览商品,还可以获得更多奖励哦~" y="20" fontFamily="FZY3JW" size="28" horizontalCenter="0" x="10" textColor="0xfb6300"/>
<e:Button id="watchBtn" label="" y="508" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="TaskCenterWatch_png" source.down="TaskCenterWatch_png" source.disabled="TaskCenterWatch_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group> </e:Group>
<e:Group id="buyGroup" width="400" height="621" horizontalCenter="0" top="360" visible="false"> <e:Group id="buyGroup" horizontalCenter="0" top="360" visible="false">
<e:Label text="换个姿势,再来一次!" y="-40" textColor="0xF54500" fontFamily="FZY3JW" size="46" horizontalCenter="0"/> <e:Label text="换个姿势,再来一次!" y="-40" textColor="0xF54500" fontFamily="FZY3JW" size="46" horizontalCenter="0"/>
<e:Label text="继续下单还可以获得更多奖励哦~" y="20" fontFamily="FZY3JW" size="28" horizontalCenter="0" x="10" textColor="0xfb6300"/> <e:Label text="继续下单还可以获得更多奖励哦~" y="20" fontFamily="FZY3JW" size="28" horizontalCenter="0" x="10" textColor="0xfb6300"/>
<e:Button id="buyBtn" label="" y="508" horizontalCenter="0"> </e:Group>
<e:Group id="btn" x="196" y="875" width="358" height="113">
<e:Button label="" y="0" x="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="TaskCenterBuy_png" source.down="TaskCenterBuy_png" source.disabled="TaskCenterBuy_png"/> <e:Image width="100%" height="100%" source="TaskCenter_btn_png" source.down="TaskCenter_btn_png" source.disabled="TaskCenter_btn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Label id="btnLabel" text="继续闯关" y="29" size="42" strokeColor="0x2091e9" stroke="3" horizontalCenter="0" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -20,5 +20,8 @@ ...@@ -20,5 +20,8 @@
<e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/> <e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
<e:Label id="tipsLabel" text="继续完成任务可以获得更多元宝哦~" y="632.73" textColor="0xF54500" fontFamily="FZY3JW" size="26" horizontalCenter="0"/> <e:Label id="tipsLabel" text="继续完成任务可以获得更多元宝哦~" y="632.73" textColor="0xF54500" fontFamily="FZY3JW" size="26" horizontalCenter="0"/>
<e:Image id="btn" y="676" source="TaskCenterGame_png" horizontalCenter="0"/> <e:Group id="btn" x="214" y="690">
<e:Image y="0" source="TaskCenter_btn_png" scaleX="0.9" scaleY="0.9" x="0"/>
<e:Label id="btnLabel" text="继续闯关" y="27" size="35" strokeColor="0x2091e9" stroke="3" fontFamily="FZY3JW" x="91"/>
</e:Group>
</e:Skin> </e:Skin>
...@@ -11,9 +11,13 @@ ...@@ -11,9 +11,13 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Scroller id="taskScroller" width="674" height="522.34" y="170.81" horizontalCenter="0" anchorOffsetY="0"> <e:Scroller width="674" height="522.34" y="170.81" horizontalCenter="0" anchorOffsetY="0">
<e:Group anchorOffsetX="0" width="222.73" anchorOffsetY="0" height="525"> <e:Group anchorOffsetX="0" width="222.73" anchorOffsetY="0" height="525">
<e:List id="list" left="0" right="0" horizontalCenter="0" y="0"/> <e:List id="list" left="0" right="0" horizontalCenter="0" y="0">
<e:layout>
<e:VerticalLayout gap="22"/>
</e:layout>
</e:List>
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -20,7 +20,7 @@ export default class ScratchIcon extends IconBase { ...@@ -20,7 +20,7 @@ export default class ScratchIcon extends IconBase {
} }
updateScratchPosition(){ updateScratchPosition(){
this['iconGroup'].y = 318; this.iconGroup.y -= 150;
} }
protected start() { protected start() {
......
import IconBase from "./IconBase"; import IconBase from "./IconBase";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
export default class ScratchIcon extends IconBase { export default class TaskCenterIcon extends IconBase {
constructor(name: string, group: eui.Group, btn: eui.Button, tipsBg?: eui.Image, tipsLabel?: eui.Label) { constructor(name: string, group: eui.Group, btn: eui.Button, tipsBg?: eui.Image, tipsLabel?: eui.Label) {
super(name, group, btn, tipsBg, tipsLabel); super(name, group, btn, tipsBg, tipsLabel);
} }
protected start() { protected start() {
super.start(); super.start();
NetManager.ins.getTaskInfo((success, res) => {
if(!success) {
return;
}
const data = res.data;
if(!data || data.length <= 0){
this.visible = false;
GDispatcher.dispatchEvent('updateTurnTablePosition');
}
});
} }
/** /**
......
...@@ -20,6 +20,12 @@ export default class TurntableIcon extends IconBase { ...@@ -20,6 +20,12 @@ export default class TurntableIcon extends IconBase {
//没有免费次数 //没有免费次数
//如果元宝足够 //如果元宝足够
this.updateIcon(); this.updateIcon();
GDispatcher.addEvent('updateTurnTablePosition',this.updateTurnTablePosition,this)
}
updateTurnTablePosition(){
this.iconGroup.y -= 150;
GDispatcher.dispatchEvent('updateScratchPosition'); // 下面这个跟着上移
} }
updateIcon(){ updateIcon(){
......
...@@ -5,9 +5,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; ...@@ -5,9 +5,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher"; import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
export default class TaskCenter extends Panel { export default class TaskCenter extends Panel {
public closeBtn: eui.Button; public closeBtn:eui.Button;
public taskScroller: eui.Scroller; public list:eui.List;
public list: eui.List;
onShowAnim() { onShowAnim() {
let canvasH = 750 / window.innerWidth * window.innerHeight; let canvasH = 750 / window.innerWidth * window.innerHeight;
...@@ -85,9 +84,11 @@ class TaskCenterItem extends eui.ItemRenderer { ...@@ -85,9 +84,11 @@ class TaskCenterItem extends eui.ItemRenderer {
// '0xf99f45' getPrize 橙色 // '0xf99f45' getPrize 橙色
// 设置按钮 // 设置按钮
private setBtn() { private setBtn() {
const count = this.data.count; const count = this.data.count; // 领取奖励*count
const done = this.data.done; const done = this.data.done;
const limit = this.data.limit; const limit = this.data.limit; // done/limit
const appCompletelText = this.data.appCompletelText; // 已完成文案
const appIncompleteText = this.data.appIncompleteText; // 未完成文案
this.btnLabel.stroke = 2; this.btnLabel.stroke = 2;
if(count > 0) { // 可领奖 if(count > 0) { // 可领奖
...@@ -98,23 +99,27 @@ class TaskCenterItem extends eui.ItemRenderer { ...@@ -98,23 +99,27 @@ class TaskCenterItem extends eui.ItemRenderer {
// 领奖 // 领奖
NetManager.ins.taskAward((success, res) => { NetManager.ins.taskAward((success, res) => {
if(!success) { if(!success) {
PanelCtrl.instance.show('taskCenterNoPrize'); PanelCtrl.instance.show('taskCenterNoPrize', res);
return;
}
if(!res.data.option || res.data.option.categoryType == 1) { // 无奖励
PanelCtrl.instance.show('taskCenterNoPrize', res);
return; return;
} }
PanelCtrl.instance.show('taskCenterPrize', res.data); PanelCtrl.instance.show('taskCenterPrize', res.data);
}, this.data.subActivityId); }, this.data.subActivityId);
}, this); }, this);
} else if(done < limit) { // 完成 } else if(done < limit) { // 完成
this.btnImg.source = 'TaskCenter_' + 'goTask' + 'Btn_png'; this.btnImg.source = 'TaskCenter_' + 'goTask' + 'Btn_png';
this.btnLabel.text = `去完成(${done}/${limit})`; this.btnLabel.text = `${appIncompleteText}(${done}/${limit})`;
this.btnLabel.strokeColor = 0x1376df; this.btnLabel.strokeColor = 0x1376df;
this.btnGroup.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this.btnGroup.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
// 跳转任务链接 // 跳转任务链接
window.open(this.data.appIncompletelink); window.open(this.data.appIncompletelink);
}, this); }, this);
} else { } else { // 已完成
this.btnImg.source = 'TaskCenter_' + 'done' + 'Btn_png'; this.btnImg.source = 'TaskCenter_' + 'done' + 'Btn_png';
this.btnLabel.text = '已完成'; this.btnLabel.text = `${appCompletelText}`;
this.btnLabel.strokeColor = 0x7e7e7e; this.btnLabel.strokeColor = 0x7e7e7e;
} }
} }
......
...@@ -5,16 +5,42 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; ...@@ -5,16 +5,42 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
export default class TaskCenterNoPrize extends Panel { export default class TaskCenterNoPrize extends Panel {
public closeBtn: eui.Button; public closeBtn: eui.Button;
public duibaGroup: eui.Group; public duibaGroup: eui.Group;
public duibaBtn: eui.Button;
public shopGroup: eui.Group; public shopGroup: eui.Group;
public shopBtn: eui.Button;
public watchGroup: eui.Group; public watchGroup: eui.Group;
public watchBtn: eui.Button;
public buyGroup: eui.Group; public buyGroup: eui.Group;
public buyBtn: eui.Button; public btn: eui.Group;
public btnLabel: eui.Label;
// duibaGroup 去闯关
// shopGroup 继续逛店铺
// watchGroup 继续浏览商品
// buyGroup 继续下单
start(data) { start(data) {
super.start(); super.start();
console.log(data);
switch(data.code) {
case 600063: // 当前活动未配置任务奖励
case 600068: // 未中奖 有可能是奖品概率小于100%
case 600067: // 当前任务未配置奖励
case 600066: // 当前任务不能领取奖励 领奖时,传参任务id对应的任务没有剩余领奖次数
break;
case 600064: // 开发者无响应
case 600065: // 开发者响应内容异常
case 600070: // 开发者请求异常
case 600071: // 开发者响应业务处理失败 接口响应status非success或者ok
case 600069: // 苏宁风控
break;
default:
break;
}
addAdComp(84, 1014, this); addAdComp(84, 1014, this);
} }
......
...@@ -3,16 +3,17 @@ import { addAdComp } from "../BoxPanel"; ...@@ -3,16 +3,17 @@ import { addAdComp } from "../BoxPanel";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
export default class TaskCenterPrize extends Panel { export default class TaskCenterPrize extends Panel {
public closeBtn:eui.Button; public closeBtn: eui.Button;
public img:eui.Image; public img: eui.Image;
public money:eui.Image; public money: eui.Image;
public propnums2:eui.Label; public propnums2: eui.Label;
public blood:eui.Image; public blood: eui.Image;
public numsgroup:eui.Group; public numsgroup: eui.Group;
public numsbg:eui.Image; public numsbg: eui.Image;
public nums:eui.Label; public nums: eui.Label;
public tipsLabel:eui.Label; public tipsLabel: eui.Label;
public btn:eui.Image; public btn: eui.Group;
public btnLabel: eui.Label;
start(data) { start(data) {
super.start(); super.start();
......
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