Commit f152a1f5 authored by liujiaxin's avatar liujiaxin

fix: ccc 2.4.0 bug

parent 99758a88
...@@ -156,7 +156,7 @@ cc.Class({ ...@@ -156,7 +156,7 @@ cc.Class({
cc.director.on('GAME_RESOURCE_LOADED', (preloadedData) => { cc.director.on('GAME_RESOURCE_LOADED', (preloadedData) => {
this.lrc.initialize(); this.lrc.initialize(preloadedData);
this.showImageNode.active = false; this.showImageNode.active = false;
if (this.pic_url) { if (this.pic_url) {
cc.assetManager.loadRemote(this.pic_url, (err, spriteFrame) => { cc.assetManager.loadRemote(this.pic_url, (err, spriteFrame) => {
......
...@@ -98,10 +98,15 @@ cc.Class({ ...@@ -98,10 +98,15 @@ cc.Class({
initialize() { initialize(preloadedData) {
console.log('initialize'); console.log('initialize');
const t1 = Date.now()
// const aitem = preloadedData.find(item => {
// return item.url == this.audio_url
// });
if (this.audio_url) { if (this.audio_url) {
cc.assetManager.loadRemote(this.audio_url, (err, audioClip) => { cc.assetManager.loadRemote(this.audio_url, (err, audioClip) => {
console.log(Date.now() - t1);
if(err) { if(err) {
// TODO handle error // TODO handle error
return; return;
...@@ -122,8 +127,8 @@ cc.Class({ ...@@ -122,8 +127,8 @@ cc.Class({
// audioEngine.setVolume(this.currentAudioId, 1); // audioEngine.setVolume(this.currentAudioId, 1);
this.resetLRC(); // this.resetLRC();
this.renderHighlight(); // this.renderHighlight();
// this.currentAudioId = audioEngine.play(audioClip, false, 1); // this.currentAudioId = audioEngine.play(audioClip, false, 1);
...@@ -193,6 +198,18 @@ cc.Class({ ...@@ -193,6 +198,18 @@ cc.Class({
// this.node.width = area.rect.width; // this.node.width = area.rect.width;
// this.node.height = area.rect.width; // this.node.height = area.rect.width;
// this.node.parent.zIndex = 99999 // this.node.parent.zIndex = 99999
this.richText.node = new Proxy(this.richText.node , {
set: function(obj, key, val){
obj[key] = val;
return true;
},
get: function(obj, key){
return obj[key]
}
})
const karaokeConf = gameData.lrcData const karaokeConf = gameData.lrcData
this._lrcData = karaokeConf.lyrics; this._lrcData = karaokeConf.lyrics;
...@@ -559,7 +576,7 @@ cc.Class({ ...@@ -559,7 +576,7 @@ cc.Class({
justifyContentPosition(){ justifyContentPosition(){
let {height: h} = this.calcHighlightRichText.node.getContentSize(); let {height: h} = this.calcHighlightRichText.node.getContentSize();
if (this.magicHeight === null) { if (this.magicHeight === null) {
this.magicHeight = h - this.richText.lineHeight; this.magicHeight = h - this.richText.lineHeight; // this.richText._labelHeight
} }
// let sw = 0; // let sw = 0;
// let sh = 0; // let sh = 0;
...@@ -570,13 +587,17 @@ cc.Class({ ...@@ -570,13 +587,17 @@ cc.Class({
// this.calcSentenceRichText.string = ''; // this.calcSentenceRichText.string = '';
// h = Math.min(h, h - sh + this.node.h) // h = Math.min(h, h - sh + this.node.h)
// } // }
if (this.richText.node.height > this.node.height) { if (this.richText._labelHeight > this.node.height) {
let posY = (this.node.height - this.richText.node.height ) / 2; let posY = (this.node.height - this.richText._labelHeight ) / 2;
if (h > this.node.height){ if (h > this.node.height){
posY = posY + (h - this.node.height); posY = posY + (h - this.node.height);
} }
const b4 = this.richText.node.y;
this.richText.node.y = posY;// + this.magicHeight; // setTimeout(() => {
this.richText.node.y = posY;// + this.magicHeight;
// }, 0)
// console.log('this.richText.node.y',b4 , this.richText.node.y, posY)
} }
}, },
findSentenceIndexByWords(s, sentenceIndexObj) { findSentenceIndexByWords(s, sentenceIndexObj) {
...@@ -761,7 +782,9 @@ cc.Class({ ...@@ -761,7 +782,9 @@ cc.Class({
this.calcHighlightRichText.string = textForCalc; this.calcHighlightRichText.string = textForCalc;
this.richText.string = `${textForCalc}${remained}`; this.richText.string = `${textForCalc}${remained}`;
// console.log(this.richText.node.getContentSize()); // console.log(this.richText.node.getContentSize());
// setTimeout(() => {
this.justifyContentPosition(); this.justifyContentPosition();
// }, 0)
// } // }
}, },
...@@ -969,7 +992,7 @@ cc.Class({ ...@@ -969,7 +992,7 @@ cc.Class({
}, },
resume() { resume() {
const adSrc = this.getCurrentPlayingSource(); const adSrc = this.getCurrentPlayingSource();
const ct = adSrc.getCurrentTime(); const ct = adSrc && adSrc.getCurrentTime();
if (this.__currentInteractivateMode == this.PLAY_MODE.MODE2) { if (this.__currentInteractivateMode == this.PLAY_MODE.MODE2) {
if (!this.playByTimePhaseStep) { if (!this.playByTimePhaseStep) {
this.playByTimePhaseStep = this.MODE2_STEP.ONE; this.playByTimePhaseStep = this.MODE2_STEP.ONE;
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"__id__": 8 "__id__": 8
}, },
{ {
"__id__": 152 "__id__": 159
}, },
{ {
"__id__": 119 "__id__": 119
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 165 "__id__": 172
}, },
{ {
"__id__": 166 "__id__": 173
}, },
{ {
"__id__": 167 "__id__": 174
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -382,12 +382,15 @@ ...@@ -382,12 +382,15 @@
}, },
{ {
"__id__": 12 "__id__": 12
},
{
"__id__": 151
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 164 "__id__": 158
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -589,14 +592,14 @@ ...@@ -589,14 +592,14 @@
"__id__": 118 "__id__": 118
}, },
{ {
"__id__": 161 "__id__": 155
}, },
{ {
"__id__": 162 "__id__": 156
} }
], ],
"_prefab": { "_prefab": {
"__id__": 163 "__id__": 157
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -4299,8 +4302,8 @@ ...@@ -4299,8 +4302,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1000, "width": 226,
"height": 420 "height": 63
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -4376,14 +4379,14 @@ ...@@ -4376,14 +4379,14 @@
"node": { "node": {
"__id__": 110 "__id__": 110
}, },
"_enabled": true, "_enabled": false,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 45, "_alignFlags": 0,
"_left": 0, "_left": 387,
"_right": 0, "_right": 387,
"_top": 0, "_top": 178.5,
"_bottom": 0, "_bottom": 178.5,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -5900,7 +5903,7 @@ ...@@ -5900,7 +5903,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "dfgBDyszZGmZpK9W02TusQ" "_id": "00NCWBvwlGXK6nMkc678BI"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -5916,7 +5919,7 @@ ...@@ -5916,7 +5919,7 @@
"__id__": 148 "__id__": 148
}, },
{ {
"__id__": 160 "__id__": 154
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5965,7 +5968,7 @@ ...@@ -5965,7 +5968,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "f706OmgqdMrYYu383Xz9rZ" "_id": "bbZUsb59RKh79VUlh+kTRL"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -6027,14 +6030,14 @@ ...@@ -6027,14 +6030,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "c0CWeJeGdLFrft5AaE/wXE" "_id": "0bNHiPOCBFCqbhL6F9qf9l"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg_title", "_name": "bg_title copy",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 152 "__id__": 8
}, },
"_children": [ "_children": [
{ {
...@@ -6044,10 +6047,10 @@ ...@@ -6044,10 +6047,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 158 "__id__": 152
}, },
{ {
"__id__": 159 "__id__": 153
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6096,7 +6099,143 @@ ...@@ -6096,7 +6099,143 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "b2znc1yAtHM4DLzwMxxVd/" "_id": "67qINnIUVKzbZ+4VHFoKoL"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "638f2c69-5b77-45da-afab-4cddfc93b372"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ed9+lQXChArp2aPsxS5mt7"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
},
"_enabled": true,
"alignMode": 1,
"_target": {
"__id__": 8
},
"_alignFlags": 9,
"_left": 70,
"_right": 0,
"_top": 20,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "83eW6VU+1GuqDUMcXSRfKB"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 149
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 68,
"g": 17,
"b": 136,
"a": 255
},
"_width": 2,
"_id": "30dhAy2SpFWpNh6E/+NZzT"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_clip": {
"__uuid__": "e69cbedd-e343-46ac-830c-6cc00cbb8a12"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "c6550+ugFN0alCQFnHhnFO"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_defaultClip": null,
"_clips": [],
"playOnLoad": false,
"_id": "b4tnBDrXZO1anaBXdcSkAy"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 12
},
"asset": {
"__uuid__": "dfda5cd6-ea60-4dcd-aec2-e7e4bb1b05e6"
},
"fileId": "",
"sync": false
},
{
"__type__": "a6faa3LtHJKdI5igeo8sgOO",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"designWidth": 1280,
"designHeight": 720,
"relativeNode": null,
"relativeX": 0,
"relativeY": 0,
"_id": "93rMDJhNFCHJwLxDdQsTyH"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -6107,19 +6246,19 @@ ...@@ -6107,19 +6246,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 153 "__id__": 160
}, },
{ {
"__id__": 151 "__id__": 163
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 156 "__id__": 170
}, },
{ {
"__id__": 157 "__id__": 171
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6175,16 +6314,16 @@ ...@@ -6175,16 +6314,16 @@
"_name": "New Sprite", "_name": "New Sprite",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 152 "__id__": 159
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 154 "__id__": 161
}, },
{ {
"__id__": 155 "__id__": 162
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6240,7 +6379,7 @@ ...@@ -6240,7 +6379,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 153 "__id__": 160
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6272,7 +6411,7 @@ ...@@ -6272,7 +6411,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 153 "__id__": 160
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -6295,39 +6434,261 @@ ...@@ -6295,39 +6434,261 @@
"_id": "80NbNvgatM5Kb3dgKnahzS" "_id": "80NbNvgatM5Kb3dgKnahzS"
}, },
{ {
"__type__": "a6faa3LtHJKdI5igeo8sgOO", "__type__": "cc.Node",
"_name": "bg_title",
"_objFlags": 0,
"_parent": {
"__id__": 159
},
"_children": [
{
"__id__": 164
}
],
"_active": true,
"_components": [
{
"__id__": 168
},
{
"__id__": 169
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 506,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-588.484,
338.122,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b2znc1yAtHM4DLzwMxxVd/"
},
{
"__type__": "cc.Node",
"_name": "title_box",
"_objFlags": 0,
"_parent": {
"__id__": 163
},
"_children": [
{
"__id__": 165
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 315,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
120,
-43,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c0CWeJeGdLFrft5AaE/wXE"
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 164
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 166
},
{
"__id__": 167
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 4,
"height": 79.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f706OmgqdMrYYu383Xz9rZ"
},
{
"__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 152 "__id__": 165
}, },
"_enabled": true, "_enabled": true,
"designWidth": 1280, "_materials": [
"designHeight": 720, {
"relativeNode": null, "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"relativeX": 0, }
"relativeY": 0, ],
"_id": "776jKNjhpJEbYKLQDHFcKG" "_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "",
"_N$string": "",
"_fontSize": 50,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "a46c0ec1-043a-4690-8b6a-8eb62db9356e"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "dfgBDyszZGmZpK9W02TusQ"
}, },
{ {
"__type__": "b5de2RiKeJFtoc0sgD4Q3zM", "__type__": "cc.LabelOutline",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 152 "__id__": 165
}, },
"_enabled": true, "_enabled": true,
"relativeNode": null, "_color": {
"percentX": 0, "__type__": "cc.Color",
"percentY": 0, "r": 68,
"_id": "cf7cokkc9JeowADQ/vjh+7" "g": 17,
"b": 136,
"a": 255
},
"_width": 2,
"_id": "65zyIr2lNA+5sQGtK/ENV9"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 151 "__id__": 163
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6359,15 +6720,15 @@ ...@@ -6359,15 +6720,15 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 151 "__id__": 163
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 9, "_alignFlags": 9,
"_left": 70, "_left": -588.484,
"_right": 0, "_right": 0,
"_top": 20, "_top": -338.122,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
...@@ -6382,79 +6743,32 @@ ...@@ -6382,79 +6743,32 @@
"_id": "b0SKRGPQ1HeqrZXXjcLy+w" "_id": "b0SKRGPQ1HeqrZXXjcLy+w"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "a6faa3LtHJKdI5igeo8sgOO",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 149
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 68,
"g": 17,
"b": 136,
"a": 255
},
"_width": 2,
"_id": "65zyIr2lNA+5sQGtK/ENV9"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_clip": {
"__uuid__": "e69cbedd-e343-46ac-830c-6cc00cbb8a12"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "c6550+ugFN0alCQFnHhnFO"
},
{
"__type__": "cc.Animation",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 159
}, },
"_enabled": true, "_enabled": true,
"_defaultClip": null, "designWidth": 1280,
"_clips": [], "designHeight": 720,
"playOnLoad": false, "relativeNode": null,
"_id": "b4tnBDrXZO1anaBXdcSkAy" "relativeX": 0,
}, "relativeY": 0,
{ "_id": "776jKNjhpJEbYKLQDHFcKG"
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 12
},
"asset": {
"__uuid__": "dfda5cd6-ea60-4dcd-aec2-e7e4bb1b05e6"
},
"fileId": "",
"sync": false
}, },
{ {
"__type__": "a6faa3LtHJKdI5igeo8sgOO", "__type__": "b5de2RiKeJFtoc0sgD4Q3zM",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 8 "__id__": 159
}, },
"_enabled": true, "_enabled": false,
"designWidth": 1280,
"designHeight": 720,
"relativeNode": null, "relativeNode": null,
"relativeX": 0, "percentX": 0,
"relativeY": 0, "percentY": 0,
"_id": "93rMDJhNFCHJwLxDdQsTyH" "_id": "cf7cokkc9JeowADQ/vjh+7"
}, },
{ {
"__type__": "cc.Canvas", "__type__": "cc.Canvas",
......
...@@ -88,7 +88,17 @@ cc.Class({ ...@@ -88,7 +88,17 @@ cc.Class({
getDefaultData() { getDefaultData() {
const data = {"title":"aaaaa","pic_url":"http://staging-teach.cdn.ireadabc.com/7324245447e15cca42e0d4c88a32f88a.jpg","accompany_audio_url":"http://staging-teach.cdn.ireadabc.com/4a59032f9b5f726cb2cde2178a7f51fc.mp3","lrcData":{"audio_url":"http://staging-teach.cdn.ireadabc.com/1d1184717ebff259c72fedcb6b249431.mp3","fontSize":50,"lineHeight":100,"lyrics":[{"time":11.09,"data":"yi shan yi shan liang jing jing","newLine":true},{"time":14.9,"data":"满天都是小星星","newLine":true},{"time":19.31,"data":"挂在天上放光明","newLine":true},{"time":23.62,"data":"好像许多小眼睛","newLine":true},{"time":27.93,"data":"一闪一闪亮晶晶","newLine":true},{"time":32.32,"data":"满天都是小星星","newLine":true},{"time":41.1,"data":"一闪一闪亮晶晶","newLine":true},{"time":45.45,"data":"满天都是小星星","newLine":true},{"time":49.74,"data":"挂在天上放光明","newLine":true},{"time":54.16,"data":"好像许多小眼睛","newLine":true},{"time":58.39,"data":"一闪一闪亮晶晶","newLine":true},{"time":62.9,"data":"满天都是小星星","newLine":true},{"time":76.36,"data":"一闪一闪亮晶晶","newLine":true},{"time":80.28,"data":"满天都是小星星","newLine":true},{"time":84.65,"data":"挂在天上放光明","newLine":true},{"time":88.92,"data":"好像许多小眼睛","newLine":true},{"time":93.41,"data":"一闪一闪亮晶晶","newLine":true},{"time":97.72,"data":"满天都是小星星","newLine":true}]},"title_audio_url":"http://staging-teach.cdn.ireadabc.com/39065c5f63a31bd1433c1a046e407a98.mp3"} const data = {"title":"aaaaa","pic_url":"http://staging-teach.cdn.ireadabc.com/7324245447e15cca42e0d4c88a32f88a.jpg","accompany_audio_url":"http://staging-teach.cdn.ireadabc.com/4a59032f9b5f726cb2cde2178a7f51fc.mp3",
"lrcData":{
"audio_url":"http://staging-teach.cdn.ireadabc.com/1d1184717ebff259c72fedcb6b249431.mp3",
"fontSize":50,"lineHeight":100,
"lyrics":[
{"time":11.09,"data":"yi shan yi shan liang jing jing","newLine":true},
{"time":14.9,"data":"1111满天都是小星星","newLine":true},
{"time":19.31,"data":"挂在天上放光明","newLine":true},
{"time":23.62,"data":"好像许多小眼睛","newLine":true},
{"time":27.93,"data":"一闪一闪亮晶晶","newLine":true},
{"time":32.32,"data":"满天都是小星星","newLine":true},{"time":41.1,"data":"一闪一闪亮晶晶","newLine":true},{"time":45.45,"data":"满天都是小星星","newLine":true},{"time":49.74,"data":"挂在天上放光明","newLine":true},{"time":54.16,"data":"好像许多小眼睛","newLine":true},{"time":58.39,"data":"一闪一闪亮晶晶","newLine":true},{"time":62.9,"data":"满天都是小星星","newLine":true},{"time":76.36,"data":"一闪一闪亮晶晶","newLine":true},{"time":80.28,"data":"满天都是小星星","newLine":true},{"time":84.65,"data":"挂在天上放光明","newLine":true},{"time":88.92,"data":"好像许多小眼睛","newLine":true},{"time":93.41,"data":"一闪一闪亮晶晶","newLine":true},{"time":97.72,"data":"满天都是小星星","newLine":true}]},"title_audio_url":"http://staging-teach.cdn.ireadabc.com/39065c5f63a31bd1433c1a046e407a98.mp3"}
// if (data.picArr) { // if (data.picArr) {
...@@ -108,7 +118,7 @@ cc.Class({ ...@@ -108,7 +118,7 @@ cc.Class({
console.log(' preload data, ', data); console.log(' preload data, ', data);
// typeof // typeof
this.loadEnd(); this.loadEnd(data);
if (window && window["air"]) { if (window && window["air"]) {
window["air"].hideAirClassLoading(); window["air"].hideAirClassLoading();
} }
......
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