qiushiyong 1 год назад
Родитель
Сommit
e9abf8315d

+ 31 - 31
pingan_h5_qianduan/assets/src/Main.ts

@@ -124,40 +124,12 @@ export default class Main extends cc.Component {
     }
 
     /* 没有答题的情况下抽奖start */
-    initUI() {
-        this.questionPanel.active = false;
-        this.lotteryPanel.active = true;
-        this.labelTitle.string = NetManager.getInst().activityName
-
-        /*
-        const questionData = NetManager.getInst().questions
-        this.MAX_QUESTION_NUM = questionData.length
-        for (let i = 0; i < questionData.length; ++i) {
-            let itemData = questionData[i]
-
-            let itemNode = cc.instantiate((itemData.type == 3) ? this.inputQuestionItem : this.optQuestionItem)
-            this.questionNode.addChild(itemNode)
-
-            let comp = itemNode.getComponent((itemData.type == 3) ? 'InputQuestionItem' : 'OptQuestionItem')
-            comp.loadData(i + 1, itemData)
-            this.questionCompArr.push(comp)
-        }
-        */
-
-        const rewardTypes = NetManager.getInst().lotteryItems;
-        let index = 0
-        for (let idx in rewardTypes) {
-            this.rewardType[index++].string = rewardTypes[idx]
-        }
-    }
-    /* 没有答题的情况下抽奖end */
-
-    /* 有答题的情况下抽奖start */
     // initUI() {
-    //     this.questionPanel.active = true;
-    //     this.lotteryPanel.active = false;
+    //     this.questionPanel.active = false;
+    //     this.lotteryPanel.active = true;
     //     this.labelTitle.string = NetManager.getInst().activityName
     //
+    //     /*
     //     const questionData = NetManager.getInst().questions
     //     this.MAX_QUESTION_NUM = questionData.length
     //     for (let i = 0; i < questionData.length; ++i) {
@@ -170,6 +142,7 @@ export default class Main extends cc.Component {
     //         comp.loadData(i + 1, itemData)
     //         this.questionCompArr.push(comp)
     //     }
+    //     */
     //
     //     const rewardTypes = NetManager.getInst().lotteryItems;
     //     let index = 0
@@ -177,6 +150,33 @@ export default class Main extends cc.Component {
     //         this.rewardType[index++].string = rewardTypes[idx]
     //     }
     // }
+    /* 没有答题的情况下抽奖end */
+
+    /* 有答题的情况下抽奖start */
+    initUI() {
+        this.questionPanel.active = true;
+        this.lotteryPanel.active = false;
+        this.labelTitle.string = NetManager.getInst().activityName
+
+        const questionData = NetManager.getInst().questions
+        this.MAX_QUESTION_NUM = questionData.length
+        for (let i = 0; i < questionData.length; ++i) {
+            let itemData = questionData[i]
+
+            let itemNode = cc.instantiate((itemData.type == 3) ? this.inputQuestionItem : this.optQuestionItem)
+            this.questionNode.addChild(itemNode)
+
+            let comp = itemNode.getComponent((itemData.type == 3) ? 'InputQuestionItem' : 'OptQuestionItem')
+            comp.loadData(i + 1, itemData)
+            this.questionCompArr.push(comp)
+        }
+
+        const rewardTypes = NetManager.getInst().lotteryItems;
+        let index = 0
+        for (let idx in rewardTypes) {
+            this.rewardType[index++].string = rewardTypes[idx]
+        }
+    }
     /* 有答题的情况下抽奖end */
 
     reset() {

Разница между файлами не показана из-за своего большого размера
+ 0 - 1
pingan_h5_qianduan/build/web-mobile/assets/main/config.8991e.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
pingan_h5_qianduan/build/web-mobile/assets/main/index.8991e.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
pingan_h5_qianduan/build/web-mobile/assets/resources/config.f432b.json


+ 0 - 1
pingan_h5_qianduan/build/web-mobile/assets/resources/index.f432b.js

@@ -1 +0,0 @@
-(function r(e,n,t){function i(u,f){if(!n[u]){if(!e[u]){var _=u.split("/");if(_=_[_.length-1],!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})({},{},[]);

+ 2 - 2
pingan_h5_qianduan/build/web-mobile/index.html

@@ -48,9 +48,9 @@
     </div>
   </div>
 
-<script src="src/settings.c5c45.js" charset="utf-8"></script>
+<script src="src/settings.09adf.js" charset="utf-8"></script>
 
-<script src="main.795c9.js" charset="utf-8"></script>
+<script src="main.e5f54.js" charset="utf-8"></script>
 
 <script type="text/javascript">
 //自定义后端API地址

+ 0 - 146
pingan_h5_qianduan/build/web-mobile/main.795c9.js

@@ -1,146 +0,0 @@
-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 () {
-            setTimeout(()=>{
-				splash.style.display = 'none';
-			}, 1000);
-        });
-    }
-
-    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.c5c45.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.c5c45.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();
-}

+ 0 - 1
pingan_h5_qianduan/build/web-mobile/src/settings.c5c45.js

@@ -1 +0,0 @@
-window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Main.fire",orientation:"portrait",jsList:["assets/src/aladdin.d2841.js"],bundleVers:{internal:"468ae",resources:"f432b",main:"8991e"}};

+ 1 - 1
pingan_h5_qianduan/settings/project.json

@@ -1,5 +1,5 @@
 {
-  "last-module-event-record-time": 1680580019705,
+  "last-module-event-record-time": 1687744166629,
   "group-list": [
     "default"
   ],