Commit 2f21aa20 authored by 范雪寒's avatar 范雪寒

feat:

parent 6e04ead0
...@@ -78,6 +78,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -78,6 +78,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
getPartLength() { getPartLength() {
const pageIdxMap = this.data.pageArr.map((page, pageIdx)=>page.hotZoneItemArr.map(item=>pageIdx)).flat();
console.log('pageIdxMap = ' + JSON.stringify(pageIdxMap));
return this.data.pageArr.map(page => page.hotZoneItemArr).flat().length; return this.data.pageArr.map(page => page.hotZoneItemArr).flat().length;
} }
...@@ -263,7 +266,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -263,7 +266,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
asyncPlayAudioByUrl(url: string) { asyncPlayAudioByUrl(url: string) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.playAudioByUrl(url, () => { this.playAudioByUrl(url, () => {
resolve(); resolve(null);
}); });
}); });
} }
......
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