|
@@ -371,30 +371,45 @@ export default {
|
|
|
let fodderId = [];
|
|
|
switch (item.hotspotType) {
|
|
|
case "image":
|
|
|
- fodderId = item.image.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
- item.fodderId = fodderId;
|
|
|
- // fodderId = item.content.image.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
- // item.fodderId = fodderId;
|
|
|
+ try {
|
|
|
+ fodderId = item.image.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
+ item.fodderId = fodderId;
|
|
|
+ } catch (e) {
|
|
|
+ fodderId = item.content.image.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
+ item.fodderId = fodderId;
|
|
|
+ }
|
|
|
break;
|
|
|
case "audio":
|
|
|
- item.fodderId = [item.audio.id].map((i) => i);
|
|
|
- // item.fodderId = [item.content.audio.id].map((i) => i);
|
|
|
+ try {
|
|
|
+ item.fodderId = [item.audio.id].map((i) => i);
|
|
|
+ } catch (e) {
|
|
|
+ item.fodderId = [item.content.audio.id].map((i) => i);
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
case "imageText":
|
|
|
- fodderId = item.imageTextInfo.imageList.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
- item.imageTextInfo.audio.id && fodderId.push(item.imageTextInfo.audio.id);
|
|
|
- item.fodderId = fodderId;
|
|
|
- // fodderId = item.content.imageTextInfo.imageList.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
- // item.imageTextInfo.audio.id && fodderId.push(item.content.imageTextInfo.audio.id);
|
|
|
- // item.fodderId = fodderId;
|
|
|
+ try {
|
|
|
+ fodderId = item.imageTextInfo.imageList.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
+ item.imageTextInfo.audio.id && fodderId.push(item.imageTextInfo.audio.id);
|
|
|
+ item.fodderId = fodderId;
|
|
|
+ } catch (e) {
|
|
|
+ fodderId = item.content.imageTextInfo.imageList.reduce((p, c) => p.concat(c["id"]), []).map((i) => i);
|
|
|
+ item.content.imageTextInfo.audio.id && fodderId.push(item.content.imageTextInfo.audio.id);
|
|
|
+ item.fodderId = fodderId;
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
case "video":
|
|
|
- item.fodderId = [item.video.id];
|
|
|
+ item.fodderId = [item.video.id];
|
|
|
// item.fodderId = [item.content.video.id];
|
|
|
break;
|
|
|
case "scene":
|
|
|
- item.fodderId = [item.scene.fodderId].map((i) => i);
|
|
|
- // item.fodderId = [item.content.scene.fodderId].map((i) => i);
|
|
|
+ try {
|
|
|
+ item.fodderId = [item.scene.fodderId].map((i) => i);
|
|
|
+ } catch (e) {
|
|
|
+ item.fodderId = [item.content.scene.fodderId].map((i) => i);
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
// target.fodderId = [];
|