Commit ab71e2bb authored by 邱旭's avatar 邱旭

1

parent 1119ba58
...@@ -92,6 +92,7 @@ class TaskCenterItem extends eui.ItemRenderer { ...@@ -92,6 +92,7 @@ class TaskCenterItem extends eui.ItemRenderer {
const limit = this.data.limit; // done/limit const limit = this.data.limit; // done/limit
const appCompleteText = this.data.appCompleteText; // 已完成文案 const appCompleteText = this.data.appCompleteText; // 已完成文案
const appIncompleteText = this.data.appIncompleteText; // 未完成文案 const appIncompleteText = this.data.appIncompleteText; // 未完成文案
const status = this.data.status;
this.btnLabel.stroke = 2; this.btnLabel.stroke = 2;
if(count > 0) { // 可领奖 if(count > 0) { // 可领奖
...@@ -121,7 +122,7 @@ class TaskCenterItem extends eui.ItemRenderer { ...@@ -121,7 +122,7 @@ class TaskCenterItem extends eui.ItemRenderer {
PanelCtrl.instance.show('taskCenterPrize', {prizeData: res, taskData: this.data}); PanelCtrl.instance.show('taskCenterPrize', {prizeData: res, taskData: this.data});
}, this.data.subActivityId); }, this.data.subActivityId);
}, this); }, this);
} else if(done < limit) { // 未完成 } else if(status == 0 && done < limit) { // 未完成
NetManager.ins.showLog(getlogItem(63)); NetManager.ins.showLog(getlogItem(63));
this.btnImg.source = 'TaskCenter_' + 'goTask' + 'Btn_png'; this.btnImg.source = 'TaskCenter_' + 'goTask' + 'Btn_png';
this.btnLabel.text = `${appIncompleteText}(${done}/${limit})`; this.btnLabel.text = `${appIncompleteText}(${done}/${limit})`;
......
...@@ -30,9 +30,9 @@ export default class TaskCenterNoPrize extends Panel { ...@@ -30,9 +30,9 @@ export default class TaskCenterNoPrize extends Panel {
// 修改按钮文案 // 修改按钮文案
// 修改按钮监听 // 修改按钮监听
// 修改提示文案 // 修改提示文案
this.btnLabel.text = (taskData.limit == taskData.done) ? "继续闯关" : (taskData.tips || '继续完成'); this.btnLabel.text = (taskData.status == 1) ? "继续闯关" : (taskData.tips || '继续完成');
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(taskData.limit == taskData.done) { if(taskData.status == 1) {
// 去闯关 // 去闯关
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().levels.length + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
......
...@@ -30,12 +30,12 @@ export default class TaskCenterPrize extends Panel { ...@@ -30,12 +30,12 @@ export default class TaskCenterPrize extends Panel {
this.updateOption(data.prizeData.data.option); this.updateOption(data.prizeData.data.option);
const taskData = data.taskData; const taskData = data.taskData;
this.btnLabel.text = (taskData.limit == taskData.done) ? "继续闯关" : (taskData.tips || '继续完成'); this.btnLabel.text = (taskData.status == 1) ? "继续闯关" : (taskData.tips || '继续完成');
if(taskData.limit == taskData.done) { if(taskData.status == 1) {
NetManager.ins.showLog(getlogItem(66)); NetManager.ins.showLog(getlogItem(66));
} }
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(taskData.limit == taskData.done) { if(taskData.status == 1) {
NetManager.ins.clickLog(getlogItem(66)); NetManager.ins.clickLog(getlogItem(66));
// 去闯关 // 去闯关
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().levels.length + 1) > window['last_level']) {
......
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