|
|
@@ -35,13 +35,18 @@ export default class SpeedUpUI extends cc.Component {
|
|
|
if (gData.reward.add_redbag_value) {
|
|
|
this.initCashOutStyle(gData.gameData.playerProp.redMoney + gData.reward.add_redbag_value);
|
|
|
}
|
|
|
+
|
|
|
+ if (gData.gameData.init_speedup) {
|
|
|
+ gData.gameData.init_speedup = false;
|
|
|
+ this.lbl_remainTimes.string = `今日剩余次数:${gData.gameData.playerProp.speedUpLeftTimes}`;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 底部提现相关样式
|
|
|
*/
|
|
|
private initCashOutStyle(redMoney: number = 0) {
|
|
|
- redMoney = redMoney/100;
|
|
|
+ redMoney = redMoney / 100;
|
|
|
const cash_bar = gData.redBagCash.cash_bar;
|
|
|
let cash_data = gData.redBagCash.getItemDataByIndex(cash_bar);
|
|
|
if (!cash_data) return;
|
|
|
@@ -86,7 +91,7 @@ export default class SpeedUpUI extends cc.Component {
|
|
|
let response = await mk.http.sendData('farmSpeedUp', {});
|
|
|
if (response && response.errcode == 0) {
|
|
|
gData.gameData.playerProp.speedUpLeftTimes = response.data.speedUpLeftTimes;
|
|
|
- self.lbl_remainTimes.string = `今日剩余次数:${gData.gameData.playerProp.speedUpLeftTimes}`;
|
|
|
+ gData.gameData.init_speedup = true;
|
|
|
}
|
|
|
gData.gameData.setHarvest();
|
|
|
mk.tip.pop('加速成功!');
|