Commit 2bf68150 authored by huoshizhe's avatar huoshizhe

feat: log

parent f2013ea7
{
"ver": "1.1.2",
"uuid": "195f7a56-8446-4b3c-bb63-fcc7d8d6183d",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.2.9",
"uuid": "a4cbf80d-fd89-477e-a6f9-7ca1bea43179",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -84,6 +84,8 @@ cc.Class({ ...@@ -84,6 +84,8 @@ cc.Class({
// coursewareId: 18307 // coursewareId: 18307
// }); // });
// this.bundleType = 'StoryBox'; // this.bundleType = 'StoryBox';
this.log('汪汪汪');
}, },
asyncDelayLog(str) { asyncDelayLog(str) {
...@@ -478,6 +480,36 @@ cc.Class({ ...@@ -478,6 +480,36 @@ cc.Class({
} }
this.jumpToBundleByIndex(this.currentBundleIndex + 1); this.jumpToBundleByIndex(this.currentBundleIndex + 1);
}); });
const btnClose = cc.find('middleLayer/ConsoleNode/BtnClose');
const btnOpen = cc.find('middleLayer/ConsoleNode/BtnOpen');
const consoleNode = cc.find('middleLayer/ConsoleNode/Console');
const consoleBg = cc.find('middleLayer/ConsoleNode/bg');
btnOpen.on('click', () => {
btnClose.active = true;
btnOpen.active = false;
consoleNode.active = true;
consoleBg.active = true;
});
btnClose.on('click', () => {
btnClose.active = false;
btnOpen.active = true;
consoleNode.active = false;
consoleBg.active = false;
});
},
log(str) {
const logStr = `${new Date().toLocaleString()}: ${str}`;
console.log(logStr);
const content = cc.instantiate(cc.find('middleLayer/ConsoleNode/content'));
content.active = true;
const label = content.getChildByName('label');
label.getComponent(cc.Label).string = logStr;
const consoleContent = cc.find('middleLayer/ConsoleNode/Console/content');
consoleContent.addChild(content);
consoleContent.getComponent(cc.Layout).updateLayout();
}, },
callNativeFunction(param) { callNativeFunction(param) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment