|
@@ -167,6 +167,10 @@ export default class Game extends cc.Component {
|
|
|
|
|
|
|
|
this.initRefreshEvent();
|
|
this.initRefreshEvent();
|
|
|
|
|
|
|
|
|
|
+ if(gData.gameData.orderRewardType == 1){
|
|
|
|
|
+ this.node_showCash.active = false;
|
|
|
|
|
+ this.node_showRedMoney.active = true;
|
|
|
|
|
+ }
|
|
|
if (gData.gameData.playerProp.orderData) {
|
|
if (gData.gameData.playerProp.orderData) {
|
|
|
this.initOrderUI();
|
|
this.initOrderUI();
|
|
|
} else {
|
|
} else {
|
|
@@ -596,6 +600,8 @@ export default class Game extends cc.Component {
|
|
|
|
|
|
|
|
this.dpFlyRedAni();
|
|
this.dpFlyRedAni();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ mk.data.sendDataEvent(DataEventId.button_click, "一键生产按钮");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public dpFlyRedAni(starPos: cc.Vec2 = null) {
|
|
public dpFlyRedAni(starPos: cc.Vec2 = null) {
|
|
@@ -999,8 +1005,6 @@ export default class Game extends cc.Component {
|
|
|
if (data) {
|
|
if (data) {
|
|
|
//红包币
|
|
//红包币
|
|
|
if(gData.gameData.orderRewardType == 1){
|
|
if(gData.gameData.orderRewardType == 1){
|
|
|
- this.node_showCash.active = false;
|
|
|
|
|
- this.node_showRedMoney.active = true;
|
|
|
|
|
this.lbl_orderRedMoney.string = data.redMoneyAddition/100 + "";
|
|
this.lbl_orderRedMoney.string = data.redMoneyAddition/100 + "";
|
|
|
}else{
|
|
}else{
|
|
|
this.lbl_addCash.string = (data.cashMoney / 100).toFixed(2);
|
|
this.lbl_addCash.string = (data.cashMoney / 100).toFixed(2);
|
|
@@ -1075,7 +1079,7 @@ export default class Game extends cc.Component {
|
|
|
return !this.isGray;
|
|
return !this.isGray;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public async getOrderReward() {
|
|
|
|
|
|
|
+ public async getOrderReward(isGame = true) {
|
|
|
//现金提现
|
|
//现金提现
|
|
|
if (gData.gameData.orderRewardType == 2) {
|
|
if (gData.gameData.orderRewardType == 2) {
|
|
|
if (cc.sys.isNative) {
|
|
if (cc.sys.isNative) {
|
|
@@ -1103,11 +1107,15 @@ export default class Game extends cc.Component {
|
|
|
gData.receiptNotice.receip_rmb = addMoney;
|
|
gData.receiptNotice.receip_rmb = addMoney;
|
|
|
mk.ui.openPanel('module/newNotice/newNotice');
|
|
mk.ui.openPanel('module/newNotice/newNotice');
|
|
|
|
|
|
|
|
- this.node_crop.forEach((v) => {
|
|
|
|
|
- v.active = false;
|
|
|
|
|
- })
|
|
|
|
|
- this.node_orderHbIcon.active = false;
|
|
|
|
|
- this.node_getOrderReward.node.active = false;
|
|
|
|
|
|
|
+ if(isGame){
|
|
|
|
|
+ this.node_crop.forEach((v) => {
|
|
|
|
|
+ v.active = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ this.node_orderHbIcon.active = false;
|
|
|
|
|
+ this.node_getOrderReward.node.active = false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.showRefreshLogic();
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
let data = {};
|
|
let data = {};
|
|
|
let response = await mk.http.sendData('orderTask/receiveReward', data);
|
|
let response = await mk.http.sendData('orderTask/receiveReward', data);
|
|
@@ -1122,11 +1130,15 @@ export default class Game extends cc.Component {
|
|
|
gData.reward.adData.videoRedMoney.videoRewardList = [{ rewardType: 1, rewardNum: addMoney}]
|
|
gData.reward.adData.videoRedMoney.videoRewardList = [{ rewardType: 1, rewardNum: addMoney}]
|
|
|
mk.ui.openPanel('module/reward/reward');
|
|
mk.ui.openPanel('module/reward/reward');
|
|
|
|
|
|
|
|
- this.node_crop.forEach((v) => {
|
|
|
|
|
- v.active = false;
|
|
|
|
|
- })
|
|
|
|
|
- this.node_orderHbIcon.active = false;
|
|
|
|
|
- this.node_getOrderReward.node.active = false;
|
|
|
|
|
|
|
+ if(isGame){
|
|
|
|
|
+ this.node_crop.forEach((v) => {
|
|
|
|
|
+ v.active = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ this.node_orderHbIcon.active = false;
|
|
|
|
|
+ this.node_getOrderReward.node.active = false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.showRefreshLogic();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|