浏览代码

feat: 华中人民

chenlei 1 周之前
父节点
当前提交
dfdb80b298
共有 55 个文件被更改,包括 1541 次插入4 次删除
  1. 1 0
      components.d.ts
  2. 2 0
      package.json
  3. 二进制
      public/images/hzrm/Volume btn_off.png
  4. 二进制
      public/images/hzrm/Volume btn_on.png
  5. 二进制
      public/images/hzrm/auto-suspend.png
  6. 二进制
      public/images/hzrm/auto.png
  7. 二进制
      public/images/hzrm/dollhouse.png
  8. 二进制
      public/images/hzrm/enlarge_on.png
  9. 二进制
      public/images/hzrm/floor.png
  10. 二进制
      public/images/hzrm/hotlist.png
  11. 二进制
      public/images/hzrm/inside.png
  12. 二进制
      public/images/hzrm/like.png
  13. 二进制
      public/images/hzrm/logo.png
  14. 二进制
      public/images/hzrm/menu-bg.png
  15. 二进制
      public/images/hzrm/narrow_off.png
  16. 二进制
      public/images/hzrm/pause.png
  17. 二进制
      public/images/hzrm/play.png
  18. 二进制
      public/images/hzrm/share.png
  19. 二进制
      public/images/hzrm/unlike.png
  20. 二进制
      public/images/hzrm/viewer.png
  21. 二进制
      src/hotspot/assets/images/bg-min.jpg
  22. 二进制
      src/hotspot/assets/images/img-min.png
  23. 二进制
      src/hotspot/assets/images/logo-min.png
  24. 二进制
      src/hotspot/assets/images/m-bg-min.jpg
  25. 175 0
      src/hotspot/views/hotspot/index.hzrm.scss
  26. 297 0
      src/hotspot/views/hotspot/index.hzrm.vue
  27. 3 2
      src/index/app.scss
  28. 7 0
      src/index/assets/el.hzrm.scss
  29. 二进制
      src/index/assets/images/expand.png
  30. 21 0
      src/index/router/index.hzrm.ts
  31. 二进制
      src/index/views/cover/images/bg-min.jpg
  32. 二进制
      src/index/views/cover/images/btn-min.png
  33. 二进制
      src/index/views/cover/images/copyright-min.png
  34. 二进制
      src/index/views/cover/images/img-min.png
  35. 二进制
      src/index/views/cover/images/logo-min.png
  36. 二进制
      src/index/views/cover/images/m-bg-min.jpg
  37. 二进制
      src/index/views/cover/images/title-min.png
  38. 93 0
      src/index/views/cover/index.scss
  39. 36 0
      src/index/views/cover/index.vue
  40. 二进制
      src/index/views/home/components/hot-spot-list/images/bg-min.jpg
  41. 二进制
      src/index/views/home/components/hot-spot-list/images/close.png
  42. 二进制
      src/index/views/home/components/hot-spot-list/images/m-bg-min.jpg
  43. 152 0
      src/index/views/home/components/hot-spot-list/index.hzrm.scss
  44. 26 0
      src/index/views/home/components/hot-spot-list/index.hzrm.tsx
  45. 144 0
      src/index/views/home/components/menu/index.hzrm.scss
  46. 172 0
      src/index/views/home/components/menu/index.hzrm.tsx
  47. 47 0
      src/index/views/home/components/popup/index.hzrm.scss
  48. 16 0
      src/index/views/home/components/popup/index.hzrm.tsx
  49. 二进制
      src/index/views/home/components/unit-popup/images/bg-min.jpg
  50. 二进制
      src/index/views/home/components/unit-popup/images/bg2-min.png
  51. 二进制
      src/index/views/home/components/unit-popup/images/icon-l.png
  52. 二进制
      src/index/views/home/components/unit-popup/images/icon-r.png
  53. 225 0
      src/index/views/home/components/unit-popup/index.vue
  54. 118 0
      src/index/views/home/index.hzrm.tsx
  55. 6 2
      src/index/views/home/index.scss

+ 1 - 0
components.d.ts

@@ -7,6 +7,7 @@ export {}
 /* prettier-ignore */
 declare module 'vue' {
   export interface GlobalComponents {
+    ElDialog: typeof import('element-plus/es')['ElDialog']
     ElImage: typeof import('element-plus/es')['ElImage']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']

+ 2 - 0
package.json

@@ -7,6 +7,8 @@
     "serve": "cross-env VITE_APP_TITLE=大理洱海科普馆 VITE_APP_HOT_DOMAIN=./hotspot.html vite",
     "build:test": "cross-env VITE_APP_TITLE=大理洱海科普馆 VITE_APP_HOT_DOMAIN=./hotspot.html run-p type-check \"build-only {@}\" --",
     "build:offline": "cross-env VITE_APP_OFFLINE=1 npm run build:test && cross-env node ./scripts/generate-offline-config.js && replace-in-file --configFile ./scripts/offline-replace-config.json",
+    "serve:hzrm": "cross-env VITE_APP_SCENE=hzrm VITE_APP_TITLE=华中人民的长城 VITE_APP_HOT_DOMAIN=./hotspot.html vite",
+    "build:hzrm:test": "cross-env VITE_APP_SCENE=hzrm VITE_APP_TITLE=华中人民的长城 VITE_APP_HOT_DOMAIN=./hotspot.html run-p type-check \"build-only {@}\" --",
     "push:test": "cross-env node ./scripts/publish.js",
     "preview": "vite preview",
     "build-only": "vite build",

二进制
public/images/hzrm/Volume btn_off.png


二进制
public/images/hzrm/Volume btn_on.png


二进制
public/images/hzrm/auto-suspend.png


二进制
public/images/hzrm/auto.png


二进制
public/images/hzrm/dollhouse.png


二进制
public/images/hzrm/enlarge_on.png


二进制
public/images/hzrm/floor.png


二进制
public/images/hzrm/hotlist.png


二进制
public/images/hzrm/inside.png


二进制
public/images/hzrm/like.png


二进制
public/images/hzrm/logo.png


二进制
public/images/hzrm/menu-bg.png


二进制
public/images/hzrm/narrow_off.png


二进制
public/images/hzrm/pause.png


二进制
public/images/hzrm/play.png


二进制
public/images/hzrm/share.png


二进制
public/images/hzrm/unlike.png


二进制
public/images/hzrm/viewer.png


二进制
src/hotspot/assets/images/bg-min.jpg


二进制
src/hotspot/assets/images/img-min.png


二进制
src/hotspot/assets/images/logo-min.png


二进制
src/hotspot/assets/images/m-bg-min.jpg


+ 175 - 0
src/hotspot/views/hotspot/index.hzrm.scss

@@ -0,0 +1,175 @@
+.hotspot-page {
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  padding: 138px 50px 20px;
+  width: 1312px;
+  height: 725px;
+  display: flex;
+  gap: 40px;
+  transform: translate(-50%, -50%);
+  background: url('@hotspot/assets/images/bg-min.jpg') no-repeat center bottom / cover;
+  z-index: var(--z-index-popper);
+
+  &::before {
+    content: '';
+    position: absolute;
+    top: 41px;
+    left: 38px;
+    width: 281px;
+    height: 65px;
+    background: url('@hotspot/assets/images/logo-min.png') no-repeat center / contain;
+  }
+
+  &-container {
+    position: relative;
+    width: 50%;
+    height: 100%;
+    padding-bottom: 50px;
+
+    .swiper {
+      width: 100%;
+      height: 100%;
+    }
+    iframe,
+    video,
+    .el-image {
+      width: 100%;
+      height: 100%;
+      object-fit: contain;
+    }
+  }
+
+  &-scrollbar {
+    flex: 1;
+    overflow: auto;
+    color: #e6aa4a;
+
+    &.isTop {
+      max-height: 65%;
+      height: 65%;
+      padding: 50px 0;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+    }
+    h3 {
+      font-size: 36px;
+      font-family: 'Source Han Sans CN-Bold';
+    }
+    div {
+      line-height: 1.5;
+      margin-top: 40px;
+      font-size: 20px;
+      text-indent: 2em;
+    }
+  }
+
+  .swiper-slide {
+    text-align: center;
+    font-size: 18px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    transition: 0.3s;
+    transform: scale(0.8);
+    position: relative;
+    opacity: 0.5;
+  }
+  .swiper-slide-active,
+  .swiper-slide-duplicate-active {
+    transform: scale(1);
+    opacity: 1;
+    z-index: 999;
+  }
+
+  &-nav {
+    position: absolute;
+    left: 0;
+    bottom: 10px;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    gap: 10px;
+    z-index: 1;
+
+    &__item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      gap: 4px;
+      color: #fff;
+      white-space: nowrap;
+      font-size: 14px;
+      width: 90px;
+      height: 32px;
+      line-height: 32px;
+      cursor: pointer;
+      border-radius: 10px;
+      border: 1px solid #fff;
+
+      &.active {
+        background: var(--el-color-primary);
+        border: none;
+      }
+    }
+  }
+}
+
+@media only screen and (max-width: 600px) {
+  .hotspot-page {
+    flex-direction: column;
+    gap: 20px;
+    top: 20px;
+    padding: 68px 25px 65px;
+    width: calc(100% - 40px);
+    height: calc(100% - 80px);
+    transform: translateX(-50%);
+    background-image: url('@hotspot/assets/images/m-bg-min.jpg');
+
+    &::after {
+      content: '';
+      position: fixed;
+      left: 12px;
+      right: 12px;
+      bottom: -60px;
+      height: 206px;
+      background: url('../../assets/images/img-min.png') no-repeat center / contain;
+      z-index: -1;
+    }
+    h3 {
+      margin: 0 0 16px;
+      font-size: 26px;
+      color: #e6aa4a;
+      text-align: center;
+    }
+    &::before {
+      top: 15px;
+      left: 18px;
+      width: 141px;
+      height: 33px;
+    }
+    &-container {
+      width: 100%;
+      height: 250px;
+    }
+    &-nav {
+      flex-wrap: wrap;
+      right: 10px;
+      bottom: 10px;
+
+      &__item {
+        width: 70px;
+      }
+    }
+    &-scrollbar {
+      width: 100%;
+
+      div {
+        margin-top: 0;
+        font-size: 12px;
+        line-height: 30px;
+      }
+    }
+  }
+}

+ 297 - 0
src/hotspot/views/hotspot/index.hzrm.vue

@@ -0,0 +1,297 @@
+<template>
+  <div class="hotspot-page">
+    <h3 v-if="isMobile">{{ myTitle }}</h3>
+
+    <div class="hotspot-page-container">
+      <!-- 音频播放器 -->
+      <audio
+        id="myAudio"
+        v-if="audio"
+        ref="volumeRef"
+        v-show="isOneAduio"
+        :src="audio"
+        controls
+      ></audio>
+
+      <!-- 模型页面 -->
+      <Swiper
+        :modules="modules"
+        class="hotspot-page-swiper"
+        :centered-slides="true"
+        :navigation="Boolean(curList.length) && !isMobile"
+        :pagination="
+          isMobile
+            ? false
+            : {
+                clickable: true,
+              }
+        "
+        @swiper="initSwiper"
+        @slideChange="handleChange"
+      >
+        <SwiperSlide v-for="(item, index) in curList" :key="item.url">
+          <template v-if="swiperInited">
+            <template v-if="myType === 'model'">
+              <iframe v-if="index === myInd" :src="item" frameborder="0" />
+            </template>
+            <template v-else-if="myType === 'video'">
+              <video ref="videos" controls :src="item.url" />
+            </template>
+            <template v-else-if="myType === 'img'">
+              <el-image :src="item" fit="contain" @click="handlePreview(index)" />
+            </template>
+          </template>
+        </SwiperSlide>
+      </Swiper>
+
+      <!-- 底部的tab -->
+      <ul v-if="flooTab.length > 1" class="hotspot-page-nav">
+        <!-- 音频图标 -->
+        <li
+          v-if="audio && !isOneAduio"
+          :class="[
+            'hotspot-page-nav__item',
+            {
+              active: audioSta,
+            },
+          ]"
+          @click="audioSta = !audioSta"
+        >
+          <img :src="VolumeOn" :alt="audioSta ? '关闭音频' : '打开音频'" />
+          <span>音频</span>
+        </li>
+        <li
+          v-for="item in flooTab"
+          :key="item.id"
+          :class="[
+            'hotspot-page-nav__item',
+            {
+              active: myType === item.type,
+            },
+          ]"
+          @click="handleTab(item)"
+        >
+          <img :class="`${item.type}-icon`" :src="item.icon" />
+          <span>{{ item.name }}</span>
+        </li>
+      </ul>
+    </div>
+
+    <div class="hotspot-page-scrollbar" :class="{ isTop: !flooTab.length && !isMobile }">
+      <h3 v-if="!isMobile">{{ myTitle }}</h3>
+      <div v-html="myTxt" />
+    </div>
+  </div>
+</template>
+
+<script>
+  import { Swiper, SwiperSlide } from 'swiper/vue';
+  import { Navigation, Pagination } from 'swiper/modules';
+  import 'swiper/css';
+  import 'swiper/css/navigation';
+  import 'swiper/css/pagination';
+
+  import { parseUrlParams, judgeIsMobile } from '@/utils';
+  import { MESSAGE_KEY } from '@/types';
+
+  import ModelIcon from '@hotspot/assets/images/model-icon.png';
+  import ImageIcon from '@hotspot/assets/images/img-icon.png';
+  import VideoIcon from '@hotspot/assets/images/video-icon.png';
+  import VolumeOn from '@hotspot/assets/images/audio-icon.png';
+
+  const urlParams = parseUrlParams(window.location.href);
+  const isMobile = judgeIsMobile();
+
+  export default {
+    name: 'hotspot',
+    components: {
+      Swiper,
+      SwiperSlide,
+    },
+    data() {
+      return {
+        isMobile,
+        VolumeOn,
+        m: urlParams.m,
+        id: urlParams.id,
+        // 音频地址
+        audio: '',
+        // 如果只有单独的音频
+        isOneAduio: false,
+        // 音频状态
+        audioSta: false,
+        swiperInited: false,
+
+        data: {
+          // 模型数组
+          model: [],
+          // 视频数组
+          video: [],
+          // 图片数组
+          img: [],
+        },
+        // 当前 type
+        myType: '',
+
+        // 当前索引
+        myInd: 0,
+
+        // 底部的tab
+        flooTab: [],
+
+        // 标题
+        myTitle: '',
+        // 内容
+        myTxt: '',
+        // 视频内容
+        videoTxt: [],
+        imgTxt: [],
+
+        // 只有标题和文字(没有视频,没有模型,没有图片)
+        oneTxt: false,
+
+        modules: [Navigation, Pagination],
+      };
+    },
+    computed: {
+      curList() {
+        return this.data[this.myType] || [];
+      },
+      isTextType() {
+        return this.myType === 'text';
+      },
+    },
+    watch: {
+      audioSta(val) {
+        if (val) {
+          this.$refs.volumeRef.play();
+          this.$refs.volumeRef.onended = () => {
+            // console.log("----音频播放完毕");
+            this.audioSta = false;
+          };
+        } else this.$refs.volumeRef.pause();
+      },
+    },
+    mounted() {
+      this.getData();
+    },
+    methods: {
+      async getData() {
+        // https://www.4dmodel.com/
+        let url = `${
+          Boolean(Number(import.meta.env.VITE_APP_OFFLINE)) ? '.' : 'https://super.4dage.com'
+        }/data/${this.id}/hot/js/data.js?time=${Math.random()}`;
+        let result = await fetch(url).then((response) => response.json());
+        const resData = result[this.m];
+
+        if (resData) {
+          this.audio = resData.backgroundMusic;
+          // 只有单独的音频上传
+          if (resData.backgroundMusic && !resData.model && !resData.video && !resData.images) {
+            this.isOneAduio = true;
+          }
+          // 底部的tab
+          const arr = [];
+          const obj = {};
+          if (resData.images) {
+            obj.img = resData.images;
+            arr.push({ id: 3, type: 'img', name: '图片', icon: ImageIcon });
+          }
+          if (resData.video) {
+            obj.video = resData.video;
+            arr.push({ id: 2, type: 'video', name: '视频', icon: VideoIcon });
+          } else {
+            this.$nextTick(() => {
+              if (
+                !window.navigator.userAgent.match(
+                  /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
+                )
+              ) {
+                this.audioSta = true;
+                this.$refs.volumeRef.play();
+              }
+            });
+          }
+          if (resData.model) {
+            obj.model = resData.model;
+            arr.push({ id: 1, type: 'model', name: '模型', icon: ModelIcon });
+          }
+
+          this.flooTab = arr;
+          this.data = obj;
+
+          // 当前type的值 应该为
+          if (resData.images) this.myType = 'img';
+          else if (resData.model) this.myType = 'model';
+          else if (resData.video) {
+            this.myType = 'video';
+            this.$nextTick(() => {
+              this.handleVideoPlay(this.data.video[0].url);
+            });
+          } else this.myType = 'text';
+
+          this.myTitle = resData.title || '';
+          this.myTxt = resData.content || '';
+          this.videoTxt = resData.videosDesc || [];
+          this.imgTxt = resData.imagesDesc || [];
+
+          // 只有 标题和 文字介绍(没有视频,没有模型,没有图片)
+          if (!obj.model && !obj.video && !obj.img && !resData.backgroundMusic) {
+            this.oneTxt = true;
+          }
+        }
+      },
+
+      handleTab(item) {
+        this.myInd = 0;
+        this.myType = item.type;
+        this.swiper?.slideTo(0);
+
+        switch (this.myType) {
+          case 'video':
+            this.$nextTick(() => {
+              this.handleVideoPlay(this.data.video[0].url);
+            });
+            break;
+        }
+      },
+
+      initSwiper(swiper) {
+        this.swiper = swiper;
+        this.swiperInited = true;
+      },
+      handleChange({ activeIndex }) {
+        this.myInd = activeIndex;
+
+        switch (this.myType) {
+          case 'video':
+            this.handleVideoPlay(this.data.video[activeIndex].url);
+            break;
+        }
+      },
+      handleVideoPlay(url) {
+        const video = this.$refs.videos?.find((i) => i.src === url);
+
+        this.lastVideo?.pause();
+        if (!video) return;
+
+        video.play();
+        this.lastVideo = video;
+      },
+      handlePreview(idx) {
+        window.parent.postMessage(
+          { type: MESSAGE_KEY.SHOW_VIEWER, images: [this.curList[idx]] },
+          '*'
+        );
+      },
+    },
+  };
+</script>
+
+<style lang="scss">
+  @use './index.hzrm.scss';
+
+  .viewer-button.viewer-close {
+    display: none;
+  }
+</style>

+ 3 - 2
src/index/app.scss

@@ -7,6 +7,7 @@
   --design-height: 920;
   --swiper-theme-color: white;
   --swiper-pagination-bullet-inactive-color: white;
+  --el-overlay-color-lighter: rgba(0, 0, 0, 0.8);
 }
 
 body,
@@ -47,7 +48,7 @@ body {
   margin: 0px;
   font-size: 14px;
   color: rgba(255, 255, 255, 0.9);
-  font-family: 'Source Han Sans CN-Medium';
+  font-family: 'Source Han Sans CN-Regular';
   -webkit-tap-highlight-color: transparent;
 }
 a {
@@ -138,6 +139,6 @@ iframe {
 @media only screen and (max-width: 600px) {
   :root {
     --design-width: 750;
-    --design-height: 1440;
+    --design-height: 1624;
   }
 }

+ 7 - 0
src/index/assets/el.hzrm.scss

@@ -0,0 +1,7 @@
+@forward 'element-plus/theme-chalk/src/common/var.scss' with (
+  $colors: (
+    'primary': (
+      'base': #ca0915,
+    ),
+  )
+);

二进制
src/index/assets/images/expand.png


+ 21 - 0
src/index/router/index.hzrm.ts

@@ -0,0 +1,21 @@
+import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router';
+
+const routes: Array<RouteRecordRaw> = [
+  {
+    path: '/',
+    name: 'cover',
+    component: () => import('@/views/cover/index.vue'),
+  },
+  {
+    path: '/scene',
+    name: 'home',
+    component: () => import('@/views/home'),
+  },
+];
+
+const router = createRouter({
+  history: createWebHashHistory(import.meta.env.BASE_URL),
+  routes,
+});
+
+export default router;

二进制
src/index/views/cover/images/bg-min.jpg


二进制
src/index/views/cover/images/btn-min.png


二进制
src/index/views/cover/images/copyright-min.png


二进制
src/index/views/cover/images/img-min.png


二进制
src/index/views/cover/images/logo-min.png


二进制
src/index/views/cover/images/m-bg-min.jpg


二进制
src/index/views/cover/images/title-min.png


+ 93 - 0
src/index/views/cover/index.scss

@@ -0,0 +1,93 @@
+@use '@/assets/utils.scss';
+
+.cover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: url('./images/bg-min.jpg') no-repeat center / cover;
+
+  &__logo {
+    position: absolute;
+    top: utils.vh-calc(30);
+    left: utils.vw-calc(32);
+    width: utils.vw-calc(357);
+    height: utils.vw-calc(81);
+  }
+  &__title {
+    position: absolute;
+    top: utils.vh-calc(255);
+    left: utils.vw-calc(32);
+    width: utils.vw-calc(939);
+    height: utils.vw-calc(230);
+  }
+  &__btn {
+    position: absolute;
+    top: utils.vh-calc(609);
+    left: utils.vw-calc(362);
+    width: utils.vw-calc(232);
+    height: utils.vw-calc(67);
+    cursor: pointer;
+  }
+  &::after {
+    content: '';
+    position: absolute;
+    right: utils.vw-calc(32);
+    bottom: 0;
+    width: utils.vw-calc(1234);
+    height: utils.vw-calc(854);
+    background: url('./images/img-min.png') no-repeat center / contain;
+  }
+}
+
+.m-cover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: url('./images/m-bg-min.jpg') no-repeat center / cover;
+
+  &__logo {
+    position: absolute;
+    top: utils.vh-calc(71);
+    left: utils.vw-calc(40);
+    width: utils.vw-calc(357);
+    height: utils.vw-calc(81);
+  }
+  &__title {
+    position: absolute;
+    top: utils.vh-calc(297);
+    left: 50%;
+    width: utils.vw-calc(680);
+    height: utils.vw-calc(167);
+    transform: translateX(-50%);
+  }
+  &__copyright {
+    position: absolute;
+    top: utils.vh-calc(548);
+    left: 50%;
+    width: utils.vw-calc(289);
+    height: utils.vw-calc(264);
+    transform: translateX(-50%);
+  }
+  &__btn {
+    position: absolute;
+    top: utils.vh-calc(942);
+    left: 50%;
+    width: utils.vw-calc(319);
+    height: utils.vw-calc(92);
+    transform: translateX(-50%);
+    cursor: pointer;
+  }
+  &::after {
+    content: '';
+    position: absolute;
+    left: 1px;
+    right: 1px;
+    bottom: 0;
+    height: utils.vw-calc(517);
+    background: url('./images/img-min.png') no-repeat center / contain;
+  }
+}

+ 36 - 0
src/index/views/cover/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div :class="isMobile ? 'm-cover' : 'cover'">
+    <template v-if="!isMobile">
+      <img class="cover__logo" draggable="false" src="./images/logo-min.png" />
+      <img class="cover__title" draggable="false" src="./images/title-min.png" />
+      <img
+        class="cover__btn"
+        draggable="false"
+        src="./images/btn-min.png"
+        @click="$router.push({ name: 'home' })"
+      />
+    </template>
+
+    <template v-else>
+      <img class="m-cover__logo" draggable="false" src="./images/logo-min.png" />
+      <img class="m-cover__title" draggable="false" src="./images/title-min.png" />
+      <img class="m-cover__copyright" draggable="false" src="./images/copyright-min.png" />
+      <img
+        class="m-cover__btn"
+        draggable="false"
+        src="./images/btn-min.png"
+        @click="$router.push({ name: 'home' })"
+      />
+    </template>
+  </div>
+</template>
+
+<script setup>
+  import { judgeIsMobile } from '@/utils';
+
+  const isMobile = judgeIsMobile();
+</script>
+
+<style lang="scss" scoped>
+  @use './index.scss';
+</style>

二进制
src/index/views/home/components/hot-spot-list/images/bg-min.jpg


二进制
src/index/views/home/components/hot-spot-list/images/close.png


二进制
src/index/views/home/components/hot-spot-list/images/m-bg-min.jpg


+ 152 - 0
src/index/views/home/components/hot-spot-list/index.hzrm.scss

@@ -0,0 +1,152 @@
+#hotListWrap {
+  position: absolute;
+  top: 0;
+  right: -400px;
+  width: 368px;
+  max-width: 368px;
+  height: 100%;
+  color: #e6aa4a;
+  transition: right 0.4s, width 0.5s;
+  background: url('./images/bg-min.jpg') no-repeat center bottom / cover;
+  z-index: var(--z-index-popper);
+}
+
+.hotListContainer {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+}
+
+.hotListActive {
+  right: 0 !important;
+}
+
+#hotListTitle {
+  margin: 60px 0 10px;
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 36px;
+  letter-spacing: 3px;
+  font-family: 'Source Han Sans CN-Bold';
+}
+
+#hotListContent {
+  width: 100%;
+  flex-grow: 1;
+  height: 100%;
+  overflow-y: scroll;
+  overflow-x: hidden;
+}
+
+#hotListBottom {
+  position: relative;
+  margin: 20px 0 57px;
+  text-align: center;
+}
+
+#hotListClose {
+  width: 40px;
+  height: 40px;
+  cursor: pointer;
+}
+
+#hotListContent ul {
+  font-size: 24px;
+  letter-spacing: 3px;
+}
+
+#hotListContent ul li {
+  height: 60px;
+  line-height: 60px;
+  text-align: center;
+  padding: 0 25px;
+  text-align: center;
+  transition: color 0.3s, background 0.6s;
+  border-radius: 10px;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  cursor: pointer;
+}
+
+#hotListContent ul li:hover {
+  color: white;
+}
+
+#hotListContent ul li.active {
+  color: var(--el-color-primary);
+}
+
+#hotListIcon {
+  width: 34px;
+  margin-left: 48px;
+}
+
+#hotListContent::-webkit-scrollbar {
+  width: 6px;
+}
+
+#hotListContent::-webkit-scrollbar-thumb {
+  border-radius: 10px;
+  background-color: #979cab;
+}
+
+#hotListContent::-webkit-scrollbar-track {
+  border-radius: 10px;
+}
+
+@media only screen and (max-width: 910px) {
+  #hotListWrap {
+    top: -120%;
+    right: 0;
+    width: 100%;
+    max-width: 100%;
+    transition: top 0.4s, width 0.5s;
+    background: rgba(34, 36, 37, 0.9);
+  }
+  .hotListContainer {
+    position: relative;
+    top: 20px;
+    left: 20px;
+    width: calc(100% - 40px);
+    height: calc(100% - 40px);
+    background: url('./images/m-bg-min.jpg') no-repeat center bottom / cover;
+  }
+  .hotListActive {
+    top: 0 !important;
+  }
+
+  #hotListTitle {
+    margin: 60px 0 15px;
+    font-size: 26px;
+  }
+  #hotListIcon {
+    width: 24px;
+    margin-left: 26px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(165%, -50%);
+  }
+  #hotListContent ul li {
+    text-align: center;
+    height: 50px;
+    line-height: 50px;
+  }
+  #hotListContent ul {
+    font-size: 18px;
+  }
+  #hotListBottom {
+    margin: 50px 0;
+  }
+  #hotListClose {
+    width: 20px;
+    height: 20px;
+  }
+  #hotListContent ul li.active {
+    color: white;
+    background: none;
+  }
+}

+ 26 - 0
src/index/views/home/components/hot-spot-list/index.hzrm.tsx

@@ -0,0 +1,26 @@
+import { defineComponent } from 'vue';
+import CloseIcon from './images/close.png';
+import './index.hzrm.scss';
+
+export default defineComponent({
+  name: 'HomeHotSpotList',
+  render() {
+    return (
+      <div id="hotListWrap">
+        <div class="hotListContainer">
+          <div id="hotListTitle">
+            <div>
+              <span id="hotListText">热点列表</span>
+            </div>
+          </div>
+          <div id="hotListContent">
+            <ul></ul>
+          </div>
+          <div id="hotListBottom">
+            <img id="hotListClose" src={CloseIcon} alt="" />
+          </div>
+        </div>
+      </div>
+    );
+  },
+});

+ 144 - 0
src/index/views/home/components/menu/index.hzrm.scss

@@ -0,0 +1,144 @@
+.pinBottom-container {
+  position: absolute;
+  left: 50%;
+  bottom: 15px;
+  display: flex;
+  align-items: center;
+  padding: 20px 20px 0;
+  height: 90px;
+  transition: all 0.5s;
+  transform: translateX(-50%);
+  font-family: 'SourceHanSerifCN-Medium';
+  background: url('/images/hzrm/menu-bg.png') repeat top left / cover;
+  z-index: var(--z-index-top);
+
+  &__logo {
+    margin-right: 15px;
+    width: 127px;
+    height: 31px;
+  }
+  &.open {
+    bottom: 145px;
+
+    &.playing {
+      bottom: 165px;
+    }
+    &.noScroll {
+      bottom: 125px;
+
+      &.playing {
+        bottom: 145px;
+      }
+    }
+  }
+  &.playing:not(.open) {
+    bottom: 35px;
+  }
+}
+
+.pinBottom {
+  display: flex;
+  align-items: center;
+  flex-wrap: nowrap;
+  line-height: 1;
+  transition: all 0.5s;
+  white-space: nowrap;
+
+  &.left {
+    &::after {
+      content: '';
+      margin: 0 16px;
+      width: 1px;
+      height: 38px;
+      background: #d3aa68;
+    }
+  }
+  > div {
+    float: left;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin: 0 20px;
+    color: #e2ba55;
+    cursor: pointer;
+
+    &.active,
+    &:hover,
+    &.opened {
+      color: var(--el-color-primary);
+    }
+    img,
+    .icon {
+      margin-bottom: 5px;
+      width: 48px;
+      height: 41px;
+    }
+  }
+}
+
+#thumb {
+  .icon-slot {
+    transition: background ease-in 0.2s;
+    background: url('/images/hzrm/unlike.png') no-repeat center / contain;
+  }
+
+  &.active .icon-slot {
+    background-image: url('/images/hzrm/like.png');
+  }
+}
+
+@media only screen and (max-width: 600px) {
+  .pinBottom-container {
+    bottom: 0;
+    padding: 0 10px;
+    align-items: flex-end;
+    justify-content: space-between;
+    width: 100%;
+    height: 0;
+    background: none;
+
+    &__logo {
+      display: none;
+    }
+    &.open {
+      bottom: 100px;
+
+      &.noScroll {
+        bottom: 90px;
+
+        &.playing {
+          bottom: 110px;
+        }
+      }
+    }
+    &.playing:not(.open) {
+      bottom: 20px;
+    }
+  }
+  .pinBottom {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 20px 0;
+    width: 50px;
+    border-radius: 40px;
+    background: rgba($color: #000000, $alpha: 0.58);
+
+    &.left {
+      &::after {
+        display: none;
+      }
+    }
+    > div {
+      margin: 10px 0;
+      font-size: 10px;
+
+      img,
+      .icon {
+        width: 24px;
+        height: 21px;
+      }
+    }
+  }
+}

+ 172 - 0
src/index/views/home/components/menu/index.hzrm.tsx

@@ -0,0 +1,172 @@
+import { defineComponent, onMounted, ref } from 'vue';
+import SharePopup from '../share-popup/index.vue';
+import { homeApi } from '@/api';
+import './index.hzrm.scss';
+
+export default defineComponent({
+  name: 'HomeMenu',
+  setup() {
+    const shareVisible = ref(false);
+    const animationThumb = ref(false);
+    const visitCount = ref(0);
+    const likeCount = ref(0);
+
+    const getSceneDetail = async () => {
+      const { data } = await homeApi.getSceneDetail(window.number);
+      if (!data) return;
+      visitCount.value = data.visitSum;
+      likeCount.value = data.starSum;
+    };
+
+    const handleThumb = () => {
+      if (animationThumb.value) return;
+
+      animationThumb.value = true;
+      likeCount.value++;
+      homeApi.saveStar(window.number);
+
+      setTimeout(() => {
+        animationThumb.value = false;
+      }, 200);
+    };
+
+    onMounted(() => {
+      getSceneDetail();
+
+      homeApi.saveSceneVisit(window.number);
+    });
+
+    return {
+      shareVisible,
+      animationThumb,
+      visitCount,
+      likeCount,
+      handleThumb,
+    };
+  },
+  render() {
+    return (
+      <div class="pinBottom-container">
+        <img class="pinBottom-container__logo" src="images/hzrm/logo.png" />
+
+        <div class="pinBottom left">
+          <div id="previous" class="previous desktop-only ui-icon" style="display: none;">
+            <a>
+              <img src="images/hzrm/play.png" width="24" height="24" data-original-title="播放" />
+            </a>
+          </div>
+          <div id="play" class="ui-icon" data-original-title="播放">
+            <a>
+              <img src="images/hzrm/play.png" width="24" height="24" />
+            </a>
+            <span>自动漫游</span>
+          </div>
+          <div id="pause" class="ui-icon" style="display: none;">
+            <a>
+              <img title="暂停" src="images/hzrm/pause.png" width="24" height="24" />
+            </a>
+            <span>自动漫游</span>
+          </div>
+          <div id="next" class="next desktop-only ui-icon wide" style="display: none;">
+            <a>
+              <i title="" class="icon icon-dpad-right" data-original-title="下一个"></i>
+            </a>
+          </div>
+          <div data-original-title="场景导览" id="pullTab" title="">
+            <img
+              class="icon icon-inside"
+              src="images/hzrm/auto.png"
+              title="场景导览"
+              data-default-url="images/hzrm/auto.png"
+              data-active-url="images/hzrm/auto-suspend.png"
+            />
+            <span>场景导览</span>
+          </div>
+          <div data-original-title="热点列表" id="hotList" title="" style="display: none">
+            <img class="icon icon-inside" src="images/hzrm/hotlist.png" title="热点列表" />
+            <span>热点列表</span>
+          </div>
+          <div data-original-title="全景漫游" id="gui-modes-inside" title="" class="">
+            <img class="icon icon-inside" src="images/hzrm/inside.png" title="全景漫游" />
+            <span>全景漫游</span>
+          </div>
+          <div data-original-title="迷你模型" id="gui-modes-dollhouse" title="" class="">
+            <img class="icon icon-inside" src="images/hzrm/dollhouse.png" title="迷你模型" />
+            <span>迷你模型</span>
+          </div>
+          <div data-original-title="俯视图" id="gui-modes-floorplan" title="">
+            <img class="icon icon-inside" src="images/hzrm/floor.png" title="俯视图" />
+            <span>俯视图</span>
+          </div>
+          <div data-original-title="VR" id="vr" title="" style="display: none;">
+            <img class="icon icon-inside" src="images/VR.png" title="VR" />
+          </div>
+          <div
+            data-original-title="消除外壳"
+            id="gui-remove-face"
+            title=""
+            style="display: none; float: left;"
+          >
+            <img class="icon icon-inside" src="images/hzrm/face.jpg" />
+          </div>
+        </div>
+        <div class="pinBottom right">
+          <div id="thumb" class={{ active: this.animationThumb }} onClick={this.handleThumb}>
+            <div class="icon icon-slot" />
+            <span>{this.likeCount > 0 ? `${this.likeCount} ` : ''}点赞</span>
+          </div>
+          <div id="sharing" onClick={() => (this.shareVisible = true)}>
+            <img class="icon icon-inside" src="images/hzrm/share.png" title="分享" />
+            <span>分享</span>
+          </div>
+          <div id="volume" class="ui-icon wide" style="display: none">
+            <a>
+              <img
+                src="images/hzrm/Volume btn_on.png"
+                width="24"
+                height="24"
+                data-default-url="images/hzrm/Volume btn_on.png"
+                data-active-url="images/hzrm/Volume btn_off.png"
+              />
+            </a>
+            <span>音乐</span>
+          </div>
+          <div id="vr" class="ui-icon wide hidden">
+            <a>
+              <i title="{[{ VIEW_IN_VR }]}" class="icon icon-webvr"></i>
+            </a>
+          </div>
+          <div id="viewer" class="ui-icon wide">
+            <img class="icon icon-inside" src="images/hzrm/viewer.png" title="浏览量" />
+            <p>{this.visitCount}</p>
+          </div>
+          <div
+            id="gui-fullscreen"
+            class="ui-icon wide"
+            data-placement="top"
+            title="{[{ VIEW_FULLSCREEN }]}"
+          >
+            <a>
+              <img class="icon icon-fullscreen" src="images/hzrm/enlarge_on.png" />
+            </a>
+            <span>全屏</span>
+          </div>
+          <div
+            id="gui-fullscreen-exit"
+            class="ui-icon wide"
+            data-placement="top"
+            title="{[{ EXIT_FULLSCREEN }]}"
+            style="display: none;"
+          >
+            <a>
+              <img class="icon icon-fullscreen-exit" src="images/hzrm/narrow_off.png" />
+            </a>
+            <span>全屏</span>
+          </div>
+        </div>
+
+        <SharePopup visible={this.shareVisible} onUpdate:visible={(v) => (this.shareVisible = v)} />
+      </div>
+    );
+  },
+});

+ 47 - 0
src/index/views/home/components/popup/index.hzrm.scss

@@ -0,0 +1,47 @@
+#popup {
+  display: none;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.8);
+  z-index: var(--z-hot-popper);
+
+  &.wait {
+    opacity: 0.1;
+  }
+}
+#id1 {
+  width: 100%;
+  height: 100%;
+}
+.popup-content {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+}
+#closepop {
+  position: absolute;
+  top: 46px;
+  right: 96px;
+  width: 40px;
+  height: 40px;
+  cursor: pointer;
+  text-indent: -999em;
+  background: url('../hot-spot-list/images/close.png') no-repeat center / contain;
+}
+
+@media only screen and (max-width: 600px) {
+  #closepop {
+    width: 20px;
+    height: 20px;
+    top: unset;
+    left: 50%;
+    right: unset;
+    bottom: 50px;
+    transform: translateX(-50%);
+    z-index: 9;
+  }
+}

+ 16 - 0
src/index/views/home/components/popup/index.hzrm.tsx

@@ -0,0 +1,16 @@
+import { defineComponent } from 'vue';
+import './index.hzrm.scss';
+
+export default defineComponent({
+  name: 'HomePopup',
+  render() {
+    return (
+      <div id="popup">
+        <div class="popup-wrap">
+          <div class="popup-content"></div>
+          <div id="closepop">close</div>
+        </div>
+      </div>
+    );
+  },
+});

二进制
src/index/views/home/components/unit-popup/images/bg-min.jpg


二进制
src/index/views/home/components/unit-popup/images/bg2-min.png


二进制
src/index/views/home/components/unit-popup/images/icon-l.png


二进制
src/index/views/home/components/unit-popup/images/icon-r.png


文件差异内容过多而无法显示
+ 225 - 0
src/index/views/home/components/unit-popup/index.vue


+ 118 - 0
src/index/views/home/index.hzrm.tsx

@@ -0,0 +1,118 @@
+import { defineComponent, ref } from 'vue';
+import JsScript from '@/components/js-script';
+import Title from './components/title';
+import WebVr from './components/web-vr';
+import Other from './components/other';
+import Guide from './components/guide';
+import Vrcon from './components/vrcon';
+import Menu from './components/menu';
+import GuiLoading from './components/gui-loading';
+import Popup from './components/popup';
+import HotSpotList from './components/hot-spot-list';
+import UnitPopup from './components/unit-popup/index.vue';
+import ExpandIcon from '@/assets/images/expand.png';
+import './index.scss';
+
+// 自定义热点图标
+// @ts-ignore
+// window.hoticon = {
+//   default: '/images/point.png',
+//   higt: '/images/point2.png',
+// };
+
+export default defineComponent({
+  name: 'home',
+  components: {
+    Title,
+    WebVr,
+    Other,
+    Vrcon,
+    GuiLoading,
+    JsScript,
+    Popup,
+  },
+  setup() {
+    const manageJsLoaded = ref(false);
+    const hotJsLoaded = ref(false);
+    const unitVisible = ref(false);
+
+    return {
+      unitVisible,
+      manageJsLoaded,
+      hotJsLoaded,
+    };
+  },
+  render() {
+    return (
+      <div class="home">
+        <img
+          src={ExpandIcon}
+          draggable="false"
+          style={{ position: 'absolute', top: '151px', right: '4px', cursor: 'pointer', zIndex: 9 }}
+          onClick={() => (this.unitVisible = true)}
+        />
+
+        {/* 进度条加载 */}
+        <GuiLoading />
+
+        {/* 加载初始页面 */}
+        <div id="gui-thumb" />
+
+        {/* 热点弹出框 */}
+        <Popup />
+
+        {/* 场景canvs主容器 */}
+        <div id="player" />
+
+        {/* 底部菜单 */}
+        <div id="gui-parent">
+          {/* 热点气泡 */}
+          <div id="hot" />
+
+          <div id="gui" style="display: none;">
+            {/* 标题 */}
+            <Title />
+
+            {/* 热点列表 */}
+            <HotSpotList />
+
+            {/* 底部菜单 */}
+            <Menu />
+
+            {/* 导览 */}
+            <Guide />
+
+            {/* <div class="home_logo">
+              <img src="images/btm_logo.png" />
+              <span>提供技术支持</span>
+            </div> */}
+          </div>
+
+          <WebVr />
+          <Vrcon />
+          <Other />
+        </div>
+
+        {/* TODO: 没有控制权,耦合严重;放在此处为了防止元素未渲染导致报错 */}
+        <JsScript src="./js/manage.js" onLoad={() => (this.manageJsLoaded = true)} />
+        {this.manageJsLoaded && (
+          <div>
+            <JsScript src="./js/Hot.js" onLoad={() => (this.hotJsLoaded = true)} />
+            {this.hotJsLoaded && (
+              <div>
+                <JsScript src="./js/main_2020_show.js" />
+                {/* 延迟加载 */}
+                <JsScript src="./js/lib/player-0.0.12.min.js" />
+                <JsScript src="./js/lib/Tween.js" />
+                <JsScript src="./js/SpecialScene.js" />
+                <JsScript src="./js/loadCAD.js" />
+              </div>
+            )}
+          </div>
+        )}
+
+        <UnitPopup visible={this.unitVisible} onUpdate:visible={(v) => (this.unitVisible = v)} />
+      </div>
+    );
+  },
+});

+ 6 - 2
src/index/views/home/index.scss

@@ -1,6 +1,10 @@
 .home {
-  width: 100%;
-  height: 100%;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  overflow: hidden;
 
   &_logo {
     display: flex;