index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <mouse-tips />
  3. <nav-guide :fullpage="fullpage" />
  4. <loadImg :fullpage="fullpage" />
  5. <section1 />
  6. <section2 />
  7. <section3 :fullpage="fullpage" />
  8. <section4 />
  9. <section5 />
  10. <section6 />
  11. <section7 />
  12. <section8 />
  13. <section9 />
  14. <section10 />
  15. <section11 />
  16. <section12 />
  17. <section13 />
  18. <section14 :fullpage="fullpage" />
  19. <section15 />
  20. <section16 />
  21. <section17 />
  22. <section18 />
  23. <section19 />
  24. <section20 />
  25. <section21 />
  26. <section22 />
  27. <section23 />
  28. <section24 />
  29. <section25 />
  30. <section26 />
  31. <section27 />
  32. <section28 />
  33. <section29 />
  34. <section30 />
  35. <section31 />
  36. </template>
  37. <script setup>
  38. import loadImg from "../components/imgLoading.vue";
  39. import mouseTips from "../components/mouseTips.vue";
  40. import navGuide from "../components/navGuide.vue";
  41. import Section1 from "../pages/section1.vue";
  42. import Section2 from "../pages/section2.vue";
  43. import Section3 from "../pages/section3.vue";
  44. import Section4 from "../pages/section4.vue";
  45. import Section5 from "../pages/section5.vue";
  46. import Section6 from "../pages/section6.vue";
  47. import Section7 from "../pages/section7.vue";
  48. import Section8 from "../pages/section8.vue";
  49. import Section9 from "../pages/section9.vue";
  50. import Section10 from "../pages/section10.vue";
  51. import Section11 from "../pages/section11.vue";
  52. import Section12 from "../pages/section12.vue";
  53. import Section13 from "../pages/section13.vue";
  54. import Section14 from "../pages/section14.vue";
  55. import Section15 from "../pages/section15.vue";
  56. import Section16 from "../pages/section16.vue";
  57. import Section17 from "../pages/section17.vue";
  58. import Section18 from "../pages/section18.vue";
  59. import Section19 from "../pages/section19.vue";
  60. import Section20 from "../pages/section20.vue";
  61. import Section21 from "../pages/section21.vue";
  62. import Section22 from "../pages/section22.vue";
  63. import Section23 from "../pages/section23.vue";
  64. import Section24 from "../pages/section24.vue";
  65. import Section25 from "../pages/section25.vue";
  66. import Section26 from "../pages/section26.vue";
  67. import Section27 from "../pages/section27.vue";
  68. import Section28 from "../pages/section28.vue";
  69. import Section29 from "../pages/section29.vue";
  70. import Section30 from "../pages/section30.vue";
  71. import Section31 from "../pages/section31.vue";
  72. import { onMounted } from "vue";
  73. import { useCanvasPlayer } from "../hooks/usecanvasPlayer";
  74. import { emitter } from "../emitter.js";
  75. import { isMobile } from "../utils/isMoblie";
  76. const setting = [
  77. {
  78. name: "人鸟兽",
  79. sectionType: 3,
  80. canvasId: "canvas-section-3",
  81. imageUrl: isMobile() ? "./img/canvas/hua" : "./img/canvas/pc1",
  82. // total: isMobile() ? 900 : 300,
  83. total: isMobile() ? 940 : 331,
  84. },
  85. {
  86. name: "金蝉玉叶",
  87. canvasId: "canvas-section-14",
  88. sectionType: 14,
  89. imageUrl: isMobile() ? "./img/canvas/tt" : "./img/canvas/rsy",
  90. dots: [],
  91. total: isMobile() ? 300 : 297,
  92. },
  93. ];
  94. defineOptions({
  95. name: "View",
  96. });
  97. const props = defineProps({
  98. fullpage: Object,
  99. });
  100. const player = useCanvasPlayer(setting);
  101. onMounted(() => {
  102. player.mount();
  103. player.on("loaded", () => {
  104. console.log("所有图片完成");
  105. emitter.emit("loaded");
  106. });
  107. player.on("loadPress", (p) => {
  108. // console.log("loadPress", p);
  109. emitter.emit("updatePress", p);
  110. });
  111. });
  112. </script>