|
|
@@ -4,6 +4,7 @@
|
|
|
*/
|
|
|
|
|
|
import JsbSystem from "../../../mk/system/JsbSystem";
|
|
|
+import TableView from "../../component/TableView";
|
|
|
import { AdFun } from "../../data/AdData";
|
|
|
import { DataEventId, VideoAdType } from "../../data/GameData";
|
|
|
import { cashProType } from "../../data/module/CashProData";
|
|
|
@@ -71,6 +72,8 @@ export default class BlessingBag extends cc.Component {
|
|
|
|
|
|
@property(cc.Node)
|
|
|
node_xiabiao: cc.Node = null;
|
|
|
+ @property(TableView)
|
|
|
+ tableview: TableView = null;
|
|
|
|
|
|
/**红包页面类型 1 大额 2 任务*/
|
|
|
private rbPanelType: number = 0;
|
|
|
@@ -107,84 +110,97 @@ export default class BlessingBag extends cc.Component {
|
|
|
}
|
|
|
|
|
|
UpdateInfo() {
|
|
|
- let data = gData.blessingBag.videoRbData;
|
|
|
- if (!data) {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- this.targetProgress = data.cumulativeAmount;
|
|
|
-
|
|
|
- //this.txtBigDelta.node.active = data.showTask != 1;
|
|
|
- //this.txtBigTask.node.active = data.showTask == 1;
|
|
|
- this.txtTipAd.string = data.showTask == 1 ? "提现中..." : "<b>满<color=#FFE00C>" + data.requestAmount + "元</color>可提现</b>";
|
|
|
- //this.txtBigDelta.string = "<outline color=#8C1010 width=4><b>每次视频额外奖励<color=#FFE00C>" + data.videoAmountPerTime + "元</color></b></outline>";
|
|
|
- //this.txtBigTask.string = "<outline color=#8C1010 width=4>金额已达标,完成<color=#4EB7FF>观看视频</color>任务可到账"
|
|
|
- + "\n观看视频次数:<color=#FFE00C>" + data.taskVideoWatchTime + "/" + data.taskVideoTime + "</color>,连续观看天数:<color=#FFE00C>" + data.taskVideoWatchDay + "/" + data.taskVideoDay + "</color></outline>"
|
|
|
-
|
|
|
- this.txtRemaindAdNum.string = "<color=#FDFCF5>今日剩余次数:</c><color=#FFE533>" + data.videoTime + "</color>";
|
|
|
- this.adIcon.active = data.needToWatchTheVideo == 1;
|
|
|
-
|
|
|
- if (gData.blessingBag.isPlayAniUpdate) {
|
|
|
- if (this.lastNum < data.cumulativeAmount) {
|
|
|
- //let world_pos = this.btnCash.parent.convertToWorldSpaceAR(this.btnCash.getPosition());
|
|
|
- // mk.fly.PlayCoinAnim(1, 10, this.btnAd, '', () => {
|
|
|
- // this.aniBigAdBtn.setCurrentTime(0);
|
|
|
- // this.aniBigAdBtn.play();
|
|
|
- // });
|
|
|
- this.txtAddEft.node.setPosition(cc.v2(0, 380));
|
|
|
- this.txtAddEft.string = "+" + data.videoAmountPerTime + "元";
|
|
|
- this.txtAddEft.node.stopAllActions();
|
|
|
- this.txtAddEft.node.scale = 0;
|
|
|
- this.txtAddEft.node.opacity = 255;
|
|
|
- this.txtAddEft.node.active = true;
|
|
|
-
|
|
|
- let a0 = cc.delayTime(0.8);
|
|
|
- let a1t = cc.sequence(cc.scaleTo(0.15, 1.2), cc.scaleTo(0.15, 1));
|
|
|
- let a1a = cc.spawn(cc.moveBy(0.3, cc.v2(0, 30)), a1t);
|
|
|
- let a2 = cc.delayTime(0.5);
|
|
|
- let a3 = cc.fadeOut(0.15);
|
|
|
- let a4 = cc.callFunc(() => {
|
|
|
- //this.txtBigNum.string = data.cumulativeAmount + "元";
|
|
|
- this.PlayMoneyAni(0.2);
|
|
|
- this.txtAddEft.node.active = false;
|
|
|
- });
|
|
|
- this.txtAddEft.node.runAction(cc.sequence(a0, a1a, a2, a3, a4));
|
|
|
-
|
|
|
- } else {
|
|
|
- this.txtBigNum.string = data.cumulativeAmount.toFixed(2) + "元";
|
|
|
- this.lastNum = data.cumulativeAmount;
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.txtBigNum.string = data.cumulativeAmount.toFixed(2) + "元";
|
|
|
- this.lastNum = data.cumulativeAmount;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if (this.adrbArray.length < 4) {
|
|
|
- this.adrbArray = [];
|
|
|
-
|
|
|
- for (let i = 0; i < data.redMonies.length; i++) {
|
|
|
- let obj = {
|
|
|
- data: data.redMonies[i],
|
|
|
- isPlayAniUpdate: gData.blessingBag.isPlayAniUpdate,
|
|
|
- isPlayInitAni: this.isPlayInitAni
|
|
|
- }
|
|
|
- this.adrbArray.push(obj);
|
|
|
- }
|
|
|
+ // let data = gData.blessingBag.videoRbData;
|
|
|
+ // if (!data) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
+ // this.targetProgress = data.cumulativeAmount;
|
|
|
+
|
|
|
+ // //this.txtBigDelta.node.active = data.showTask != 1;
|
|
|
+ // //this.txtBigTask.node.active = data.showTask == 1;
|
|
|
+ // this.txtTipAd.string = data.showTask == 1 ? "提现中..." : "<b>满<color=#FFE00C>" + data.requestAmount + "元</color>可提现</b>";
|
|
|
+ // //this.txtBigDelta.string = "<outline color=#8C1010 width=4><b>每次视频额外奖励<color=#FFE00C>" + data.videoAmountPerTime + "元</color></b></outline>";
|
|
|
+ // //this.txtBigTask.string = "<outline color=#8C1010 width=4>金额已达标,完成<color=#4EB7FF>观看视频</color>任务可到账"
|
|
|
+ // + "\n观看视频次数:<color=#FFE00C>" + data.taskVideoWatchTime + "/" + data.taskVideoTime + "</color>,连续观看天数:<color=#FFE00C>" + data.taskVideoWatchDay + "/" + data.taskVideoDay + "</color></outline>"
|
|
|
+
|
|
|
+ // this.txtRemaindAdNum.string = "<color=#FDFCF5>今日剩余次数:</c><color=#FFE533>" + data.videoTime + "</color>";
|
|
|
+ // this.adIcon.active = data.needToWatchTheVideo == 1;
|
|
|
+
|
|
|
+ // if (gData.blessingBag.isPlayAniUpdate) {
|
|
|
+ // if (this.lastNum < data.cumulativeAmount) {
|
|
|
+ // //let world_pos = this.btnCash.parent.convertToWorldSpaceAR(this.btnCash.getPosition());
|
|
|
+ // // mk.fly.PlayCoinAnim(1, 10, this.btnAd, '', () => {
|
|
|
+ // // this.aniBigAdBtn.setCurrentTime(0);
|
|
|
+ // // this.aniBigAdBtn.play();
|
|
|
+ // // });
|
|
|
+ // this.txtAddEft.node.setPosition(cc.v2(0, 380));
|
|
|
+ // this.txtAddEft.string = "+" + data.videoAmountPerTime + "元";
|
|
|
+ // this.txtAddEft.node.stopAllActions();
|
|
|
+ // this.txtAddEft.node.scale = 0;
|
|
|
+ // this.txtAddEft.node.opacity = 255;
|
|
|
+ // this.txtAddEft.node.active = true;
|
|
|
+
|
|
|
+ // let a0 = cc.delayTime(0.8);
|
|
|
+ // let a1t = cc.sequence(cc.scaleTo(0.15, 1.2), cc.scaleTo(0.15, 1));
|
|
|
+ // let a1a = cc.spawn(cc.moveBy(0.3, cc.v2(0, 30)), a1t);
|
|
|
+ // let a2 = cc.delayTime(0.5);
|
|
|
+ // let a3 = cc.fadeOut(0.15);
|
|
|
+ // let a4 = cc.callFunc(() => {
|
|
|
+ // //this.txtBigNum.string = data.cumulativeAmount + "元";
|
|
|
+ // this.PlayMoneyAni(0.2);
|
|
|
+ // this.txtAddEft.node.active = false;
|
|
|
+ // });
|
|
|
+ // this.txtAddEft.node.runAction(cc.sequence(a0, a1a, a2, a3, a4));
|
|
|
+
|
|
|
+ // } else {
|
|
|
+ // this.txtBigNum.string = data.cumulativeAmount.toFixed(2) + "元";
|
|
|
+ // this.lastNum = data.cumulativeAmount;
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.txtBigNum.string = data.cumulativeAmount.toFixed(2) + "元";
|
|
|
+ // this.lastNum = data.cumulativeAmount;
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // if (this.adrbArray.length < 4) {
|
|
|
+ // this.adrbArray = [];
|
|
|
+
|
|
|
+ // for (let i = 0; i < data.redMonies.length; i++) {
|
|
|
+ // let obj = {
|
|
|
+ // data: data.redMonies[i],
|
|
|
+ // isPlayAniUpdate: gData.blessingBag.isPlayAniUpdate,
|
|
|
+ // isPlayInitAni: this.isPlayInitAni
|
|
|
+ // }
|
|
|
+ // this.adrbArray.push(obj);
|
|
|
+ // }
|
|
|
+ // this.itemContent.emit('srollview-init', this.adrbArray);
|
|
|
+ // } else
|
|
|
+ {
|
|
|
+ this.adrbArray = [{data:1}, {data:1}, {data:1}, {data:1}, {data:1}, {data:1}, {data:1}, {data:1}, {data:1}, {data:1}];
|
|
|
+
|
|
|
+ // for (let i = 0; i < data.redMonies.length; i++) {
|
|
|
+ // let obj = {
|
|
|
+ // data: data.redMonies[i],
|
|
|
+ // isPlayAniUpdate: gData.blessingBag.isPlayAniUpdate,
|
|
|
+ // isPlayInitAni: this.isPlayInitAni
|
|
|
+ // }
|
|
|
+ // this.adrbArray.push(obj);
|
|
|
+ // }
|
|
|
+ //刷新
|
|
|
this.itemContent.emit('srollview-init', this.adrbArray);
|
|
|
- } else {
|
|
|
- this.adrbArray = [];
|
|
|
|
|
|
- for (let i = 0; i < data.redMonies.length; i++) {
|
|
|
- let obj = {
|
|
|
- data: data.redMonies[i],
|
|
|
- isPlayAniUpdate: gData.blessingBag.isPlayAniUpdate,
|
|
|
- isPlayInitAni: this.isPlayInitAni
|
|
|
+
|
|
|
+ cc.tween(this.node).delay(0.2).call(()=>{
|
|
|
+ let allItem = this.tableview.getFrontPositionItemByCount(5);
|
|
|
+
|
|
|
+ for(let i = 0; i != allItem.length; ++i)
|
|
|
+ {
|
|
|
+ allItem[i].active = true;
|
|
|
+ allItem[i].setPosition(allItem[i].position.x, allItem[i].position.y - 600);
|
|
|
+ cc.tween(allItem[i]).delay(i*0.1).by(0.3, {y: 600}, cc.easeSineOut()).start();
|
|
|
}
|
|
|
- this.adrbArray.push(obj);
|
|
|
- }
|
|
|
- //刷新
|
|
|
- this.itemContent.emit('srollview-update', this.adrbArray);
|
|
|
+ }).start();
|
|
|
}
|
|
|
|
|
|
this.isPlayInitAni = false;
|