|
@@ -35,7 +35,7 @@ export default class RedBagCashItem extends cc.Component {
|
|
|
* 初始化数据
|
|
* 初始化数据
|
|
|
*/
|
|
*/
|
|
|
public async setItemData(item_data) {
|
|
public async setItemData(item_data) {
|
|
|
- if(this.item_data == null && item_data.index == 1){
|
|
|
|
|
|
|
+ if (this.item_data == null && item_data.index == 1) {
|
|
|
mk.event.register("event_guide", this.clickGuide.bind, this);
|
|
mk.event.register("event_guide", this.clickGuide.bind, this);
|
|
|
}
|
|
}
|
|
|
await this.initStyle(item_data);
|
|
await this.initStyle(item_data);
|
|
@@ -85,17 +85,17 @@ export default class RedBagCashItem extends cc.Component {
|
|
|
mk.tip.pop('请按顺序提现');
|
|
mk.tip.pop('请按顺序提现');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- mk.data.sendDataEvent(DataEventId.commonWithDrawal,"常规提现-红包币提现成功");
|
|
|
|
|
|
|
+ mk.data.sendDataEvent(DataEventId.commonWithDrawal, "常规提现-红包币提现成功");
|
|
|
let times = gData.gameData.getProp(GameProp.cashTimes);
|
|
let times = gData.gameData.getProp(GameProp.cashTimes);
|
|
|
- gData.gameData.setProp(GameProp.cashTimes, times++);
|
|
|
|
|
|
|
+ gData.gameData.setProp(GameProp.cashTimes, ++times);
|
|
|
if (times < 4) {
|
|
if (times < 4) {
|
|
|
mk.data.sendXYEvent("cash_" + times, "第" + times + "次提现");
|
|
mk.data.sendXYEvent("cash_" + times, "第" + times + "次提现");
|
|
|
}
|
|
}
|
|
|
gData.redBagCash.cashOP();
|
|
gData.redBagCash.cashOP();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- onDestroy(){
|
|
|
|
|
- mk.event.remove("event_guide",this.clickGuide,this);
|
|
|
|
|
|
|
+ onDestroy() {
|
|
|
|
|
+ mk.event.remove("event_guide", this.clickGuide, this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|