Commit f5b60d11 authored by huoshizhe's avatar huoshizhe

feat: petRoom

parent e8a701b6
...@@ -1194,7 +1194,7 @@ ...@@ -1194,7 +1194,7 @@
"__id__": 29 "__id__": 29
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 250 "__id__": 250
......
...@@ -81,8 +81,8 @@ cc.Class({ ...@@ -81,8 +81,8 @@ cc.Class({
// /api/syllabus/v1/tree?orgid=483&pid=18567 // /api/syllabus/v1/tree?orgid=483&pid=18567
this.baseUrl = 'http://staging-teach.ireadabc.com'; // this.baseUrl = 'http://staging-teach.ireadabc.com';
this.initStoryBoxView({ coursewareId: 18307 }); // this.initStoryBoxView({ coursewareId: 18307 });
}, },
asyncDelayLog(str) { asyncDelayLog(str) {
...@@ -111,7 +111,8 @@ cc.Class({ ...@@ -111,7 +111,8 @@ cc.Class({
this.syllabus_id = bundleInfo.syllabus_id; this.syllabus_id = bundleInfo.syllabus_id;
this.role = bundleInfo.role; this.role = bundleInfo.role;
this.loadBundle(bundleInfo); this.initPetRoomView(bundleInfo);
} else if (bundleType == "StoryBox") { } else if (bundleType == "StoryBox") {
const descLabel = cc.find('middleLayer/storyBox/menu/menuBase/title/name'); const descLabel = cc.find('middleLayer/storyBox/menu/menuBase/title/name');
descLabel.getComponent(cc.Label).string = bundleInfo.coursewareDescription; descLabel.getComponent(cc.Label).string = bundleInfo.coursewareDescription;
...@@ -128,6 +129,11 @@ cc.Class({ ...@@ -128,6 +129,11 @@ cc.Class({
} }
}, },
initPetRoomView(bundleInfo) {
this.hideWWView();
this.loadBundle(bundleInfo);
},
initStoryBoxView(bundleInfo) { initStoryBoxView(bundleInfo) {
this.hideWWView(); this.hideWWView();
...@@ -549,9 +555,19 @@ cc.Class({ ...@@ -549,9 +555,19 @@ cc.Class({
if (err) { if (err) {
this.asyncDelayLog('err: ', err); this.asyncDelayLog('err: ', err);
} }
this.hideWaitingLetters(); cc.audioEngine.stopAll();
callback && callback(); cc.director.runScene(scene, null, () => {
cc.director.runScene(scene); console.log('sceneName = ' + conf.sceneName);
const Canvas = cc.find('Canvas');
const middleLayer = cc.find('middleLayer');
this.hideWaitingLetters();
callback && callback();
Canvas.getComponent(cc.Widget).updateAlignment();
// middleLayer.scale = Canvas.width / middleLayer.width;
const frameSize = cc.view.getFrameSize();
console.log(`Canvas.size = ${Canvas.width}, ${Canvas.height}`);
console.log(`frameSize.size = ${frameSize.width}, ${frameSize.height}`);
});
}); });
}); });
}, },
......
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