Browse Source

yyyy游戏的js脚本比对更新

Alex 1 year ago
parent
commit
646e359c43

+ 26 - 0
yyyy_js/assets/internal/index.jsc

@@ -0,0 +1,26 @@
+(function r(e, n, t) {
+function i(u, f) {
+if (!n[u]) {
+if (!e[u]) {
+var _ = u.split("/");
+_ = _[_.length - 1];
+if (!e[_]) {
+var p = "function" == typeof __require && __require;
+if (!f && p) return p(_, !0);
+if (o) return o(_, !0);
+throw new Error("Cannot find module '" + u + "'");
+}
+u = _;
+}
+var a = n[u] = {
+exports: {}
+};
+e[u][0].call(a.exports, function(r) {
+return i(e[u][1][r] || r);
+}, a, a.exports, r, e, n, t);
+}
+return n[u].exports;
+}
+for (var o = "function" == typeof __require && __require, u = 0; u < t.length; u++) i(t[u]);
+return i;
+})({}, {}, []);

+ 8 - 15
yyyy_js/assets/main/index.jsc

@@ -185355,6 +185355,7 @@ try {
 n.push(JSON.stringify(t[o]));
 } catch (e) {}
 }
+console.log("我也不知道这是啥,",n);
 e.apply(console, n);
 }
 }, T = function(e, t) {
@@ -284326,7 +284327,7 @@ platform: 0,
 isBetaMode: 0,
 blackJackIsPro: !1,
 isDebug: !0,
-isEnableConsoleLog: !1,
+isEnableConsoleLog: !0,
 webSocketUrl: null,
 baseUrl: null,
 kycURL: null,
@@ -288703,6 +288704,7 @@ errMsg: n.statusText,
 errorCode: 500
 };
 }
+console.log("接口请求成功: ",n.responseText);
 if (n.status >= 200 && n.status <= 207) {
 if (e.notWeApi) {
 t(o);
@@ -288765,10 +288767,14 @@ n.open(e.method, e.url(), !0);
 e.accept && n.setRequestHeader("Accept", e.accept);
 HMFUtils.isAndroidNavitve() && n.setRequestHeader("Accept-Encoding", "gzip");
 e.isKYC && n.setRequestHeader("X-UserId", CurrentUserInfo.user.userId);
-if ("GET" == e.method) n.send(); else if ("POST" == e.method) {
+if ("GET" == e.method) {
+    console.log("发起GET请求:",e.url());
+    n.send(); 
+}else if ("POST" == e.method) {
 e.isKYC ? n.setRequestHeader("Content-Type", "application/json") : n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
 var o = e.parameters;
 "string" != typeof e.parameters && (o = e.isKYC ? JSON.stringify(o) : e.queryString());
+console.log("发起POST请求: ",e.url()," \t\t参数: ",o);
 n.send(o);
 }
 },
@@ -628396,19 +628402,6 @@ console.log('---------\x3e发送隐藏进度条{"cmd": "10021"}');
 window.webkit.messageHandlers.SYwebjsToClient.postMessage('{"cmd": "10021"}');
 }
 try {
-if (!HMFAppConfig.isEnableConsoleLog) {
-console.info = function() {};
-console.log = function() {};
-console.debug = function() {};
-console.warn = function() {};
-console.error = function() {};
-console.time = function() {};
-console.timeStamp = function() {};
-console.timeEnd = function() {};
-cc.log = function() {};
-cc.warn = function() {};
-cc.error = function() {};
-}
 if (!HMFUtils.isNavtive()) {
 cc.view.resizeWithBrowserSize(!1);
 r.default.listenWebResize();

File diff suppressed because it is too large
+ 10332 - 0
yyyy_js/jsb-adapter/jsb-builtin.js


File diff suppressed because it is too large
+ 6578 - 0
yyyy_js/jsb-adapter/jsb-engine.js


+ 178 - 0
yyyy_js/main.js

@@ -0,0 +1,178 @@
+
+(function () {
+    if (typeof window.jsb === 'object') {
+        var hotUpdateSearchPaths = localStorage.getItem('HotUpdateSearchPaths');
+        if (hotUpdateSearchPaths) {
+            var paths = JSON.parse(hotUpdateSearchPaths);
+            jsb.fileUtils.setSearchPaths(paths);
+
+            var fileList = [];
+            var storagePath = paths[0] || '';
+            var tempPath = storagePath + '_temp/';
+            var baseOffset = tempPath.length;
+
+            if (jsb.fileUtils.isDirectoryExist(tempPath) && !jsb.fileUtils.isFileExist(tempPath + 'project.manifest.temp')) {
+                jsb.fileUtils.listFilesRecursively(tempPath, fileList);
+                fileList.forEach(srcPath => {
+                    var relativePath = srcPath.substr(baseOffset);
+                    var dstPath = storagePath + relativePath;
+
+                    if (srcPath[srcPath.length] == '/') {
+                        cc.fileUtils.createDirectory(dstPath)
+                    }
+                    else {
+                        if (cc.fileUtils.isFileExist(dstPath)) {
+                            cc.fileUtils.removeFile(dstPath)
+                        }
+                        cc.fileUtils.renameFile(srcPath, dstPath);
+                    }
+                })
+                cc.fileUtils.removeDirectory(tempPath);
+            }
+        }
+    }
+})();
+window.boot = function () {
+    var settings = window._CCSettings;
+    window._CCSettings = undefined;
+    var onProgress = null;
+    
+    var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
+    var INTERNAL = cc.AssetManager.BuiltinBundleName.INTERNAL;
+    var MAIN = cc.AssetManager.BuiltinBundleName.MAIN;
+    function setLoadingDisplay () {
+        // Loading splash scene
+        var splash = document.getElementById('splash');
+        var progressBar = splash.querySelector('.progress-bar span');
+        onProgress = function (finish, total) {
+            var percent = 100 * finish / total;
+            if (progressBar) {
+                progressBar.style.width = percent.toFixed(2) + '%';
+            }
+        };
+        splash.style.display = 'block';
+        progressBar.style.width = '0%';
+
+        cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
+            splash.style.display = 'none';
+        });
+    }
+
+    var onStart = function () {
+
+        cc.view.enableRetina(true);
+        cc.view.resizeWithBrowserSize(true);
+
+        if (cc.sys.isBrowser) {
+            setLoadingDisplay();
+        }
+
+        if (cc.sys.isMobile) {
+            if (settings.orientation === 'landscape') {
+                cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
+            }
+            else if (settings.orientation === 'portrait') {
+                cc.view.setOrientation(cc.macro.ORIENTATION_PORTRAIT);
+            }
+            cc.view.enableAutoFullScreen([
+                cc.sys.BROWSER_TYPE_BAIDU,
+                cc.sys.BROWSER_TYPE_BAIDU_APP,
+                cc.sys.BROWSER_TYPE_WECHAT,
+                cc.sys.BROWSER_TYPE_MOBILE_QQ,
+                cc.sys.BROWSER_TYPE_MIUI,
+                cc.sys.BROWSER_TYPE_HUAWEI,
+                cc.sys.BROWSER_TYPE_UC,
+            ].indexOf(cc.sys.browserType) < 0);
+        }
+
+        // Limit downloading max concurrent task to 2,
+        // more tasks simultaneously may cause performance draw back on some android system / browsers.
+        // You can adjust the number based on your own test result, you have to set it before any loading process to take effect.
+        if (cc.sys.isBrowser && cc.sys.os === cc.sys.OS_ANDROID) {
+            cc.assetManager.downloader.maxConcurrency = 2;
+            cc.assetManager.downloader.maxRequestsPerFrame = 2;
+        }
+
+        var launchScene = settings.launchScene;
+        var bundle = cc.assetManager.bundles.find(function (b) {
+            return b.getSceneInfo(launchScene);
+        });
+        
+        bundle.loadScene(launchScene, null, onProgress,
+            function (err, scene) {
+                if (!err) {
+                    cc.director.runSceneImmediate(scene);
+                    if (cc.sys.isBrowser) {
+                        // show canvas
+                        var canvas = document.getElementById('GameCanvas');
+                        canvas.style.visibility = '';
+                        var div = document.getElementById('GameDiv');
+                        if (div) {
+                            div.style.backgroundImage = '';
+                        }
+                        console.log('Success to load scene: ' + launchScene);
+                    }
+                }
+            }
+        );
+
+    };
+
+    var option = {
+        id: 'GameCanvas',
+        debugMode: settings.debug ? cc.debug.DebugMode.INFO : cc.debug.DebugMode.ERROR,
+        showFPS: settings.debug,
+        frameRate: 60,
+        groupList: settings.groupList,
+        collisionMatrix: settings.collisionMatrix,
+    };
+
+    cc.assetManager.init({ 
+        bundleVers: settings.bundleVers,
+        remoteBundles: settings.remoteBundles,
+        server: settings.server
+    });
+    
+    var bundleRoot = [INTERNAL];
+    settings.hasResourcesBundle && bundleRoot.push(RESOURCES);
+
+    var count = 0;
+    function cb (err) {
+        if (err) return console.error(err.message, err.stack);
+        count++;
+        if (count === bundleRoot.length + 1) {
+            cc.assetManager.loadBundle(MAIN, function (err) {
+                if (!err) cc.game.run(option, onStart);
+            });
+        }
+    }
+
+    cc.assetManager.loadScript(settings.jsList.map(function (x) { return 'src/' + x;}), cb);
+
+    for (var i = 0; i < bundleRoot.length; i++) {
+        cc.assetManager.loadBundle(bundleRoot[i], cb);
+    }
+};
+
+if (window.jsb) {
+    var isRuntime = (typeof loadRuntime === 'function');
+    if (isRuntime) {
+        require('src/settings.js');
+        require('src/cocos2d-runtime.js');
+        if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
+            require('src/physics.js');
+        }
+        require('jsb-adapter/engine/index.js');
+    }
+    else {
+        require('src/settings.js');
+        require('src/cocos2d-jsb.js');
+        if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
+            require('src/physics.js');
+        }
+        require('jsb-adapter/jsb-engine.js');
+    }
+
+    cc.macro.CLEANUP_IMAGE_CACHE = true;
+    window.boot();
+}

File diff suppressed because it is too large
+ 3551 - 0
yyyy_js/src/assets/blackjack/script/network/pb/protobuf.js


File diff suppressed because it is too large
+ 3551 - 0
yyyy_js/src/assets/pkfChat/script/network/pb/protobuf.js


File diff suppressed because it is too large
+ 207 - 0
yyyy_js/src/assets/pkw/Script/common/md5/md5.js


File diff suppressed because it is too large
+ 3549 - 0
yyyy_js/src/assets/scripts/base/protobuf.js


File diff suppressed because it is too large
+ 78450 - 0
yyyy_js/src/cocos2d-jsb.js


File diff suppressed because it is too large
+ 1 - 0
yyyy_js/src/settings.js


+ 2 - 10
yyyy_js/yyyy关键点.txt

@@ -42,16 +42,8 @@ window.HMFRequest = cc.Class({
 
 window.HMFHTTPClient = {
 
-//吐司
-cc.vv.toast.showToast
-
-直接替换成这个方法
-function showToastAndlog(message, ...optionalParam){
-    const log = optionalParam.length > 0 ? `${message}_${optionalParam.join("_")}` : message;
-    androidLog("吐司:",log);
-    cc.vv.toast.showToast(log);
-}
-
+//不知道是啥的日志
+BJPVPConsoleLog = 
 
 //网络请求