Commit dca95362 authored by 邱旭's avatar 邱旭

1

parent 9cb8e20d
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
"name": "taskcenter" "name": "taskcenter"
}, },
{ {
"keys": "TaskCenterPrize_bg_png,taskPrize_money_png,taskPrize_step_png,taskPrize_bomb_png,taskPrize_chuizi_png", "keys": "TaskCenterPrize_bg_png,taskPrize_money_png,taskPrize_icon1_png,taskPrize_blood_png,taskPrize_icon3_png,taskPrize_icon2_png",
"name": "taskcenterprize" "name": "taskcenterprize"
}, },
{ {
...@@ -5143,21 +5143,6 @@ ...@@ -5143,21 +5143,6 @@
"type": "image", "type": "image",
"name": "taskPrize_money_png" "name": "taskPrize_money_png"
}, },
{
"url": "assets/TaskCenterPrize/taskPrize_step.png",
"type": "image",
"name": "taskPrize_step_png"
},
{
"url": "assets/TaskCenterPrize/taskPrize_bomb.png",
"type": "image",
"name": "taskPrize_bomb_png"
},
{
"url": "assets/TaskCenterPrize/taskPrize_chuizi.png",
"type": "image",
"name": "taskPrize_chuizi_png"
},
{ {
"url": "assets/blood/choujiang.png", "url": "assets/blood/choujiang.png",
"type": "image", "type": "image",
...@@ -5297,6 +5282,26 @@ ...@@ -5297,6 +5282,26 @@
"url": "assets/mainScene/check5.png", "url": "assets/mainScene/check5.png",
"type": "image", "type": "image",
"name": "check5_png" "name": "check5_png"
},
{
"url": "assets/TaskCenterPrize/taskPrize_icon1.png",
"type": "image",
"name": "taskPrize_icon1_png"
},
{
"url": "assets/TaskCenterPrize/taskPrize_blood.png",
"type": "image",
"name": "taskPrize_blood_png"
},
{
"url": "assets/TaskCenterPrize/taskPrize_icon3.png",
"type": "image",
"name": "taskPrize_icon3_png"
},
{
"url": "assets/TaskCenterPrize/taskPrize_icon2.png",
"type": "image",
"name": "taskPrize_icon2_png"
} }
] ]
} }
\ No newline at end of file
...@@ -12,11 +12,8 @@ ...@@ -12,11 +12,8 @@
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Image id="img" y="374.77" touchEnabled="true" width="518" height="243" scaleX="1" scaleY="1" source="{data.url}" horizontalCenter="2" anchorOffsetX="0" anchorOffsetY="0"/> <e:Image id="img" y="374.77" touchEnabled="true" width="518" height="243" scaleX="1" scaleY="1" source="{data.url}" horizontalCenter="2" anchorOffsetX="0" anchorOffsetY="0"/>
<e:Image id="money" y="460.77" scaleX="1" scaleY="1" horizontalCenter="-58.5" source="taskPrize_money_png"/> <e:Image id="prop" scaleX="1" scaleY="1" horizontalCenter="-58.5" source="taskPrize_money_png" verticalCenter="-104"/>
<e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="526.64" width="75" textAlign="right" x="287.6" fontFamily="FZY3JW" visible="false"/> <e:Group id="numsgroup" x="384.4" anchorOffsetX="0" width="188" anchorOffsetY="0" height="62" verticalCenter="-100">
<e:Image id="blood" y="376.16" source="common_blood_png" scaleX="0.7" scaleY="0.7" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="384.4" y="468.27" anchorOffsetX="0" width="188" anchorOffsetY="0" height="62">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0" visible="false"/>
<e:Label id="nums" text="×8" size="48" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" textColor="0xc17343" left="0" bold="true"/> <e:Label id="nums" text="×8" size="48" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" textColor="0xc17343" left="0" bold="true"/>
</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"/>
......
...@@ -11,13 +11,16 @@ ...@@ -11,13 +11,16 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Scroller width="674" height="515" y="382.81" horizontalCenter="2" anchorOffsetY="0"> <e:Scroller width="674" height="543" y="370.81" horizontalCenter="2" anchorOffsetY="0">
<e:Group anchorOffsetX="0" width="222.73" anchorOffsetY="0" height="532.33" x="0" y="4"> <e:Group anchorOffsetX="0" width="222.73" anchorOffsetY="0" height="536.34" x="0" y="-1.33">
<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:layout>
<e:VerticalLayout gap="22"/> <e:VerticalLayout gap="22"/>
</e:layout> </e:layout>
</e:List> </e:List>
<e:layout>
<e:VerticalLayout gap="5"/>
</e:layout>
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -6,6 +6,7 @@ import { GDispatcher } from "../../../libs/tc/util/GDispatcher"; ...@@ -6,6 +6,7 @@ import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { Buried } from "../../../libs/tw/util/Buried"; import { Buried } from "../../../libs/tw/util/Buried";
import { DataManager } from "../../../libs/tw/manager/DataManager"; import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetName } from "../../../libs/tw/enum/NetName"; import { NetName } from "../../../libs/tw/enum/NetName";
import tr = egret.sys.tr;
export default class TaskCenter extends Panel { export default class TaskCenter extends Panel {
public closeBtn: eui.Button; public closeBtn: eui.Button;
...@@ -90,16 +91,26 @@ class TaskCenterItem extends eui.ItemRenderer { ...@@ -90,16 +91,26 @@ class TaskCenterItem extends eui.ItemRenderer {
let config = DataManager.ins.getData(NetName.GET_CONFIG).data || null; let config = DataManager.ins.getData(NetName.GET_CONFIG).data || null;
let taskConfig = config.taskConfs || []; let taskConfig = config.taskConfs || [];
for(let i = 0; i < taskConfig.length; i++) {
// if(this.data.subActivityId == ){ let has = false;
// for(let task of taskConfig) {
// } if(this.data.subActivityId == task.taskMark) {
for(let prize of task.prizeList) {
if(prize.categoryType == 4
&& prize.minValue == prize.maxValue) {
has = true;
this.moneyGroup.visible = true;
this.moneyCount.text = ${prize.maxValue}`;
this.moneyGroup.x = this.remark.x + this.remark.width + 20;
}
}
}
} }
let count = this.data.remark.match(/(?<=得).*?(?=元宝)/); if(!has) {
this.moneyCount.text = ${count[count.length - 1]}`; this.moneyGroup.visible = false;
}
this.moneyGroup.x = this.remark.x + this.remark.width + 20;
this.setBtn(); // 设置按钮 this.setBtn(); // 设置按钮
} }
......
...@@ -8,17 +8,14 @@ import { changeMapScene } from "../../startScene/StartScene"; ...@@ -8,17 +8,14 @@ import { changeMapScene } from "../../startScene/StartScene";
import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl"; import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
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 prop:eui.Image;
public propnums2: eui.Label; public numsgroup:eui.Group;
public blood: eui.Image; public nums:eui.Label;
public numsgroup: eui.Group; public tipsLabel:eui.Label;
public numsbg: eui.Image; public btn:eui.Group;
public nums: eui.Label; public btnLabel:eui.Label;
public tipsLabel: eui.Label;
public btn: eui.Group;
public btnLabel: eui.Label;
start(data) { start(data) {
super.start(); super.start();
...@@ -57,38 +54,40 @@ export default class TaskCenterPrize extends Panel { ...@@ -57,38 +54,40 @@ export default class TaskCenterPrize extends Panel {
updateOption(option: any) { updateOption(option: any) {
const {categoryType, img, num, propType, realValue} = option; // 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品 const {categoryType, img, num, propType, realValue} = option; // 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this.img.visible = false;
this.numsgroup.visible = false;
this.prop.visible = false;
this['nums'].text = 'x' + realValue; switch(categoryType) {
case 2:
this.numsgroup.visible = true;
this.prop.visible = true;
this.nums.text = '×' + num;
this.prop.source = 'taskPrize_blood_png';
this.tipsLabel.text = '继续完成任务可以获得更多体力哦~';
break;
case 3:
this.numsgroup.visible = true;
this.prop.visible = true;
this.nums.text = '×' + num;
this.prop.source = `taskPrize_icon${propType}_png`;
this.tipsLabel.text = '继续完成任务可以获得更多道具哦~';
break;
// this['nums'].text = 'x1'; case 4:
// if(num) this.numsgroup.visible = true;
// this['nums'].text = 'x' + num; this.prop.visible = true;
// switch(categoryType) { this.nums.text = '×' + realValue;
// case 2: this.prop.source = 'taskPrize_money_png';
// this['blood'].visible = true; this.tipsLabel.text = '继续完成任务可以获得更多元宝哦~';
// this['numsgroup'].visible = true; break;
// this.tipsLabel.text = '继续完成任务可以获得更多体力哦~';
// break; default:
// case 3: this.img.visible = true;
// this['numsgroup'].visible = true; this.img.source = img;
// this['img'].visible = true; this.tipsLabel.text = '继续完成任务可以获得更多优惠哦~';
// this.data.url = `turnprize_icon${propType}_png`; break;
// this.tipsLabel.text = '继续完成任务可以获得更多道具哦~'; }
// break;
// case 4:
// this['numsgroup'].visible = true;
// this['nums'].text = 'x' + realValue;
// this['money'].visible = true;
// // this['propnums2'].visible = true;
// // this['propnums2'].text = realValue;
// this.tipsLabel.text = '继续完成任务可以获得更多元宝哦~';
// break;
// default:
// this['img'].visible = true;
// this.data.url = img;
// this.tipsLabel.text = '继续完成任务可以获得更多优惠哦~';
// break;
// }
} }
onTouchTap_closeBtn() { onTouchTap_closeBtn() {
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"categoryType": 4, "categoryType": 4,
"title": "固定十元宝", "title": "固定十元宝",
"rate": "100", "rate": "100",
"minValue": 2, "minValue": 12,
"maxValue": 12, "maxValue": 12,
"coinType": 1, "coinType": 1,
"realValue": null, "realValue": null,
......
...@@ -34,12 +34,72 @@ ...@@ -34,12 +34,72 @@
"count": 0, "count": 0,
"tips": "你好" "tips": "你好"
}, },
{
"subActivityId": "SUB446971598063666666",
"subActivityName": "狮狮连萌下单",
"status": "1",
"taskStatus": "0",
"remark": "下单",
"taskTitle": "狮狮连萌下单任务",
"taskViceTitle": "狮狮连萌下单任务",
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
"limit": "1",
"done": "1",
"appIncompleteText": "去看看",
"appCompleteText": "已完成",
"appIncompletelink": "http://cprexg.m.cnsuning.com/snWhale.html#/fight",
"appCompletelink": "//m.suning.com",
"pcIncompleteText": null,
"pcCompleteText": "已完成",
"pcIncompletelink": null,
"pcCompletelink": "",
"homeLink": "https://gameactprexg.cnsuning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651405",
"receivetype": "0",
"browseSecond": null,
"incompleteLink": null,
"completeLink": null,
"terminalType": "9",
"taskName": null,
"taskId": null,
"count": 0,
"tips": "你好"
},
{ {
"subActivityId": "SUB446970931785445376", "subActivityId": "SUB446970931785445376",
"subActivityName": "狮狮连萌逛店铺", "subActivityName": "狮狮连萌逛店铺",
"status": "1", "status": "1",
"taskStatus": "99", "taskStatus": "99",
"remark": "逛店铺15秒得30元宝", "remark": "逛店铺15秒",
"taskTitle": "狮狮连萌逛店铺",
"taskViceTitle": "200金币",
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
"limit": "3",
"done": "3",
"appIncompleteText": "去看看",
"appCompleteText": "已完成",
"appIncompletelink": "",
"appCompletelink": "//m.suning.com",
"pcIncompleteText": null,
"pcCompleteText": "已完成",
"pcIncompletelink": null,
"pcCompletelink": "",
"homeLink": "https://gameactprexg.cnsuning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651405",
"receivetype": "0",
"browseSecond": "10",
"incompleteLink": "//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157438697439978713.png",
"completeLink": "//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157438697442128421.png",
"terminalType": "9",
"taskName": "狮狮连萌逛店铺",
"taskId": "RW448429803289649152",
"count": "2",
"tips": "你好02"
},
{
"subActivityId": "SUB446970931785777777",
"subActivityName": "狮狮连萌逛店铺",
"status": "1",
"taskStatus": "99",
"remark": "逛店铺15秒",
"taskTitle": "狮狮连萌逛店铺", "taskTitle": "狮狮连萌逛店铺",
"taskViceTitle": "200金币", "taskViceTitle": "200金币",
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg", "icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
...@@ -69,7 +129,7 @@ ...@@ -69,7 +129,7 @@
"subActivityName": "狮狮连萌逛会场", "subActivityName": "狮狮连萌逛会场",
"status": "1", "status": "1",
"taskStatus": "99", "taskStatus": "99",
"remark": "浏览店铺得9999元宝", "remark": "浏览店铺",
"taskTitle": "狮狮连萌逛会场任务", "taskTitle": "狮狮连萌逛会场任务",
"taskViceTitle": null, "taskViceTitle": null,
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg", "icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
......
...@@ -7,15 +7,15 @@ ...@@ -7,15 +7,15 @@
"option": { "option": {
"id": "224", "id": "224",
"day": null, "day": null,
"categoryType": 4, "categoryType": 3,
"title": "炸弹", "title": "炸弹",
"rate": "50", "rate": "50",
"minValue": null, "minValue": null,
"maxValue": null, "maxValue": null,
"coinType": null, "coinType": null,
"realValue": 30, "realValue": 30,
"propType": 4, "propType": 2,
"num": null, "num": 2,
"img": "", "img": "",
"appItemId": null, "appItemId": null,
"name": "", "name": "",
......
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