aamin 2 лет назад
Родитель
Сommit
02948270ad
49 измененных файлов с 36622 добавлено и 40 удалено
  1. 3 0
      hot/.browserslistrc
  2. 17 0
      hot/.eslintrc.js
  3. 23 0
      hot/.gitignore
  4. 24 0
      hot/README.md
  5. 5 0
      hot/babel.config.js
  6. 26499 0
      hot/package-lock.json
  7. 32 0
      hot/package.json
  8. 16 0
      hot/public/index.html
  9. 39 0
      hot/src/App.vue
  10. 34 0
      hot/src/assets/base.css
  11. BIN
      hot/src/assets/bg.jpg
  12. BIN
      hot/src/assets/bgMo.jpg
  13. BIN
      hot/src/assets/fonts/SourceHanSerifCN-Bold.otf
  14. BIN
      hot/src/assets/fonts/SourceHanSerifCN-Medium.otf
  15. BIN
      hot/src/assets/fonts/SourceHanSerifCN-Regular.otf
  16. BIN
      hot/src/assets/images/IMGerror.png
  17. BIN
      hot/src/assets/images/loading.gif
  18. BIN
      hot/src/assets/images/pc/audio.png
  19. BIN
      hot/src/assets/images/pc/audioAc.png
  20. BIN
      hot/src/assets/images/pc/icon-left.png
  21. BIN
      hot/src/assets/images/pc/icon-right.png
  22. BIN
      hot/src/assets/images/pc/icon1.png
  23. BIN
      hot/src/assets/images/pc/icon1Ac.png
  24. BIN
      hot/src/assets/images/pc/icon2.png
  25. BIN
      hot/src/assets/images/pc/icon2Ac.png
  26. BIN
      hot/src/assets/images/pc/icon3.png
  27. BIN
      hot/src/assets/images/pc/icon3Ac.png
  28. BIN
      hot/src/assets/images/pc/left.png
  29. BIN
      hot/src/assets/images/pc/leftMo.png
  30. BIN
      hot/src/assets/images/pc/right.png
  31. BIN
      hot/src/assets/images/pc/rightMo.png
  32. BIN
      hot/src/assets/logo.png
  33. 59 0
      hot/src/components/HelloWorld.vue
  34. 23 0
      hot/src/main.js
  35. 27 0
      hot/src/router/index.js
  36. 29 0
      hot/src/utils/browser.js
  37. 0 0
      hot/src/utils/http.js
  38. 5 0
      hot/src/views/About.vue
  39. 712 0
      hot/src/views/Home.vue
  40. 3 0
      hot/vue.config.js
  41. 9046 0
      hot/yarn.lock
  42. 4 0
      zhengquan/src/App.vue
  43. 7 0
      zhengquan/src/images.d.ts
  44. 1 0
      zhengquan/src/utils/browser.ts
  45. 0 28
      zhengquan/src/utils/loadScript.ts
  46. 10 9
      zhengquan/src/views/Home/components/sceneListInfo.vue
  47. 1 1
      zhengquan/src/views/Home/components/unitList.vue
  48. 3 1
      zhengquan/src/views/Scene/ScenePage.vue
  49. 0 1
      zhengquan/tsconfig.json

+ 3 - 0
hot/.browserslistrc

@@ -0,0 +1,3 @@
+> 1%
+last 2 versions
+not dead

+ 17 - 0
hot/.eslintrc.js

@@ -0,0 +1,17 @@
+module.exports = {
+  root: true,
+  env: {
+    node: true
+  },
+  'extends': [
+    'plugin:vue/essential',
+    'eslint:recommended'
+  ],
+  parserOptions: {
+    parser: 'babel-eslint'
+  },
+  rules: {
+    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
+  }
+}

+ 23 - 0
hot/.gitignore

@@ -0,0 +1,23 @@
+.DS_Store
+node_modules
+/dist
+
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 24 - 0
hot/README.md

@@ -0,0 +1,24 @@
+# hotspot
+
+## Project setup
+```
+npm install
+```
+
+### Compiles and hot-reloads for development
+```
+npm run serve
+```
+
+### Compiles and minifies for production
+```
+npm run build
+```
+
+### Lints and fixes files
+```
+npm run lint
+```
+
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).

+ 5 - 0
hot/babel.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  presets: [
+    '@vue/cli-plugin-babel/preset'
+  ]
+}

Разница между файлами не показана из-за своего большого размера
+ 26499 - 0
hot/package-lock.json


+ 32 - 0
hot/package.json

@@ -0,0 +1,32 @@
+{
+  "name": "hotspot",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "lint": "vue-cli-service lint"
+  },
+  "dependencies": {
+    "axios": "^0.20.0",
+    "core-js": "^3.6.5",
+    "swiper": "^5.4.5",
+    "v-viewer": "^1.5.1",
+    "vue": "^2.6.11",
+    "vue-awesome-swiper": "^4.1.1",
+    "vue-lazyload": "^1.3.3",
+    "vue-router": "^3.2.0"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "~4.5.0",
+    "@vue/cli-plugin-eslint": "~4.5.0",
+    "@vue/cli-plugin-router": "~4.5.0",
+    "@vue/cli-service": "~4.5.0",
+    "babel-eslint": "^10.1.0",
+    "eslint": "^6.7.2",
+    "eslint-plugin-vue": "^6.2.2",
+    "less": "^3.0.4",
+    "less-loader": "^5.0.0",
+    "vue-template-compiler": "^2.6.11"
+  }
+}

+ 16 - 0
hot/public/index.html

@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <title><%= htmlWebpackPlugin.options.title %></title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 39 - 0
hot/src/App.vue

@@ -0,0 +1,39 @@
+<template>
+  <div id="app">
+    <router-view />
+  </div>
+</template>
+
+<style lang="less">
+@font-face {
+  font-family: "SourceHanSerifCN-Medium";
+  src: url("./assets/fonts/SourceHanSerifCN-Medium.otf");
+}
+@font-face {
+  font-family: "SourceHanSerifCN-Regular";
+  src: url("./assets/fonts/SourceHanSerifCN-Regular.otf");
+}
+@font-face {
+  font-family: "SourceHanSerifCN-Bold";
+  src: url("./assets/fonts/SourceHanSerifCN-Bold.otf");
+}
+html,
+body {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  backdrop-filter: blur(30px);
+}
+* {
+  margin: 0;
+  padding: 0;
+}
+* {
+  font-family: "SourceHanSerifCN-Regular";
+}
+#app {
+  width: 100%;
+  height: 100%;
+  backdrop-filter: blur(30px);
+}
+</style>

+ 34 - 0
hot/src/assets/base.css

@@ -0,0 +1,34 @@
+* {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+}
+body{
+  user-select: none;
+}
+.viewer-title {
+  display: none !important;
+}
+
+.viewer-prev {
+  display: none !important;
+}
+
+.viewer-next {
+  display: none !important;
+}
+
+.viewer-navbar {
+  display: none !important;
+}
+
+.viewer-close {
+  display: none !important;
+}
+
+@media screen and (max-width: 800px) {
+  .viewer-footer {
+    bottom: auto;
+    bottom: 10px;
+  }
+}

BIN
hot/src/assets/bg.jpg


BIN
hot/src/assets/bgMo.jpg


BIN
hot/src/assets/fonts/SourceHanSerifCN-Bold.otf


BIN
hot/src/assets/fonts/SourceHanSerifCN-Medium.otf


BIN
hot/src/assets/fonts/SourceHanSerifCN-Regular.otf


BIN
hot/src/assets/images/IMGerror.png


BIN
hot/src/assets/images/loading.gif


BIN
hot/src/assets/images/pc/audio.png


BIN
hot/src/assets/images/pc/audioAc.png


BIN
hot/src/assets/images/pc/icon-left.png


BIN
hot/src/assets/images/pc/icon-right.png


BIN
hot/src/assets/images/pc/icon1.png


BIN
hot/src/assets/images/pc/icon1Ac.png


BIN
hot/src/assets/images/pc/icon2.png


BIN
hot/src/assets/images/pc/icon2Ac.png


BIN
hot/src/assets/images/pc/icon3.png


BIN
hot/src/assets/images/pc/icon3Ac.png


BIN
hot/src/assets/images/pc/left.png


BIN
hot/src/assets/images/pc/leftMo.png


BIN
hot/src/assets/images/pc/right.png


BIN
hot/src/assets/images/pc/rightMo.png


BIN
hot/src/assets/logo.png


+ 59 - 0
hot/src/components/HelloWorld.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="hello">
+    <h1>{{ msg }}</h1>
+    <p>
+      For a guide and recipes on how to configure / customize this project,<br>
+      check out the
+      <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
+    </p>
+    <h3>Installed CLI Plugins</h3>
+    <ul>
+      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
+      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
+      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
+    </ul>
+    <h3>Essential Links</h3>
+    <ul>
+      <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
+      <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
+      <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
+      <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
+      <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
+    </ul>
+    <h3>Ecosystem</h3>
+    <ul>
+      <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
+      <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
+      <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
+      <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
+      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
+    </ul>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'HelloWorld',
+  props: {
+    msg: String
+  }
+}
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped lang="less">
+h3 {
+  margin: 40px 0 0;
+}
+ul {
+  list-style-type: none;
+  padding: 0;
+}
+li {
+  display: inline-block;
+  margin: 0 10px;
+}
+a {
+  color: #42b983;
+}
+</style>

+ 23 - 0
hot/src/main.js

@@ -0,0 +1,23 @@
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+import axios from 'axios'
+import 'viewerjs/dist/viewer.css'
+import Viewer from 'v-viewer'
+// 图片懒加载
+import VueLazyLoad from 'vue-lazyload'
+Vue.use(VueLazyLoad, {
+  error: require('@/assets/images/IMGerror.png'),
+  loading: require('@/assets/images/loading.gif')
+})
+
+Vue.config.productionTip = false
+Vue.prototype.$http = axios
+
+Vue.use(Viewer)
+
+import './assets/base.css'
+new Vue({
+  router,
+  render: h => h(App)
+}).$mount('#app')

+ 27 - 0
hot/src/router/index.js

@@ -0,0 +1,27 @@
+import Vue from 'vue'
+import VueRouter from 'vue-router'
+import Home from '../views/Home.vue'
+
+Vue.use(VueRouter)
+
+const routes = [
+  {
+    path: '/',
+    name: 'Home',
+    component: Home
+  },
+  {
+    path: '/about',
+    name: 'About',
+    // route level code-splitting
+    // this generates a separate chunk (about.[hash].js) for this route
+    // which is lazy-loaded when the route is visited.
+    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
+  }
+]
+
+const router = new VueRouter({
+  routes
+})
+
+export default router

+ 29 - 0
hot/src/utils/browser.js

@@ -0,0 +1,29 @@
+function versions () {
+    var u = window.navigator.userAgent
+    return {
+      // IE内核
+      trident: u.indexOf('Trident') > -1,
+      // opera内核
+      presto: u.indexOf('Presto') > -1,
+      // 苹果、谷歌内核
+      webKit: u.indexOf('AppleWebKit') > -1,
+      // 火狐内核
+      gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') === -1,
+      // 是否为移动终端 / Tablets use desktop version
+      mobile: (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) && !(/Tablet|iPad/i.test(navigator.userAgent)),
+      // ios终端
+      ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
+      // android终端或者uc浏览器
+      android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
+      // 是否为iPhone或者安卓QQ浏览器
+      iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
+      // 是否为iPad
+      iPad: u.indexOf('iPad') > -1,
+      // 是否为web应用程序,没有头部与底部
+      webApp: u.indexOf('Safari') === -1,
+      // 是否为微信浏览器
+      weixin: ~u.indexOf('MicroMessenger')
+    }
+  }
+  
+  export default versions()

+ 0 - 0
hot/src/utils/http.js


+ 5 - 0
hot/src/views/About.vue

@@ -0,0 +1,5 @@
+<template>
+  <div class="about">
+    <h1>This is an about page</h1>
+  </div>
+</template>

+ 712 - 0
hot/src/views/Home.vue

@@ -0,0 +1,712 @@
+<template>
+  <div class="home">
+    <div class="main">
+      <div class="mainCon" v-show="!oneTxt">
+        <audio
+          id="myAudio"
+          v-if="audio"
+          v-show="isOneAduio"
+          :src="urlToFitFu(audio)"
+          controls
+        ></audio>
+        <!-- 音频图标 -->
+        <!-- <div
+          class="audioIcon"
+          v-if="audio && !isOneAduio"
+          @click="audioSta = !audioSta"
+          :title="audioSta ? '关闭音频' : '打开音频'"
+        >
+          <img
+            width="30px"
+            :src="
+              require(`@/assets/images/pc/audio${audioSta ? 'Ac' : ''}.png`)
+            "
+            alt=""
+          />
+        </div> -->
+
+        <!-- 如果只有一个模块 -->
+        <div
+          class="oneTabNum"
+          v-if="
+            flooTab.length === 1 &&
+              data[myType] &&
+              data[myType].length &&
+              data[myType].length > 1
+          "
+        >
+          {{ myInd + 1 }} / {{ data[myType].length }}
+        </div>
+
+        <!-- 主要内容 -->
+
+        <div class="contenBoxMain">
+          <div
+            class="contenBox"
+            :class="{ contenBoxAc: index === myInd }"
+            v-for="(item, index) in data[myType]"
+            :key="myType === 'video' ? item.url : item"
+          >
+            <!-- 模型页面 -->
+            <div class="modelBox" v-if="myType === 'model'">
+              <iframe
+                :src="urlToFitFu(item)"
+                frameborder="0"
+                v-if="index === myInd"
+              ></iframe>
+            </div>
+            <!-- 视频页面 -->
+            <div class="videoBox" v-else-if="myType === 'video'">
+              <video
+                controls
+                :src="urlToFitFu(item.url)"
+                v-if="index === myInd"
+              ></video>
+            </div>
+            <!-- 图片页面 -->
+            <div class="imgBox" v-else-if="myType === 'img'">
+              <div class="smImgBox" @click="lookImg(urlToFitFu(item))">
+                <img v-lazy="urlToFitFu(item)" alt="" />
+              </div>
+            </div>
+          </div>
+        </div>
+        <!-- 左右箭头 -->
+        <div
+          @click="cutMyInd(-1, myInd === 0)"
+          class="leftJJ awccJJ"
+          :class="{ noClick: myInd === 0 }"
+          v-if="data[myType] && data[myType].length > 1"
+        >
+          <img
+            v-show="screenWidth > 900"
+            class="iconimg"
+            src="../assets/images/pc/left.png"
+            alt=""
+          />
+          <img
+            v-show="screenWidth < 900"
+            class="iconimg"
+            src="../assets/images/pc/leftMo.png"
+            alt=""
+          />
+        </div>
+        <div
+          @click="cutMyInd(1, myInd === data[myType].length - 1)"
+          class="rightJJ awccJJ"
+          :class="{ noClick: myInd === data[myType].length - 1 }"
+          v-if="data[myType] && data[myType].length > 1"
+        >
+          <img
+            v-show="screenWidth > 900"
+            class="iconimg"
+            src="../assets/images/pc/right.png"
+            alt=""
+          />
+          <img
+            v-show="screenWidth < 900"
+            class="iconimg"
+            src="../assets/images/pc/rightMo.png"
+            alt=""
+          />
+        </div>
+      </div>
+
+      <!-- 底部的tab -->
+      <div class="flooTabBox" v-if="flooTab.length > 1">
+        <div
+          @click="myType = item.type"
+          class="tabRow"
+          :class="{ tabRowAc: myType === item.type }"
+          v-for="item in flooTab"
+          :key="item.id"
+        >
+          <img
+            :src="
+              require(`@/assets/images/pc/icon${item.id}${
+                myType === item.type ? 'Ac' : ''
+              }.png`)
+            "
+            alt=""
+          />
+          {{ item.name }}
+          <span
+            v-if="
+              data[item.type] &&
+                data[item.type].length &&
+                data[item.type].length > 1
+            "
+            >{{ item.type === myType ? myInd + 1 + "/" : null
+            }}{{ data[item.type].length }}</span
+          >
+        </div>
+      </div>
+
+      <!-- 下面的文字介绍 -->
+      <div class="flooTxt" :class="{ flooTxtOne: oneTxt }">
+        <div class="flooTxtBox">
+          <div class="myTitle">{{ myTitle }}</div>
+          <!-- 视频的介绍 -->
+          <div class="myTxt" v-if="myType === 'video' && videoTxt[myInd]">
+            {{ videoTxt[myInd] }}
+          </div>
+          <div class="myTxt" v-if="myType === 'img' && imgTxt[myInd]">
+            {{ imgTxt[myInd] }}
+          </div>
+          <div class="myTxt" v-html="myTxt"></div>
+        </div>
+      </div>
+    </div>
+    <!-- 查看图片 -->
+    <viewer class="viewerCla" ref="viewer" :images="lookPics">
+      <img :src="lookPics[0]" alt="" />
+    </viewer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Home",
+  data() {
+    return {
+      m: this.$route.query.m,
+      id: this.$route.query.id,
+      // 音频地址
+      audio: "",
+      // 如果只有单独的音频
+      isOneAduio: false,
+      // 音频状态
+      audioSta: false,
+
+      data: {
+        // 模型数组
+        model: [],
+        // 视频数组
+        video: [],
+        // 图片数组
+        img: [],
+      },
+      // 当前 type
+      myType: "",
+
+      // 底部的tab
+      flooTab: [],
+
+      // 当前索引
+      myInd: 0,
+
+      // 查看图片
+      lookPics: [],
+
+      // 标题
+      myTitle: "",
+      // 内容
+      myTxt: "",
+      // 视频内容
+      videoTxt: [],
+      imgTxt: [],
+
+      // 只有标题和文字(没有视频,没有模型,没有图片)
+      oneTxt: false,
+      screenWidth: 0,
+    };
+  },
+  watch: {
+    myType() {
+      this.myInd = 0;
+    },
+    // 音频的开启和关闭
+    audioSta(val) {
+      const dom = document.querySelector("#myAudio");
+      if (val) {
+        dom.play();
+        dom.onended = () => {
+          // console.log("----音频播放完毕");
+          this.audioSta = false;
+        };
+      } else dom.pause();
+    },
+  },
+  computed: {},
+  components: {},
+  methods: {
+    // 本地化 url 适配
+    urlToFitFu(url) {
+      console.log("返回", url);
+      return url;
+      // const resUrl = url;
+      // if (url.includes("https://super.4dage.com")) {
+      //   return url.replace("https://super.4dage.com", "");
+      // } else if (url.includes("http://super.4dage.com")) {
+      //   return url.replace("http://super.4dage.com", "");
+      // } else return resUrl;
+    },
+
+    // 点击左右箭头
+    cutMyInd(num, flag) {
+      if (flag) {
+        return;
+      }
+      this.myInd += num;
+    },
+    // 点击查看大图
+    lookImg(url) {
+      let dom = this.$refs.viewer.$viewer;
+      this.lookPics = [url];
+      dom.show();
+    },
+    async getData() {
+      // https://www.4dmodel.com/
+
+      let url = `https://super.4dage.com/data/${
+        // 线上数据
+
+        // let url = `/data/${
+        //本地化部署
+        this.id
+      }/hot/js/data.js?time=${Math.random()}`;
+      let result = (await this.$http.get(url)).data;
+      const resData = result[this.m];
+      // console.log("----", resData);
+      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.model) {
+          obj.model = resData.model;
+          arr.push({ id: 1, type: "model", name: "模型" });
+        }
+        if (resData.video) {
+          obj.video = resData.video;
+          arr.push({ id: 2, type: "video", name: "视频" });
+        }
+        if (resData.images) {
+          obj.img = resData.images;
+          arr.push({ id: 3, type: "img", name: "图片" });
+        }
+        this.flooTab = arr;
+        this.data = obj;
+        console.log("data", this.data);
+
+        // 当前type的值 应该为
+        if (resData.model) this.myType = "model";
+        else if (resData.video) this.myType = "video";
+        else if (resData.images) this.myType = "img";
+
+        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;
+        }
+      }
+    },
+  },
+  mounted() {
+    this.getData();
+    this.screenWidth = document.documentElement.clientWidth;
+    window.onresize = () => {
+      this.screenWidth = document.documentElement.clientWidth;
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.home {
+  .viewerCla img {
+    display: none;
+  }
+  width: 100%;
+  height: 100%;
+  background: url("../assets/bg.jpg");
+  backdrop-filter: blur(30px) !important;
+  position: relative;
+  #myAudio {
+    z-index: 11;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    width: 500px;
+    height: 60px;
+    backdrop-filter: blur(30px) !important;
+  }
+  .main {
+    width: 100%;
+    margin: 0 auto;
+    height: 100%;
+    // padding-top: 40px;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    .mainCon {
+      position: relative;
+      border-radius: 6px;
+      overflow: hidden;
+      width: 100%;
+      height: 70%;
+      display: flex;
+      justify-content: center;
+      .audioIcon {
+        z-index: 10;
+        cursor: pointer;
+        position: absolute;
+        right: 20px;
+        bottom: 30px;
+      }
+      .oneTabNum {
+        z-index: 10;
+        position: absolute;
+        bottom: 30px;
+        left: 50%;
+        transform: translateX(-50%);
+        font-size: 14px;
+      }
+      .contenBoxMain {
+        position: relative;
+        width: 80%;
+        height: 100%;
+      }
+      .contenBox {
+        width: 100%;
+        height: 100%;
+        position: absolute;
+        top: 0;
+        left: 0;
+        opacity: 0;
+        pointer-events: none;
+        transition: all 0.5s;
+
+        .modelBox,
+        .videoBox,
+        .imgBox {
+          width: 100%;
+          height: 100%;
+        }
+        .modelBox {
+          iframe {
+            width: 100%;
+            height: 100%;
+          }
+        }
+        .videoBox {
+          // padding: 100px 100px 120px;
+          video {
+            width: 100%;
+            height: 100%;
+          }
+        }
+        .imgBox {
+          // padding: 100px 100px 120px;
+          .smImgBox {
+            width: 100%;
+            height: 100%;
+            cursor: zoom-in;
+            & > img {
+              pointer-events: none;
+              width: 100%;
+              height: 100%;
+              object-fit: contain;
+            }
+          }
+        }
+      }
+      .contenBoxAc {
+        opacity: 1;
+        pointer-events: auto;
+      }
+      .awccJJ {
+        cursor: pointer;
+        position: absolute;
+        top: 50%;
+        transform: translateY(-50%);
+        left: 10px;
+        width: 40px;
+        height: 40px;
+        background-image: url("../assets/images/pc/left.png");
+        background-size: 100% 100%;
+        .iconimg {
+          display: none;
+        }
+        &:focus {
+          outline: none;
+        }
+      }
+      .rightJJ {
+        left: auto;
+        right: 10px;
+        background-image: url("../assets/images/pc/right.png");
+      }
+      .noClick {
+        cursor: default;
+        opacity: 0.4;
+      }
+    }
+
+    .flooTabBox {
+      z-index: 10;
+      // position: absolute;
+      // bottom: 23%;
+      // left: 50%;
+      // transform: translateX(-50%);
+      display: flex;
+      justify-content: center;
+      margin-top: 20px;
+      .tabRow {
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+        margin: 0 12px;
+        font-size: 14px;
+        background: linear-gradient(#070c2b, #162162);
+        padding: 0px 14px;
+        height: 30px;
+        border-radius: 18px;
+        color: #17c7fc;
+        & > img {
+          margin-right: 6px;
+          width: 20px;
+        }
+      }
+      .tabRowAc {
+        background: linear-gradient(
+          #0175c2,
+          #0481cb,
+          #10a9e7,
+          #16c2f9,
+          #19cbff
+        );
+        pointer-events: none;
+        font-weight: 400;
+        color: #ffffff;
+      }
+    }
+    .flooTxt {
+      margin-top: 20px;
+      width: 100%;
+      // height: 160px;
+      .flooTxtBox {
+        width: 100%;
+        height: 100%;
+        overflow-y: auto;
+        text-align: center;
+        .myTitle {
+          color: #ffffff;
+          font-size: 22px;
+          font-weight: 700;
+          margin-bottom: 10px;
+          // text-align: center;
+          // font-family: "SourceHanSerifCN-Bold";
+        }
+        .myTxt {
+          // font-size: 16px;
+          // color: #ffffff;
+          // line-height: 24px;
+          // text-indent: 2em;
+          font-size: 16px;
+          color: #fff;
+          line-height: 24px;
+          text-indent: 2em;
+          max-height: 10vh;
+          width: 90%;
+          margin: auto;
+          overflow: auto;
+          &::-webkit-scrollbar {
+            /*滚动条整体样式*/
+            width: 3px; /*高宽分别对应横竖滚动条的尺寸*/
+            height: 1px;
+          }
+          &::-webkit-scrollbar-thumb {
+            /*滚动条里面小方块*/
+            border-radius: 10px;
+            -webkit-box-shadow: inset 0 0 5px transparent;
+            background: #19cbff;
+          }
+          &::-webkit-scrollbar-track {
+            /*滚动条里面轨道*/
+            -webkit-box-shadow: inset 0 0 5px transparent;
+            border-radius: 10px;
+            background: transparent;
+          }
+        }
+        &::-webkit-scrollbar {
+          /*滚动条整体样式*/
+          width: 3px; /*高宽分别对应横竖滚动条的尺寸*/
+          height: 1px;
+        }
+        &::-webkit-scrollbar-thumb {
+          /*滚动条里面小方块*/
+          border-radius: 10px;
+          -webkit-box-shadow: inset 0 0 5px transparent;
+          background: #19cbff;
+        }
+        &::-webkit-scrollbar-track {
+          /*滚动条里面轨道*/
+          -webkit-box-shadow: inset 0 0 5px transparent;
+          border-radius: 10px;
+          background: transparent;
+        }
+      }
+    }
+    .flooTxtOne {
+      height: 600px;
+    }
+  }
+}
+// 移动端
+@media screen and (max-width: 1000px) {
+  ::-webkit-scrollbar-thumb {
+    background: #19cbff;
+    border-radius: 50px;
+  }
+  ::-webkit-scrollbar {
+    width: 4px;
+    height: 4px;
+  }
+  .home {
+    background: url("../assets/bgMo.jpg");
+    backdrop-filter: blur(30px);
+    #myAudio {
+      width: 90vw;
+      max-width: 500px;
+    }
+    .main {
+      width: 100%;
+      height: 100%;
+      padding: 0;
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+      justify-content: space-between;
+
+      .mainCon {
+        flex: 0 0 auto;
+        border-radius: 0 0 0 0;
+        margin-top: 30%;
+        height: 35%;
+        .audioIcon {
+          cursor: default;
+          right: auto;
+          bottom: auto;
+          top: 6px;
+          left: 6px;
+          img {
+            width: 30px;
+          }
+        }
+
+        .contenBoxMain {
+          width: 100%;
+          height: 100%;
+        }
+
+        .contenBox {
+          .videoBox {
+            padding: 0px 0;
+            position: relative;
+            video {
+              width: 100%;
+              max-height: 100%;
+              height: auto;
+              position: absolute;
+              top: 50%;
+              transform: translateY(-50%);
+              background-color: black;
+            }
+          }
+          .imgBox {
+            // padding: 60px 50px 80px;
+            .smImgBox {
+              cursor: default;
+            }
+          }
+        }
+        .awccJJ {
+          left: 0px;
+          width: 5%;
+          height: 100%;
+          display: flex;
+          justify-content: left;
+          align-items: center;
+
+          // height: px;
+          cursor: default;
+          background-image: none;
+          // background-size: 50% 50%;
+          .iconimg {
+            display: block;
+            width: 100%;
+          }
+        }
+        .rightJJ {
+          left: auto;
+          // right: 15px;
+          right: 0px;
+          background-image: none;
+          justify-content: right;
+        }
+      }
+      .flooTabBox {
+        width: 100%;
+        bottom: 20px;
+        justify-content: center;
+        margin-top: 15px;
+        .tabRow {
+          cursor: default;
+          margin: 0 6px;
+          padding: 0 10px;
+          height: 25px;
+          font-size: 14px;
+          & > img {
+            width: 16px;
+          }
+        }
+      }
+      .flooTxt {
+        flex: 1 0 1px;
+        max-height: 300px;
+        min-height: 180px;
+        left: 0;
+        bottom: 0;
+        padding: 30px;
+        box-sizing: border-box;
+        background: linear-gradient(180deg, #070c2b 0%, #162162 100%);
+        border-radius: 40px 40px 0 0;
+        margin-top: 30px;
+        overflow: initial;
+        .flooTxtBox {
+          overflow-y: hidden;
+          .myTitle {
+            font-size: 18px;
+          }
+          .myTxt {
+            font-size: 14px;
+            line-height: 22px;
+            height: calc(100% - 36px);
+            max-height: initial;
+            overflow: auto;
+          }
+        }
+      }
+      .flooTxtOne {
+        height: 100%;
+      }
+    }
+  }
+}
+</style>

+ 3 - 0
hot/vue.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  publicPath: "./"
+};

Разница между файлами не показана из-за своего большого размера
+ 9046 - 0
hot/yarn.lock


+ 4 - 0
zhengquan/src/App.vue

@@ -13,7 +13,9 @@ onMounted(() => {
   window.addEventListener(
     "resize",
     () => {
+      //@ts-ignore
       clearTimeout(time.current);
+      //@ts-ignore
       time.current = window.setTimeout(() => {
         // 根元素
         const dom: HTMLDivElement | null = document.querySelector("#app");
@@ -36,10 +38,12 @@ onMounted(() => {
   font-family: 'AlibabaPuHuiTi2.0-105Heavy';
   src: url('./assets/fonts/AlibabaPuHuiTi2.0-105Heavy.ttf');
 }
+
 @font-face {
   font-family: 'SourceHanSansCN-Medium';
   src: url('./assets/fonts/SourceHanSansCN-Medium.otf');
 }
+
 @font-face {
   font-family: 'AlibabaPuHuiTi2.0-75SemiBold';
   src: url('./assets/fonts//AlibabaPuHuiTi2.0-75SemiBold.ttf');

+ 7 - 0
zhengquan/src/images.d.ts

@@ -0,0 +1,7 @@
+declare module '*.svg'
+declare module '*.png'
+declare module '*.jpg'
+declare module '*.jpeg'
+declare module '*.gif'
+declare module '*.bmp'
+declare module '*.tiff'

+ 1 - 0
zhengquan/src/utils/browser.ts

@@ -28,6 +28,7 @@ function versions () {
     // 是否为微信浏览器
     weixin: ~u.indexOf('MicroMessenger'),
     // 获取浏览器语言
+    // @ts-ignore
     language: (navigator.browserLanguage || navigator.language).toLowerCase()
   }
 }

+ 0 - 28
zhengquan/src/utils/loadScript.ts

@@ -1,28 +0,0 @@
-//动态加载外部js
-//@param RESOURCE_LIST 外部地址集合["address"]
-export function loadVoLteResourceList(RESOURCE_LIST: any, success: any) {
-  return new Promise((r) => {
-    RESOURCE_LIST.reduce((res: any, el: any) => res.then(() => loadScript(el)), Promise.resolve())
-      .then(() => {
-        r()
-      })
-      .catch((error: any) => {
-        console.error('外呼VoLTE sdk 前置 js 资源加载失败:', error.name, error.message)
-        return Promise.reject(error)
-      })
-  })
-}
-
-export function loadScript(url: string) {
-  return new Promise((resolve, reject) => {
-    const script = document.createElement('script')
-
-    script.onload = () => resolve()
-
-    script.onerror = () => reject(new Error(`Load script from ${url} failed`))
-
-    script.src = url
-    const head = document.head || document.getElementsByTagName('head')[0]
-    ;(document.body || head).appendChild(script)
-  })
-}

+ 10 - 9
zhengquan/src/views/Home/components/sceneListInfo.vue

@@ -24,6 +24,7 @@ onMounted(() => {
     slidesPerView: 5,
     allowSwipeToPrev: true,
     allowSwipeToNext: true,
+    // @ts-ignore
     direction: getDirection(),
     navigation: {
       nextEl: '.swiper-button-next',
@@ -36,15 +37,15 @@ onMounted(() => {
     },
   });
 })
-const swiperPrev = () => {
-  console.log('下一页')
-  swiper.slidePrev()
-}
-const swiperNext = () => {
-  console.log('上一页')
-  swiper.slideNext()
-
-}
+// const swiperPrev = () => {
+//   console.log('下一页')
+//   swiper.slidePrev()
+// }
+// const swiperNext = () => {
+//   console.log('上一页')
+//   swiper.slideNext()
+
+// }
 </script>
 
 <template>

+ 1 - 1
zhengquan/src/views/Home/components/unitList.vue

@@ -184,7 +184,7 @@ const swiperNext = () => {
         <div class="swiper-button-next" @click="swiper2Next"></div>
         <div class="swiper-pagination2"></div>
         <div class="pagination2">
-          <div class="pagination2-item" v-for="(item, index) in curUnit.images" :key="index"
+          <div class="pagination2-item" v-for="(item, index) in curUnit.images" :key="item"
             @click="swiper2.slideTo(index)" :class="{ 'active': swiper2Index == index }">
           </div>
         </div>

+ 3 - 1
zhengquan/src/views/Scene/ScenePage.vue

@@ -32,6 +32,7 @@ const getAllHotspot = () => {
   store.dataAll.sceneList.forEach((item: any) => {
     axios.get(`https://super.4dage.com/data/${item.code}/data2.js?m=${new Date().getTime()}`).then((res: any) => {
       console.log('热点列表', res.data)
+      //@ts-ignore
       hotspots.value.push({
         id: item.id,
         unit: item.name,
@@ -52,6 +53,7 @@ watch(hotspots.value, (newVal: any) => {
 
 const goHotCamarer = (hot: any) => {
   const iframe = document.getElementById('sceneiframe') as HTMLIFrameElement
+  //@ts-ignore
   iframe.contentWindow.initCamera(hot.sid)
   currentHot.value = hot
   isShowHosList.value = false
@@ -72,7 +74,7 @@ onMounted(() => {
   // greeting-招呼 idle-静默 talk-说话
   window.handleRobot = (state: string) => {
     console.log('handleRobot!!!', state);
-    
+
     animalStat.value = state
     isReady.value = true
   }

+ 0 - 1
zhengquan/tsconfig.json

@@ -27,5 +27,4 @@
     },
   },
   "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
-  "references": [{ "path": "./tsconfig.node.json" }]
 }