Ver Fonte

【修复bug】提现记录的福袋记录没有及时刷新
http://chandao.zbc6b.com/zentao/bug-view-998.html###

zouyong há 5 anos atrás
pai
commit
af0fb79a3c

+ 3 - 0
assets/script/game/data/module/CashNormalData.ts

@@ -26,11 +26,14 @@ export class CashNormalData extends Data {
             });
             this.list_data = response.data;
             this.initReceipTotalRMB();
+            this.update_list = true;
         }
     }
     /** 数据列表 */
     public list_data: Array<TCashList> = [];
 
+    public update_list:boolean = false;
+
     /**
      * 标志位 - 是否刷新样式
      */

+ 11 - 2
assets/script/game/module/cashNormal/CashNormal.ts

@@ -17,9 +17,10 @@ export default class CashNormal extends cc.Component {
     // onLoad () {}
 
     start() {
+        gData.cashNormal.getRecord();
         this.initTotal();
-        this.initScrollView();
-        this.initNoneItem();
+        // this.initScrollView();
+        // this.initNoneItem();
     }
 
     // update (dt) {}
@@ -49,4 +50,12 @@ export default class CashNormal extends cc.Component {
             this.lbl_none.node.active = true;
         }
     }
+
+    update(){
+        if(gData.cashNormal.update_list){
+            this.initScrollView();
+            this.initNoneItem()
+            gData.cashNormal.update_list = false;
+        }
+    }
 }

+ 1 - 1
assets/script/game/module/redBagCash/RedBagCash.ts

@@ -94,7 +94,7 @@ export default class RedBagCash extends cc.Component {
     }
 
     onClickClose() {
-        if (GamePlay.Inst.ifPass) {
+        if (GamePlay.Inst && GamePlay.Inst.ifPass) {
             GamePlay.Inst.gameCount();
         }
     }