Citrus há 6 meses atrás
pai
commit
b88864d1de

+ 14 - 14
assets/config/files/AbilityInfo.json

@@ -7,51 +7,51 @@
         "max_level": 20,
         "value": 12,
         "value_add": 2,
-        "upgrade_cost": 10,
-        "upgrade_cost_add": 10
+        "upgrade_cost": 5,
+        "upgrade_cost_add": 0
     },
     {
         "idx": 4,
         "desc": "str_desc_goods4",
         "icon": "Ability_Icon_04",
-        "unlock_cost": 100,
+        "unlock_cost": 5,
         "max_level": 20,
         "value": 115,
         "value_add": 15,
-        "upgrade_cost": 10,
-        "upgrade_cost_add": 10
+        "upgrade_cost": 5,
+        "upgrade_cost_add": 0
     },
     {
         "idx": 5,
         "desc": "str_desc_goods5",
         "icon": "Ability_Icon_05",
-        "unlock_cost": 140,
+        "unlock_cost": 5,
         "max_level": 20,
         "value": 105,
         "value_add": 5,
-        "upgrade_cost": 10,
-        "upgrade_cost_add": 10
+        "upgrade_cost": 5,
+        "upgrade_cost_add": 0
     },
     {
         "idx": 6,
         "desc": "str_desc_goods6",
         "icon": "Ability_Icon_06",
-        "unlock_cost": 180,
+        "unlock_cost": 5,
         "max_level": 20,
         "value": 120,
         "value_add": 20,
-        "upgrade_cost": 10,
-        "upgrade_cost_add": 10
+        "upgrade_cost": 5,
+        "upgrade_cost_add": 0
     },
     {
         "idx": 8,
         "desc": "str_desc_goods8",
         "icon": "Ability_Icon_08",
-        "unlock_cost": 260,
+        "unlock_cost": 5,
         "max_level": 20,
         "value": 105,
         "value_add": 5,
-        "upgrade_cost": 10,
-        "upgrade_cost_add": 10
+        "upgrade_cost": 5,
+        "upgrade_cost_add": 0
     }
 ]

+ 3 - 3
assets/config/files/shopItem.json

@@ -58,7 +58,7 @@
         "itemId": 18,
         "shopType": 3,
         "payId": "",
-        "ad": 1200,
+        "diamond": 10,
         "icon": 1,
         "arg0": 4
     },
@@ -67,7 +67,7 @@
         "itemId": 19,
         "shopType": 3,
         "payId": "",
-        "ad": 1200,
+        "diamond": 20,
         "icon": 2,
         "arg0": 5
     },
@@ -76,7 +76,7 @@
         "itemId": 20,
         "shopType": 3,
         "payId": "",
-        "ad": 1200,
+        "diamond": 30,
         "icon": 3,
         "arg0": 6
     },

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
assets/resources/prefab/view/shop/ShopBuffView.prefab


+ 23 - 23
assets/scripts/ADController.js

@@ -1,7 +1,7 @@
 var t = require;
 var e = module;
 var i = exports;
-Object.defineProperty(i, "__esModule", {value: !0}),
+Object.defineProperty(i, "__esModule", { value: !0 }),
     (i.ADController = i.AdSharePriority = i.AdShareStatus = i.InterAdType = i.AdType = void 0);
 const c = t("App"),
     n = t("GameText"),
@@ -49,7 +49,7 @@ class f extends s.default {
         return null == this.instance && (this.instance = new f()), this.instance;
     }
     get isRemoveAD() {
-        return this._model.adAndShareData.isRemoveAd;
+        return false;//this._model.adAndShareData.isRemoveAd;
     }
     init() {
         this.registerFunc(0, this.openAdByTypeAsync, this),
@@ -62,7 +62,7 @@ class f extends s.default {
             this.registerFunc(
                 6,
                 t => {
-                    this._model.adAndShareData.isRemoveAd = t ? 1 : 0;
+                    this._model.adAndShareData.isRemoveAd = false// t ? 1 : 0;
                 },
                 this
             ),
@@ -78,7 +78,7 @@ class f extends s.default {
         this._model.initShareStaticData(),
             c.default.NotificationCenter.removeListener(a.NotificationConst.INIT_GAME_FINISH, this.initGame, this);
     }
-    onSystemOpen(t, e) {}
+    onSystemOpen(t, e) { }
     initInteractionAd() {
         c.default.NotificationCenter.addListener(o.default.VIEW_IS_OPEN, this.onViewOpen, this),
             (this._model.interactionAdConf = c.default.ConfigManager.gameConf.interactionAd),
@@ -92,7 +92,7 @@ class f extends s.default {
     showInteractionAdTimer() {
         this.showInteractionAd();
     }
-    onViewOpen(t) {}
+    onViewOpen(t) { }
     onViewClose(t) {
         t = l.ViewConst[t];
         this._model.interactionAdConf.view[t] &&
@@ -100,7 +100,7 @@ class f extends s.default {
                 ? (this.showInteractionAd(), (this._model.interProbability = 0))
                 : this._model.interProbability < 0.5 && (this._model.interProbability += 0.04));
     }
-    showInteractionAd() {}
+    showInteractionAd() { }
     getAdTabData(t) {
         return this._model.getAdShareConf(t);
     }
@@ -130,15 +130,15 @@ class f extends s.default {
             this.curAdStatus === u.AD
                 ? (t.adCnt++, this._model.addAdNum(), c.default.AnalyticMgr.AD(this.curAdType, i ? 1 : 0))
                 : this.curAdStatus === u.FREE
-                ? this.isRemoveAD
-                    ? t.adCnt++
-                    : t.freeCnt++
-                : this.curAdStatus === u.SHARE
-                ? (t.shareCnt++, c.default.AnalyticMgr.AD(this.curAdType + 1e3, i ? 1 : 0))
-                : this.curAdStatus === u.SUPER_CASH && t.superCashCnt++,
+                    ? this.isRemoveAD
+                        ? t.adCnt++
+                        : t.freeCnt++
+                    : this.curAdStatus === u.SHARE
+                        ? (t.shareCnt++, c.default.AnalyticMgr.AD(this.curAdType + 1e3, i ? 1 : 0))
+                        : this.curAdStatus === u.SUPER_CASH && t.superCashCnt++,
                 (this.curAdStatus = this.curAdType = null),
                 localStorage.getItem("isfirstAD") ||
-                    (localStorage.setItem("isfirstAD", "isfirstAD"),
+                (localStorage.setItem("isfirstAD", "isfirstAD"),
                     console.log("第一次观看广告"),
                     c.default.AnalyticMgr.recordFirstAD({
                         api_token: c.default.GameDataMsr.playerInfo.token,
@@ -166,13 +166,13 @@ class f extends s.default {
             if (3 == i) return r.default.launch(n.GameText.getText(62)), void t(!1);
             if (
                 ((this.curAdType = o),
-                (this.adResolve = t),
-                (this.curAdStatus = e),
-                e == u.NONE && r.default.launch(n.GameText.getText(60)),
-                e == u.AD)
+                    (this.adResolve = t),
+                    (this.curAdStatus = e),
+                    e == u.NONE && r.default.launch(n.GameText.getText(60)),
+                    e == u.AD)
             )
                 c.default.SoundManager.pauseMusic(), c.default.Platform.showAD(o);
-            else if (e == u.FREE) this.onShowAdResult({code: 0});
+            else if (e == u.FREE) this.onShowAdResult({ code: 0 });
             else if (e == u.SHARE) {
                 c.default.SoundManager.pauseMusic();
                 var s = this._model.getShareData();
@@ -191,20 +191,20 @@ class f extends s.default {
                 (t = this._model.getAdShareConf(o)), (s = this._model.getData(o));
                 const e = (t.price - s.superCashCnt * t.addSuperCash) * (a || 1);
                 WorldScene.instance.subSuperMoney(e)
-                    ? (this.onShowAdResult({code: 0}), c.default.Platform.recordDiamondCost(o + 100, e))
-                    : this.onShowAdResult({code: -1});
-            } else this.onShowAdResult({code: -1});
+                    ? (this.onShowAdResult({ code: 0 }), c.default.Platform.recordDiamondCost(o + 100, e))
+                    : this.onShowAdResult({ code: -1 });
+            } else this.onShowAdResult({ code: -1 });
         });
     }
     unregisterItem(t, e) {
         this._model.registerItems[t] &&
             (-1 < (e = this._model.registerItems[t].indexOf(e)) && this._model.registerItems[t].splice(e, 1),
-            0 === this._model.registerItems[t].length && delete this._model.registerItems[t]);
+                0 === this._model.registerItems[t].length && delete this._model.registerItems[t]);
     }
     registerItem(t, e) {
         this._model.registerItems[t]
             ? -1 === this._model.registerItems[t].indexOf(e) &&
-              (this._model.registerItems[t].push(e), this.checkItem(t, e))
+            (this._model.registerItems[t].push(e), this.checkItem(t, e))
             : ((this._model.registerItems[t] = [e]), this.checkItem(t, e));
     }
     isCanToShare(t) {

+ 19 - 11
assets/scripts/AdShareBtnCtr.js

@@ -85,17 +85,25 @@ t = class extends cc.Component {
                 }));
     }
     toAd(t, e, i, s) {
-        this.sprite &&
-            (this.setSpriteFrame("Texture/common/icons/icon_ad", this.sprite), (this.sprite.node.active = !0)),
-            1 === s ?
-            (this.label && (this.label.string = this.adLoadingStr),
-                this._isForbiden && (this.button.interactable = !1)) :
-            2 === s ?
-            (this._isForbiden && (this.button.interactable = !0), this.label && (this.label.string = this.adStr)) :
-            3 === s &&
-            (this._isForbiden && (this.button.interactable = !1),
-                this.label && (this.label.string = this.adFailStr)),
-            cc.Component.EventHandler.emitEvents(this.toAdEvent, t, e, i, s);
+
+
+        this.sprite && (this.sprite.node.active = !1),
+        this.label && (this.label.string = this.freeStr),
+        this._isForbiden && (this.button.interactable = !0),
+        cc.Component.EventHandler.emitEvents(this.toFreeEvent, t, e, i);
+
+
+        // this.sprite &&
+        //     (this.setSpriteFrame("Texture/common/icons/icon_ad", this.sprite), (this.sprite.node.active = !0)),
+        //     1 === s ?
+        //     (this.label && (this.label.string = this.adLoadingStr),
+        //         this._isForbiden && (this.button.interactable = !1)) :
+        //     2 === s ?
+        //     (this._isForbiden && (this.button.interactable = !0), this.label && (this.label.string = this.adStr)) :
+        //     3 === s &&
+        //     (this._isForbiden && (this.button.interactable = !1),
+        //         this.label && (this.label.string = this.adFailStr)),
+        //     cc.Component.EventHandler.emitEvents(this.toAdEvent, t, e, i, s);
     }
     toShare() {
         this.sprite && this.setSpriteFrame("Texture/common/icons/icon_share", this.sprite),

+ 0 - 9
assets/scripts/GameDataMsr.js

@@ -14,15 +14,6 @@ var o;
             (this.playerInfo = null), (this.gameMainData = null), (this.tempData = {isSyncDataByServer: !1});
         }
         init() {
-
-            console.error('s.default.SoundManager', s.default.SoundManager);
-            console.error('s.default.SoundManager.saveKey', s.default.SoundManager.saveKey);
-
-
-            console.error(o.PLAYER_INFO);
-            
-
-            
             s.default.SaveManage.add(s.default.SoundManager, s.default.SoundManager.saveKey, !0, !1),
                 s.default.SaveManage.add(this, o.PLAYER_INFO, !0, !0),
                 s.default.SaveManage.load(o.PLAYER_INFO);

+ 1 - 0
assets/scripts/GameModel.js

@@ -10,6 +10,7 @@ i.default = class extends o.default {
         super(t), (this.data = null), s.default.SaveManage.add(this, "GAME_DATA", !1, !0);
     }
     init() {
+        console.error('getCurMapData33333333333333333333');
         s.default.SaveManage.load("GAME_DATA");
     }
     getCurMapData() {

+ 14 - 7
assets/scripts/IdleView.js

@@ -74,15 +74,22 @@ t = class extends a.default {
         (this.progressBar.progress = t / i),
         (this.moneyLab.string = h.default.toString(e));
     }
+    // onTouchAd() {
+    //     return s(this, void 0, void 0, function*() {
+    //         yield o.default.ControllerManager.applyFunc(
+    //             n.ControllerConst.Game,
+    //             r.GameConst.GET_IDLE,
+    //             this.idleTime, !0
+    //         );
+    //     });
+    // }
+
     onTouchAd() {
-        return s(this, void 0, void 0, function*() {
-            yield o.default.ControllerManager.applyFunc(
-                n.ControllerConst.Game,
-                r.GameConst.GET_IDLE,
-                this.idleTime, !0
-            );
-        });
+        super.onTouchClose(),
+            o.default.ControllerManager.applyFunc(n.ControllerConst.Game, r.GameConst.GET_IDLE, this.idleTime, !1);
     }
+
+
     onTouchClose() {
         super.onTouchClose(),
             o.default.ControllerManager.applyFunc(n.ControllerConst.Game, r.GameConst.GET_IDLE, this.idleTime, !1);

+ 426 - 416
assets/scripts/PlatformBase.js

@@ -3,8 +3,8 @@ var e = module;
 var i = exports;
 var s =
     (this && this.__awaiter) ||
-    function(t, n, r, l) {
-        return new(r = r || Promise)(function(i, e) {
+    function (t, n, r, l) {
+        return new (r = r || Promise)(function (i, e) {
             function s(t) {
                 try {
                     a(l.next(t));
@@ -27,7 +27,7 @@ var s =
                     i(t.value) :
                     ((e = t.value) instanceof r ?
                         e :
-                        new r(function(t) {
+                        new r(function (t) {
                             t(e);
                         })
                     ).then(s, o);
@@ -46,408 +46,418 @@ const l = t("App"),
     c = t("ADManageBase"),
     d = t("TipView");
 (i.LoginDataSaveKey = { loginCache: "cars" }),
-((t = i.save_prop_Const || (i.save_prop_Const = {}))[(t.YINDAO_LEVEL = 99)] = "YINDAO_LEVEL"),
-(t[(t.LEVEL = 1)] = "LEVEL"),
-((t = i.DiamondCostType || (i.DiamondCostType = {}))[(t.SHOP_NORMAL_BOX = 0)] = "SHOP_NORMAL_BOX"),
-(t[(t.SHOP_HEIGHT_BOX = 1)] = "SHOP_HEIGHT_BOX"),
-(t[(t.EQUIPMENT_UPGRADE = 2)] = "EQUIPMENT_UPGRADE"),
-(t[(t.EQUIPMENT_GRADE_UPGRADE = 3)] = "EQUIPMENT_GRADE_UPGRADE"),
-(t[(t.ABILITY_UPGRADE = 4)] = "ABILITY_UPGRADE"),
-(t[(t.BUFF_DOUBLE__RATE_GOLD = 5)] = "BUFF_DOUBLE__RATE_GOLD"),
-(t[(t.BUFF_FIVE_RATE_GOLD = 6)] = "BUFF_FIVE_RATE_GOLD"),
-(t[(t.BUFF_FOUR_HOUR_GOLD = 7)] = "BUFF_FOUR_HOUR_GOLD"),
-(i.default = class {
-    constructor() {
-        (this.loginInfo = {}),
-        (this._videoManage = null),
-        (this.compelADVideoManage = null),
-        (this.insterTime = 0),
-        (this.insterFullTime = 0),
-        (this.msgCache = []),
-        (this._playrSpendMoney = 0),
-        (l.default.Platform = this),
-        l.default.SaveManage.add(this, i.LoginDataSaveKey.loginCache, !1, !1),
-            l.default.SaveManage.load(i.LoginDataSaveKey.loginCache);
-    }
-    init() {
-        this.initProductConfig(), this.initAd(), l.default.AnalyticMgr.sentDayRetain();
-    }
-    initProductConfig() {
-        var t = l.default.ConfigManager.getConfig("ProductConfig");
-        this._productConfigs = {};
-        for (const e of t) this._productConfigs[e.payId] = e;
-    }
-    initAccountServer() {}
-    getProductConfigByPayString(t) {
-        return this._productConfigs[t];
-    }
-    getProductConfigById(t) {
-        for (var e in this._productConfigs) {
-            e = this._productConfigs[e];
-            if (e.id == t) return e;
-        }
-        return null;
-    }
-    setEvent(t) {}
-    showInteractionAd(t = h.InterAdType.normal, e) {
-        return !0;
-    }
-    isAutoShowInteractionAd() {
-        return !1;
-    }
-    isGetRemoteRes() {
-        return !1;
-    }
-    isShowDebugUI() {
-        return (-1 < this.getVersionStr().indexOf("debug") ||
-            -1 < this.getVersionStr().indexOf("test") ||
-            -1 < this.getVersionStr().indexOf("gm")
-        );
-    }
-    vibrator(t = 0) {}
-    resetGame() {
-        window.location.reload();
-    }
-    checkIsNotch() {
-        return !1;
-    }
-    exitGame() {
-        this.saveData();
-    }
-    cal(t) {}
-    initAd() {
-        this._videoManage = new c.ADManageBase();
-    }
-    share(t, e) {}
-    showBanner() {}
-    hideBanner() {}
-    showExpressAd(t) {}
-    hideExpressAd() {}
-    showAD(t, e) {
-        this._videoManage && this._videoManage.show();
-    }
-    showCompelAD(t, e, i) {}
-    isWXLogin() {
-        return s(this, void 0, void 0, function*() {
+    ((t = i.save_prop_Const || (i.save_prop_Const = {}))[(t.YINDAO_LEVEL = 99)] = "YINDAO_LEVEL"),
+    (t[(t.LEVEL = 1)] = "LEVEL"),
+    ((t = i.DiamondCostType || (i.DiamondCostType = {}))[(t.SHOP_NORMAL_BOX = 0)] = "SHOP_NORMAL_BOX"),
+    (t[(t.SHOP_HEIGHT_BOX = 1)] = "SHOP_HEIGHT_BOX"),
+    (t[(t.EQUIPMENT_UPGRADE = 2)] = "EQUIPMENT_UPGRADE"),
+    (t[(t.EQUIPMENT_GRADE_UPGRADE = 3)] = "EQUIPMENT_GRADE_UPGRADE"),
+    (t[(t.ABILITY_UPGRADE = 4)] = "ABILITY_UPGRADE"),
+    (t[(t.BUFF_DOUBLE__RATE_GOLD = 5)] = "BUFF_DOUBLE__RATE_GOLD"),
+    (t[(t.BUFF_FIVE_RATE_GOLD = 6)] = "BUFF_FIVE_RATE_GOLD"),
+    (t[(t.BUFF_FOUR_HOUR_GOLD = 7)] = "BUFF_FOUR_HOUR_GOLD"),
+    (i.default = class {
+        constructor() {
+            (this.loginInfo = {}),
+                (this._videoManage = null),
+                (this.compelADVideoManage = null),
+                (this.insterTime = 0),
+                (this.insterFullTime = 0),
+                (this.msgCache = []),
+                (this._playrSpendMoney = 0),
+                (l.default.Platform = this),
+                l.default.SaveManage.add(this, i.LoginDataSaveKey.loginCache, !1, !1),
+                l.default.SaveManage.load(i.LoginDataSaveKey.loginCache);
+        }
+        init() {
+            this.initProductConfig(), this.initAd(), l.default.AnalyticMgr.sentDayRetain();
+        }
+        initProductConfig() {
+            var t = l.default.ConfigManager.getConfig("ProductConfig");
+            this._productConfigs = {};
+            for (const e of t) this._productConfigs[e.payId] = e;
+        }
+        initAccountServer() { }
+        getProductConfigByPayString(t) {
+            return this._productConfigs[t];
+        }
+        getProductConfigById(t) {
+            for (var e in this._productConfigs) {
+                e = this._productConfigs[e];
+                if (e.id == t) return e;
+            }
+            return null;
+        }
+        setEvent(t) { }
+        showInteractionAd(t = h.InterAdType.normal, e) {
             return !0;
-        });
-    }
-    startGameRecorder(t) {}
-    stopGameRecorder() {}
-    shareRecorder() {}
-    jumpToOtherGame(t, e) {}
-    loadZipFile(t) {
-        return Promise.resolve(!1);
-    }
-    isCanShare() {
-        return !0;
-    }
-    getPackVersion() {
-        return "test";
-    }
-    getPackVersionCode() {
-        return 9999;
-    }
-    getDefaultLang() {
-        return "0";
-    }
-    syncDataCallBack() {}
-    getServerTime() {
-        return s(this, void 0, void 0, function*() {
-            let t = 3;
-            do {
-                try {
-                    var e = l.default.GameDataMsr.playerInfo,
-                        i = yield l.default.Http.requestAsync(
-                            l.default.ConfigManager.gameConf.serverInfos.interface + "/api/time", { token: e.token }
-                        ),
-                        s = JSON.parse(i);
-                    return l.default.DateUtils.setServerTime(1e3 * s.data.now_time), !0;
-                } catch (t) {
-                    Log.error("获取后台时间失败", t), yield l.default.TimerManager.sleep(1e3);
-                }
-            } while (--t);
+        }
+        isAutoShowInteractionAd() {
             return !1;
-        });
-    }
-    saveDataToLocal() {
-        (l.default.GameDataMsr.playerInfo.localSaveTime = Math.ceil(l.default.DateUtils.Now() / 1e3)),
-        l.default.SaveManage.saveAll();
-    }
-    saveData() {
-        return s(this, void 0, void 0, function*() {
-            let t = l.default.GameDataMsr.playerInfo;
-            (t.localSaveTime = t.saveTime = Math.ceil(l.default.DateUtils.Now() / 1e3)),
-            (t.saveDevice = this.getDeviceId());
-            var e = t.token;
-            l.default.ConfigManager.gameConf.serverInfos.game, (t.token = null);
-            var i = l.default.SaveManage.getAllAutoSaveData();
-            // if (((t.token = e), t.token))
-            // try {
-            //     var s = yield l.default.Http.post(
-            //             l.default.ConfigManager.gameConf.serverInfos.interface + "/api/user/file",
-            //             {api_token: t.token, file: l.default.StringUtil.zipStr(i), loginTime: t.timestamp},
-            //             3
-            //         ),
-            //         o = JSON.parse(s);
-            //     if (o && 0 == o.code) return !0;
-            // } catch (t) {
-            //     Log.error("存储数据失败", t);
-            // }
+        }
+        isGetRemoteRes() {
             return !1;
-        });
-    }
-    showLoginFailTipView() {
-        return new Promise(t => {
-            l.default.ViewManager.open(14, {
-                curState: d.TIPSTATE.SURE,
-                leftBtnText: o.GameText.getText(17),
-                leftFunc: () => {
-                    t();
-                },
-                leftThisObj: this,
-                tipsStr: o.GameText.getText(53)
-            });
-        });
-    }
-    isUseServerSave(i, s) {
-        return new Promise(t => {
-            var e = l.default.GameDataMsr.playerInfo;
-            e.godsTotalPower && e.saveTime ?
-                l.default.ViewManager.open(r.ViewConst.SaveSelectView, i, s, e.saveTime, e.godsTotalPower, t) :
-                t(!0);
-        });
-    }
-    getDeviceId() {
-        let t = cc.sys.localStorage.getItem("DEVICEID");
-        return t || ((t = "wx" + l.default.DateUtils.Now()), cc.sys.localStorage.setItem("DEVICEID", t)), t;
-    }
-    isShowGameCircle() {
-        return !1;
-    }
-    getUseInfoFinish(t) {}
-    getUserSaveData(i) {
-        console.log('getUserSaveData同步数据');
-        // return s(this, void 0, void 0, function*() {
-        //     let t = 3;
-        //     do {
-        //         var e = yield l.default.Http.requestAsync(
-        //                 l.default.ConfigManager.gameConf.serverInfos.game + "/api/user/file", { api_token: i },
-        //                 "GET"
-        //             ),
-        //             e = JSON.parse(e);
-        //         if (0 == e.code) return e.data;
-        //     } while (--t);
-        //     return null;
-        // });
-    }
-    syncData() {
-        console.log('syncData同步数据');
-        
-
-        return s(this, void 0, void 0, function*() {
-            let e = l.default.GameDataMsr,
-                t = 3;
-            // do {
-            //     try {
-            //         let t = e.playerInfo;
-            //         Log.trace("获取登陆信息");
-            //         var i = yield this.login();
-            //         (t.account = this.loginInfo.unionid),
-            //         (t.openid = this.loginInfo.openid),
-            //         Log.trace("向管理后台请求用户数据", i.loginKey);
-            //         var s,
-            //             o,
-            //             a = yield l.default.Http.requestAsync(
-            //                 l.default.ConfigManager.gameConf.serverInfos.interface + "/api/user", { api_token: i.loginKey },
-            //                 "GET"
-            //             ),
-            //             n = JSON.parse(a);
-            //         if (
-            //             (!this.loginInfo.unionid && i.loginKey && (this.loginInfo.unionid = n.account),
-            //                 0 !== n.code)
-            //         ) {
-            //             -1001 === n.code || -1003 === n.code ?
-            //                 this.logout() :
-            //                 Log.trace("向管理后台获取数据失败!!!", n.code);
-            //             continue;
-            //         }
-            //         (t.id = n.data.id),
-            //         (t.token = i.loginKey),
-            //         (t.registerTime = 1e3 * n.data.reg_time),
-            //         (t.registerDaynumber = Math.ceil(
-            //             (l.default.DateUtils.Now() - 1e3 * n.data.reg_time) / 864e5
-            //         )),
-            //         l.default.DateUtils.setServerTime(1e3 * t.timestamp),
-            //             l.default.SaveManage.setSaveKey(t.id + ""),
-            //             l.default.AnalyticMgr.activityLogin();
-            //         const r = yield this.getUserSaveData(i.loginKey);
-            //         if (!r) return !1;
-            //         r.file &&
-            //             ((o = (s = JSON.parse(r.file.includes("{") ? r.file : l.default.StringUtil.unzip(r.file)))
-            //                     .PLAYER_INFO),
-            //                 (t.saveTime < r.time || (null != s && s.ISREPLACE)) &&
-            //                 (l.default.SaveManage.syncByData(s),
-            //                     (t.saveTime = r.time),
-            //                     (t.localSaveTime = o.localSaveTime),
-            //                     (t.finishTaskCnt = o.finishTaskCnt),
-            //                     (t.head = o.head),
-            //                     (t.nickName = o.nickName),
-            //                     (t.diamond = o.diamond),
-            //                     (t.gold = o.gold))),
-            //             this.syncDataCallBack(),
-            //             Log.trace("向管理后台请求用户数据成功!!!");
-            //         break;
-            //     } catch (t) {
-            //         Log.error("同步数据失败", t && t.toString());
-            //     }
-            //     Log.trace("请求数据失败!!!!,", t), yield l.default.TimerManager.sleep(1e3);
-            // } while (--t);
-            return (e.tempData.isSyncDataByServer = !0), !!t;
-        });
-    }
-    getVersionStr() {
-        return `v ${versionInfo.packVersion}_${versionInfo.version}`;
-    }
-    createMemento(t) {
-        return this.loginInfo || {};
-    }
-    getAdTypeNum() {
-        return 1;
-    }
-    getAdState(t) {
-        return this._videoManage.adState;
-    }
-    setMemento(t, e) {
-        this.loginInfo = t || {};
-    }
-    getAccountInfoSync() {}
-    logout() {
-        (this.loginInfo = {}), l.default.SaveManage.save(i.LoginDataSaveKey.loginCache);
-    }
-    getChannel() {
-        return "cjkg";
-    }
-    tourist() {
-        return s(this, void 0, void 0, function*() {
-            if (this.loginInfo.token) return Promise.resolve({ code: 0, loginKey: this.loginInfo.token });
-            var t = yield l.default.Http.requestAsync(
-                l.default.ConfigManager.gameConf.serverInfos.interface + "/api/login/simple", { channel: this.getChannel() },
-                "GET"
-            );
-            Log.trace(">>>>>>>>>>>>>>>游客登录", t);
-            t = JSON.parse(t);
-            return (
-                (this.loginInfo.playerid = t.data.id),
-                (this.loginInfo.token = t.token),
-                l.default.SaveManage.save(i.LoginDataSaveKey.loginCache),
-                (l.default.GameDataMsr.isNew = !0),
-                0 === t.code ?
-                (this.setChannel(t.token), { code: t.code, loginKey: t.token }) : { code: t.code, loginKey: null }
+        }
+        isShowDebugUI() {
+            return (-1 < this.getVersionStr().indexOf("debug") ||
+                -1 < this.getVersionStr().indexOf("test") ||
+                -1 < this.getVersionStr().indexOf("gm")
             );
-        });
-    }
-    buy(t) {
-        return s(this, void 0, void 0, function*() {
-            return a.default.launch("支付功能还在开发中!!!!"), !1;
-        });
-    }
-    getPrice(t) {
-        t = this.getProductConfigByPayString(t);
-        return t ? "$ " + t.cost : null;
-    }
-    getPriceNum(t) {
-        return this.getProductConfigByPayString(t).cost;
-    }
-    getCurrency(t) {
-        var e,
-            t = this.getPrice(t);
-        if (!t) return "";
-        let i = "";
-        for (e of t) {
-            if (("0" <= e && e <= "9") || "." === e) break;
-            i += e;
-        }
-        return i;
-    }
-    getTitle(t) {
-        return "";
-    }
-    isSignIn() {
-        return cc.sys.localStorage.getItem("is_SignIn_Game");
-    }
-    signInSuccess(t) {
-        cc.sys.localStorage.setItem("is_SignIn_Game", t);
-    }
-    signInFail() {
-        cc.sys.localStorage.removeItem("is_SignIn_Game");
-    }
-    googleLogin() {
-        return s(this, void 0, void 0, function*() {
+        }
+        vibrator(t = 0) { }
+        resetGame() {
+            window.location.reload();
+        }
+        checkIsNotch() {
             return !1;
-        });
-    }
-    signOut() {
-        l.default.EasyLoading.showLoadingByTime(10),
-            this.clearAndResetGame(!0),
-            cc.sys.localStorage.removeItem("is_SignIn_Game"),
-            l.default.EasyLoading.hideLoading();
-    }
-    clearAndResetGame(t = !1) {
-        return s(this, void 0, void 0, function*() {
-            t && (yield this.saveData()),
-                l.default.SaveManage.clear(),
-                l.default.SaveManage.clearAllItem(),
-                cc.audioEngine.stopAll(),
-                cc.game.restart();
-        });
-    }
-    isHaveAnomalyOrder(t) {
-        return !1;
-    }
-    getOrderDataByPayId(t) {
-        return null;
-    }
-    openAppReview() {
-        return s(this, void 0, void 0, function*() {
+        }
+        exitGame() {
+            this.saveData();
+        }
+        cal(t) { }
+        initAd() {
+            this._videoManage = new c.ADManageBase();
+        }
+        share(t, e) { }
+        showBanner() { }
+        hideBanner() { }
+        showExpressAd(t) { }
+        hideExpressAd() { }
+        showAD(t, e) {
+            this._videoManage && this._videoManage.show();
+        }
+        showCompelAD(t, e, i) { }
+        isWXLogin() {
+            return s(this, void 0, void 0, function* () {
+                return !0;
+            });
+        }
+        startGameRecorder(t) { }
+        stopGameRecorder() { }
+        shareRecorder() { }
+        jumpToOtherGame(t, e) { }
+        loadZipFile(t) {
+            return Promise.resolve(!1);
+        }
+        isCanShare() {
             return !0;
-        });
-    }
-    set playerSpendMoney(t) {
-        (this._playrSpendMoney += t),
-        (l.default.GameDataMsr.playerInfo.vipRecharge = this._playrSpendMoney),
-        l.default.NotificationCenter.dispatch(n.NotificationConst.PAY_SUCCESS);
-    }
-    get playerSpendMoney() {
-        return this._playrSpendMoney;
-    }
-    updatePlayerSpendMoeny() {
-        return s(this, void 0, void 0, function*() {
-            if (!this.isShowDebugUI() || !cc.sys.localStorage.getItem("vipTest")) {
+        }
+        getPackVersion() {
+            return "test";
+        }
+        getPackVersionCode() {
+            return 9999;
+        }
+        getDefaultLang() {
+            return "0";
+        }
+        syncDataCallBack() { }
+        getServerTime() {
+            return s(this, void 0, void 0, function* () {
                 let t = 3;
                 do {
                     try {
-                        var e = yield l.default.Http.requestAsync(
+                        var e = l.default.GameDataMsr.playerInfo,
+                            i = yield l.default.Http.requestAsync(
+                                l.default.ConfigManager.gameConf.serverInfos.interface + "/api/time", { token: e.token }
+                            ),
+                            s = JSON.parse(i);
+                        return l.default.DateUtils.setServerTime(1e3 * s.data.now_time), !0;
+                    } catch (t) {
+                        Log.error("获取后台时间失败", t), yield l.default.TimerManager.sleep(1e3);
+                    }
+                } while (--t);
+                return !1;
+            });
+        }
+        saveDataToLocal() {
+            (l.default.GameDataMsr.playerInfo.localSaveTime = Math.ceil(l.default.DateUtils.Now() / 1e3)),
+                l.default.SaveManage.saveAll();
+        }
+        saveData() {
+            return s(this, void 0, void 0, function* () {
+                let t = l.default.GameDataMsr.playerInfo;
+                (t.localSaveTime = t.saveTime = Math.ceil(l.default.DateUtils.Now() / 1e3)),
+                    (t.saveDevice = this.getDeviceId());
+                var e = t.token;
+                l.default.ConfigManager.gameConf.serverInfos.game, (t.token = null);
+                var i = l.default.SaveManage.getAllAutoSaveData();
+                // if (((t.token = e), t.token))
+                // try {
+                //     var s = yield l.default.Http.post(
+                //             l.default.ConfigManager.gameConf.serverInfos.interface + "/api/user/file",
+                //             {api_token: t.token, file: l.default.StringUtil.zipStr(i), loginTime: t.timestamp},
+                //             3
+                //         ),
+                //         o = JSON.parse(s);
+                //     if (o && 0 == o.code) return !0;
+                // } catch (t) {
+                //     Log.error("存储数据失败", t);
+                // }
+                return !1;
+            });
+        }
+        showLoginFailTipView() {
+            return new Promise(t => {
+                l.default.ViewManager.open(14, {
+                    curState: d.TIPSTATE.SURE,
+                    leftBtnText: o.GameText.getText(17),
+                    leftFunc: () => {
+                        t();
+                    },
+                    leftThisObj: this,
+                    tipsStr: o.GameText.getText(53)
+                });
+            });
+        }
+        isUseServerSave(i, s) {
+            return new Promise(t => {
+                var e = l.default.GameDataMsr.playerInfo;
+                e.godsTotalPower && e.saveTime ?
+                    l.default.ViewManager.open(r.ViewConst.SaveSelectView, i, s, e.saveTime, e.godsTotalPower, t) :
+                    t(!0);
+            });
+        }
+        getDeviceId() {
+            let t = cc.sys.localStorage.getItem("DEVICEID");
+            return t || ((t = "wx" + l.default.DateUtils.Now()), cc.sys.localStorage.setItem("DEVICEID", t)), t;
+        }
+        isShowGameCircle() {
+            return !1;
+        }
+        getUseInfoFinish(t) { }
+        getUserSaveData(i) {
+            console.log('getUserSaveData同步数据');
+            // return s(this, void 0, void 0, function*() {
+            //     let t = 3;
+            //     do {
+            //         var e = yield l.default.Http.requestAsync(
+            //                 l.default.ConfigManager.gameConf.serverInfos.game + "/api/user/file", { api_token: i },
+            //                 "GET"
+            //             ),
+            //             e = JSON.parse(e);
+            //         if (0 == e.code) return e.data;
+            //     } while (--t);
+            //     return null;
+            // });
+        }
+        syncData() {
+            console.log('syncData同步数据11111111111111111111111111');
+
+
+            return s(this, void 0, void 0, function* () {
+                let e = l.default.GameDataMsr,
+                    t = 3;
+
+                {
+                    console.error('强制修改钻石数据');
+                    console.error(e);
+                    e.playerInfo.diamond = 19
+
+                    l.default.SaveManage.getAllAutoSaveData();
+                }
+
+
+                // do {
+                //     try {
+                //         let t = e.playerInfo;
+                //         Log.trace("获取登陆信息");
+                //         var i = yield this.login();
+                //         (t.account = this.loginInfo.unionid),
+                //         (t.openid = this.loginInfo.openid),
+                //         Log.trace("向管理后台请求用户数据", i.loginKey);
+                //         var s,
+                //             o,
+                //             a = yield l.default.Http.requestAsync(
+                //                 l.default.ConfigManager.gameConf.serverInfos.interface + "/api/user", { api_token: i.loginKey },
+                //                 "GET"
+                //             ),
+                //             n = JSON.parse(a);
+                //         if (
+                //             (!this.loginInfo.unionid && i.loginKey && (this.loginInfo.unionid = n.account),
+                //                 0 !== n.code)
+                //         ) {
+                //             -1001 === n.code || -1003 === n.code ?
+                //                 this.logout() :
+                //                 Log.trace("向管理后台获取数据失败!!!", n.code);
+                //             continue;
+                //         }
+                //         (t.id = n.data.id),
+                //         (t.token = i.loginKey),
+                //         (t.registerTime = 1e3 * n.data.reg_time),
+                //         (t.registerDaynumber = Math.ceil(
+                //             (l.default.DateUtils.Now() - 1e3 * n.data.reg_time) / 864e5
+                //         )),
+                //         l.default.DateUtils.setServerTime(1e3 * t.timestamp),
+                //             l.default.SaveManage.setSaveKey(t.id + ""),
+                //             l.default.AnalyticMgr.activityLogin();
+                //         const r = yield this.getUserSaveData(i.loginKey);
+                //         if (!r) return !1;
+                //         r.file &&
+                //             ((o = (s = JSON.parse(r.file.includes("{") ? r.file : l.default.StringUtil.unzip(r.file)))
+                //                     .PLAYER_INFO),
+                //                 (t.saveTime < r.time || (null != s && s.ISREPLACE)) &&
+                //                 (l.default.SaveManage.syncByData(s),
+                //                     (t.saveTime = r.time),
+                //                     (t.localSaveTime = o.localSaveTime),
+                //                     (t.finishTaskCnt = o.finishTaskCnt),
+                //                     (t.head = o.head),
+                //                     (t.nickName = o.nickName),
+                //                     (t.diamond = o.diamond),
+                //                     (t.gold = o.gold))),
+                //             this.syncDataCallBack(),
+                //             Log.trace("向管理后台请求用户数据成功!!!");
+                //         break;
+                //     } catch (t) {
+                //         Log.error("同步数据失败", t && t.toString());
+                //     }
+                //     Log.trace("请求数据失败!!!!,", t), yield l.default.TimerManager.sleep(1e3);
+                // } while (--t);
+                return (e.tempData.isSyncDataByServer = !0), !!t;
+            });
+        }
+        getVersionStr() {
+            return `v ${versionInfo.packVersion}_${versionInfo.version}`;
+        }
+        createMemento(t) {
+            return this.loginInfo || {};
+        }
+        getAdTypeNum() {
+            return 1;
+        }
+        getAdState(t) {
+            return this._videoManage.adState;
+        }
+        setMemento(t, e) {
+            this.loginInfo = t || {};
+        }
+        getAccountInfoSync() { }
+        logout() {
+            (this.loginInfo = {}), l.default.SaveManage.save(i.LoginDataSaveKey.loginCache);
+        }
+        getChannel() {
+            return "cjkg";
+        }
+        tourist() {
+            return s(this, void 0, void 0, function* () {
+                if (this.loginInfo.token) return Promise.resolve({ code: 0, loginKey: this.loginInfo.token });
+                var t = yield l.default.Http.requestAsync(
+                    l.default.ConfigManager.gameConf.serverInfos.interface + "/api/login/simple", { channel: this.getChannel() },
+                    "GET"
+                );
+                Log.trace(">>>>>>>>>>>>>>>游客登录", t);
+                t = JSON.parse(t);
+                return (
+                    (this.loginInfo.playerid = t.data.id),
+                    (this.loginInfo.token = t.token),
+                    l.default.SaveManage.save(i.LoginDataSaveKey.loginCache),
+                    (l.default.GameDataMsr.isNew = !0),
+                    0 === t.code ?
+                        (this.setChannel(t.token), { code: t.code, loginKey: t.token }) : { code: t.code, loginKey: null }
+                );
+            });
+        }
+        buy(t) {
+            return s(this, void 0, void 0, function* () {
+                return a.default.launch("支付功能还在开发中!!!!"), !1;
+            });
+        }
+        getPrice(t) {
+            t = this.getProductConfigByPayString(t);
+            return t ? "$ " + t.cost : null;
+        }
+        getPriceNum(t) {
+            return this.getProductConfigByPayString(t).cost;
+        }
+        getCurrency(t) {
+            var e,
+                t = this.getPrice(t);
+            if (!t) return "";
+            let i = "";
+            for (e of t) {
+                if (("0" <= e && e <= "9") || "." === e) break;
+                i += e;
+            }
+            return i;
+        }
+        getTitle(t) {
+            return "";
+        }
+        isSignIn() {
+            return cc.sys.localStorage.getItem("is_SignIn_Game");
+        }
+        signInSuccess(t) {
+            cc.sys.localStorage.setItem("is_SignIn_Game", t);
+        }
+        signInFail() {
+            cc.sys.localStorage.removeItem("is_SignIn_Game");
+        }
+        googleLogin() {
+            return s(this, void 0, void 0, function* () {
+                return !1;
+            });
+        }
+        signOut() {
+            l.default.EasyLoading.showLoadingByTime(10),
+                this.clearAndResetGame(!0),
+                cc.sys.localStorage.removeItem("is_SignIn_Game"),
+                l.default.EasyLoading.hideLoading();
+        }
+        clearAndResetGame(t = !1) {
+            return s(this, void 0, void 0, function* () {
+                t && (yield this.saveData()),
+                    l.default.SaveManage.clear(),
+                    l.default.SaveManage.clearAllItem(),
+                    cc.audioEngine.stopAll(),
+                    cc.game.restart();
+            });
+        }
+        isHaveAnomalyOrder(t) {
+            return !1;
+        }
+        getOrderDataByPayId(t) {
+            return null;
+        }
+        openAppReview() {
+            return s(this, void 0, void 0, function* () {
+                return !0;
+            });
+        }
+        set playerSpendMoney(t) {
+            (this._playrSpendMoney += t),
+                (l.default.GameDataMsr.playerInfo.vipRecharge = this._playrSpendMoney),
+                l.default.NotificationCenter.dispatch(n.NotificationConst.PAY_SUCCESS);
+        }
+        get playerSpendMoney() {
+            return this._playrSpendMoney;
+        }
+        updatePlayerSpendMoeny() {
+            return s(this, void 0, void 0, function* () {
+                if (!this.isShowDebugUI() || !cc.sys.localStorage.getItem("vipTest")) {
+                    let t = 3;
+                    do {
+                        try {
+                            var e = yield l.default.Http.requestAsync(
                                 l.default.ConfigManager.gameConf.serverInfos.interface +
                                 "/Interface/recharge/total_amount.php", { token: l.default.GameDataMsr.playerInfo.token }
                             ),
-                            i = JSON.parse(e);
-                        if (0 === i.code)
-                            return (
-                                (this.playerSpendMoney = i.data.amount),
-                                void(l.default.GameDataMsr.playerInfo.vipRecharge = i.data.amount)
-                            );
-                    } catch (t) {}
-                } while ((yield l.default.TimerManager.sleep(1e3), --t));
-                l.default.TimerManager.doTimer(12e4, 1, this.updatePlayerSpendMoeny, this);
-            }
-        });
-    }
-    setChannel(t) {}
-    recordDiamondCost(t, e, i) {
-        e = 0 < e ? -e : e;
-        l.default.Http.requestAsync(
-            l.default.ConfigManager.gameConf.serverInfos.interface + "/Interface/money/save.php", {
+                                i = JSON.parse(e);
+                            if (0 === i.code)
+                                return (
+                                    (this.playerSpendMoney = i.data.amount),
+                                    void (l.default.GameDataMsr.playerInfo.vipRecharge = i.data.amount)
+                                );
+                        } catch (t) { }
+                    } while ((yield l.default.TimerManager.sleep(1e3), --t));
+                    l.default.TimerManager.doTimer(12e4, 1, this.updatePlayerSpendMoeny, this);
+                }
+            });
+        }
+        setChannel(t) { }
+        recordDiamondCost(t, e, i) {
+            e = 0 < e ? -e : e;
+            l.default.Http.requestAsync(
+                l.default.ConfigManager.gameConf.serverInfos.interface + "/Interface/money/save.php", {
                 token: l.default.GameDataMsr.playerInfo.token,
                 type: t,
                 money_type: 0,
@@ -456,27 +466,27 @@ const l = t("App"),
                 item_id: i || 0,
                 item_num: 1
             }
-        );
-    }
-    record(t) {
-        try {
-            t.token = l.default.GameDataMsr.playerInfo.token;
-        } catch (t) {
-            Log.error("统计出错:", t);
-        }
-    }
-    getIsShowPay() {
-        return !0;
-    }
-    saveWxUserInfo() {
-        return s(this, void 0, void 0, function*() {});
-    }
-    isAuthorization() {
-        return s(this, void 0, void 0, function*() {
+            );
+        }
+        record(t) {
+            try {
+                t.token = l.default.GameDataMsr.playerInfo.token;
+            } catch (t) {
+                Log.error("统计出错:", t);
+            }
+        }
+        getIsShowPay() {
             return !0;
-        });
-    }
-    resumOrder() {
-        return s(this, void 0, void 0, function*() {});
-    }
-});
+        }
+        saveWxUserInfo() {
+            return s(this, void 0, void 0, function* () { });
+        }
+        isAuthorization() {
+            return s(this, void 0, void 0, function* () {
+                return !0;
+            });
+        }
+        resumOrder() {
+            return s(this, void 0, void 0, function* () { });
+        }
+    });

+ 19 - 1
assets/scripts/SaveManage.js

@@ -43,9 +43,11 @@ const s = t("App");
         return this.map[t];
     }
     autoSave() {
+        console.error('自动保存数据');
         for (var t of this.list) t.isAuto && this.$save(t);
     }
     getAllAutoSaveData() {
+        console.error('getAllAutoSaveData自动保存数据');
         let t = {};
         for (var e of this.list) {
             var i;
@@ -57,11 +59,17 @@ const s = t("App");
         for (const e in t) cc.sys.localStorage.setItem(e, JSON.stringify(t[e]));
     }
     saveAll() {
+        console.error('全部保存数据');
         for (var t of this.list) this.$save(t);
         Log.trace("存档成功!");
     }
     $save(t) {
         var e = t.obj.createMemento(t.key);
+
+
+        console.error('保存数据');
+        console.error(e);
+
         return (
             e && "object" == typeof e
                 ? cc.sys.localStorage.setItem(t.saveKey, JSON.stringify(e))
@@ -113,6 +121,17 @@ const s = t("App");
     }
     $load(e) {
         var i = cc.sys.localStorage.getItem(e);
+
+
+        if (e==='GAME_DATA') {
+
+            console.error('在这边截取到地图数据');
+            
+            console.error(JSON.parse(i));
+
+            
+        }
+
         if (i)
             try {
                 return JSON.parse(i);
@@ -148,7 +167,6 @@ const s = t("App");
     }
     load(t) {
         let e = this.map[t];
-
         var i;
         e &&
             // ((i = ddd),

+ 7 - 2
assets/scripts/ShopBuffView.js

@@ -13,11 +13,11 @@ e =
                 (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
         return 3 < a && n && Object.defineProperty(e, i, n), n;
     };
-Object.defineProperty(i, "__esModule", {value: !0});
+Object.defineProperty(i, "__esModule", { value: !0 });
 const s = t("BaseView"),
     o = t("ShopConst"),
     a = t("ShopBuffItem"),
-    {property: n, ccclass: r, menu: l} = cc._decorator;
+    { property: n, ccclass: r, menu: l } = cc._decorator;
 t = class extends s.default {
     constructor() {
         super(...arguments),
@@ -30,6 +30,11 @@ t = class extends s.default {
     initUI() {
         super.initUI();
         var s = this.controller.model.shopItemDatas[o.ShopType.BUFF];
+
+        console.error(s);
+        console.error(o.ShopType.BUFF);
+
+
         for (let i = 0; i < s.length; i++) {
             this.shopItems || (this.shopItems = []);
             let t = cc.instantiate(this.item);

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff