Commit c9b9b674 authored by wildfirecode's avatar wildfirecode

Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev

parents 311c3136 dca95362
......@@ -205,7 +205,7 @@
"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"
},
{
......@@ -5143,21 +5143,6 @@
"type": "image",
"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",
"type": "image",
......@@ -5297,6 +5282,26 @@
"url": "assets/mainScene/check5.png",
"type": "image",
"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 @@
</e:skinName>
</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="money" y="460.77" scaleX="1" scaleY="1" horizontalCenter="-58.5" source="taskPrize_money_png"/>
<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: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:Image id="prop" scaleX="1" scaleY="1" horizontalCenter="-58.5" source="taskPrize_money_png" verticalCenter="-104"/>
<e:Group id="numsgroup" x="384.4" anchorOffsetX="0" width="188" anchorOffsetY="0" height="62" verticalCenter="-100">
<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:Label id="tipsLabel" text="继续完成任务可以获得更多元宝哦~" y="632.73" textColor="0xF54500" fontFamily="FZY3JW" size="26" horizontalCenter="0"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignPrizeSkin" width="750" height="1300" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="SignPrizeSkin" width="750" height="990" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16d5c2563cb"/>
<e:Component y="758.04" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image y="0" horizontalCenter="0" source="TaskCenter_bg_png"/>
<e:Image y="0" source="TaskCenter_bg_png" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="641" y="285.81">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -11,13 +11,16 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Scroller width="674" height="800" y="378.81" horizontalCenter="2" anchorOffsetY="0">
<e:Group anchorOffsetX="0" width="222.73" anchorOffsetY="0" height="800">
<e:Scroller width="674" height="543" y="370.81" horizontalCenter="2" anchorOffsetY="0">
<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:layout>
<e:VerticalLayout gap="22"/>
</e:layout>
</e:List>
<e:layout>
<e:VerticalLayout gap="5"/>
</e:layout>
</e:Group>
</e:Scroller>
</e:Skin>
\ No newline at end of file
......@@ -4,6 +4,9 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { Buried } from "../../../libs/tw/util/Buried";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetName } from "../../../libs/tw/enum/NetName";
import tr = egret.sys.tr;
export default class TaskCenter extends Panel {
public closeBtn: eui.Button;
......@@ -11,12 +14,9 @@ export default class TaskCenter extends Panel {
onShowAnim() {
let canvasH = 750 / window.innerWidth * window.innerHeight;
// let canvasW = 750 / window.innerWidth * window.innerWidth;
// console.log({
// canvasW: canvasW,
// canvasH: canvasH
// });
egret.Tween.get(this).set({y: canvasH}).to({y: canvasH - this.height}, 300, egret.Ease.quadInOut);
egret.Tween.get(this)
.set({y: canvasH})
.to({y: canvasH - this.height + 1}, 300, egret.Ease.quadInOut);
}
start(data) {
......@@ -33,8 +33,14 @@ export default class TaskCenter extends Panel {
return;
}
const data = res.data;
this.list.dataProvider = new eui.ArrayCollection(data);
new eui.ArrayCollection(data);
NetManager.ins.getConfigInfo((success, res) => {
if(!success) {
return;
}
this.list.dataProvider = new eui.ArrayCollection(data);
new eui.ArrayCollection(data);
});
});
}
......@@ -82,10 +88,29 @@ class TaskCenterItem extends eui.ItemRenderer {
this.title.text = this.data.taskTitle;
this.remark.text = this.data.remark;
let count = this.data.remark.match(/(?<=得).*?(?=元宝)/);
this.moneyCount.text = ${count[count.length - 1]}`;
let config = DataManager.ins.getData(NetName.GET_CONFIG).data || null;
let taskConfig = config.taskConfs || [];
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;
}
}
}
}
if(!has) {
this.moneyGroup.visible = false;
}
this.moneyGroup.x = this.remark.x + this.remark.width + 20;
this.setBtn(); // 设置按钮
}
......
......@@ -8,17 +8,14 @@ import { changeMapScene } from "../../startScene/StartScene";
import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
export default class TaskCenterPrize extends Panel {
public closeBtn: eui.Button;
public img: eui.Image;
public money: eui.Image;
public propnums2: eui.Label;
public blood: eui.Image;
public numsgroup: eui.Group;
public numsbg: eui.Image;
public nums: eui.Label;
public tipsLabel: eui.Label;
public btn: eui.Group;
public btnLabel: eui.Label;
public closeBtn:eui.Button;
public img:eui.Image;
public prop:eui.Image;
public numsgroup:eui.Group;
public nums:eui.Label;
public tipsLabel:eui.Label;
public btn:eui.Group;
public btnLabel:eui.Label;
start(data) {
super.start();
......@@ -57,38 +54,40 @@ export default class TaskCenterPrize extends Panel {
updateOption(option: any) {
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';
// if(num)
// this['nums'].text = 'x' + num;
// switch(categoryType) {
// case 2:
// this['blood'].visible = true;
// this['numsgroup'].visible = true;
// this.tipsLabel.text = '继续完成任务可以获得更多体力哦~';
// break;
// case 3:
// this['numsgroup'].visible = true;
// this['img'].visible = true;
// this.data.url = `turnprize_icon${propType}_png`;
// 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;
// }
case 4:
this.numsgroup.visible = true;
this.prop.visible = true;
this.nums.text = '×' + realValue;
this.prop.source = 'taskPrize_money_png';
this.tipsLabel.text = '继续完成任务可以获得更多元宝哦~';
break;
default:
this.img.visible = true;
this.img.source = img;
this.tipsLabel.text = '继续完成任务可以获得更多优惠哦~';
break;
}
}
onTouchTap_closeBtn() {
......
......@@ -109,7 +109,7 @@
"categoryType": 4,
"title": "固定十元宝",
"rate": "100",
"minValue": 2,
"minValue": 12,
"maxValue": 12,
"coinType": 1,
"realValue": null,
......
......@@ -34,12 +34,72 @@
"count": 0,
"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",
"subActivityName": "狮狮连萌逛店铺",
"status": "1",
"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": "狮狮连萌逛店铺",
"taskViceTitle": "200金币",
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
......@@ -69,7 +129,7 @@
"subActivityName": "狮狮连萌逛会场",
"status": "1",
"taskStatus": "99",
"remark": "浏览店铺得9999元宝",
"remark": "浏览店铺",
"taskTitle": "狮狮连萌逛会场任务",
"taskViceTitle": null,
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
......
......@@ -7,15 +7,15 @@
"option": {
"id": "224",
"day": null,
"categoryType": 4,
"categoryType": 3,
"title": "炸弹",
"rate": "50",
"minValue": null,
"maxValue": null,
"coinType": null,
"realValue": 30,
"propType": 4,
"num": null,
"propType": 2,
"num": 2,
"img": "",
"appItemId": null,
"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