Browse Source

bug修复

薛鸿潇 5 năm trước cách đây
mục cha
commit
953e265a41

+ 26 - 25
assets/script/game/data/module/RedBagCashData.ts

@@ -12,9 +12,10 @@ export class RedBagCashData extends Data {
      * 数据初始化
      * 数据初始化
      */
      */
     public init() {
     public init() {
-        // 签到进度
-        this.cash_bar = gData.gameData.getProp(GameProp.redBag_cash_bar);// 自定义测试数据
-        // this.cash_bar = gData.gameData.gameData.cashIndex;// 服务端数据
+        // 提现进度
+        // this.cash_bar = gData.gameData.getProp(GameProp.redBag_cash_bar);// 自定义测试数据
+        this.cash_bar = gData.gameData.gameData.cashIndex;// 服务端数据
+        // this.initCData();// 假数据列表
         // 签到配置表
         // 签到配置表
         if (gData.gameData.configs.CashCfg) {
         if (gData.gameData.configs.CashCfg) {
             gData.gameData.configs.CashCfg.forEach(item_data => {
             gData.gameData.configs.CashCfg.forEach(item_data => {
@@ -96,28 +97,28 @@ export class RedBagCashData extends Data {
         }
         }
     }
     }
 
 
-    // /** 客户端造的假数据 */
-    // private initCData() {
-    //     for (let i = 0; i < 20; i++) {
-    //         const id = i + 1;
-    //         let obj = {
-    //             index: id,
-    //             /** 毛币数量? */
-    //             money: id,
-    //             /** 红包数量 */
-    //             type_value: id * 1000,
-    //             time: id,
-    //             directVideoTime: id,
-    //             delayVideoTimes: id,
-    //             money_type: id,
-    //             num: id,
-    //             moneyshow: id,
-    //             summoney: id
-    //         };
-    //         this.c_data.push(obj)
-    //     }
-    //     this.init_list = true;
-    // }
+    /** 客户端造的假数据 */
+    private initCData() {
+        for (let i = 0; i < 20; i++) {
+            const id = i + 1;
+            let obj = {
+                index: id,
+                /** 毛币数量? */
+                money: id,
+                /** 红包数量 */
+                type_value: id * 1000,
+                time: id,
+                directVideoTime: id,
+                delayVideoTimes: id,
+                money_type: id,
+                num: id,
+                moneyshow: id,
+                summoney: id
+            };
+            this.c_data.push(obj)
+        }
+        this.init_list = true;
+    }
 }
 }
 /** 配置表数据内容 */
 /** 配置表数据内容 */
 export type CDataType = {
 export type CDataType = {

+ 3 - 2
assets/script/game/module/redBagCash/RedBagCash.ts

@@ -24,8 +24,9 @@ export default class RedBagCash extends cc.Component {
     }
     }
 
 
     start() {
     start() {
-        this.initMoney();
-        this.initScrollView();
+        gData.redBagCash.init_list = true;
+        // this.initMoney();
+        // this.initScrollView();
     }
     }
 
 
     update(dt) {
     update(dt) {