فهرست منبع

增加热点列表功能

shaogen1995 2 سال پیش
والد
کامیت
5b4436f845

+ 134 - 3
SWKK/package-lock.json

@@ -9,6 +9,7 @@
       "version": "0.1.0",
       "dependencies": {
         "core-js": "^3.6.5",
+        "element-ui": "^2.15.10",
         "v-viewer": "^1.5.1",
         "vue": "^2.6.11",
         "vue-lazyload": "^1.3.3",
@@ -3123,6 +3124,14 @@
       "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
       "dev": true
     },
+    "node_modules/async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
+      "dependencies": {
+        "babel-runtime": "6.x"
+      }
+    },
     "node_modules/asynckit": {
       "version": "0.4.0",
       "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@@ -3174,6 +3183,11 @@
       "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
       "dev": true
     },
+    "node_modules/babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
     "node_modules/babel-loader": {
       "version": "8.2.5",
       "resolved": "https://registry.npmmirror.com/babel-loader/-/babel-loader-8.2.5.tgz",
@@ -3241,6 +3255,27 @@
         "@babel/core": "^7.0.0-0"
       }
     },
+    "node_modules/babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+      "dependencies": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      }
+    },
+    "node_modules/babel-runtime/node_modules/core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+      "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
+      "hasInstallScript": true
+    },
+    "node_modules/babel-runtime/node_modules/regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
+    },
     "node_modules/balanced-match": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -5180,7 +5215,6 @@
       "version": "1.5.2",
       "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
       "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
-      "dev": true,
       "engines": {
         "node": ">=0.10.0"
       }
@@ -5661,6 +5695,30 @@
       "integrity": "sha512-g6RQ9zCOV+U5QVHW9OpFR7rdk/V7xfopNXnyAamdpFgCHgZ1sjI8VuR1+zG2YG/TZk+tQ8mpNkug4P8FU0fuOA==",
       "dev": true
     },
+    "node_modules/element-ui": {
+      "version": "2.15.10",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.10.tgz",
+      "integrity": "sha512-jmD++mU2wKXbisvx4fxOl2mHaU+HWHTAq/3Wf8x9Bwyu4GdDZPLABb+CGi3DWN6fPqdgRcd74aX39DO+YHObLw==",
+      "dependencies": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      },
+      "peerDependencies": {
+        "vue": "^2.5.17"
+      }
+    },
+    "node_modules/element-ui/node_modules/throttle-debounce": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
+      "engines": {
+        "node": ">=4"
+      }
+    },
     "node_modules/elliptic": {
       "version": "6.5.4",
       "resolved": "https://registry.npmmirror.com/elliptic/-/elliptic-6.5.4.tgz",
@@ -9020,6 +9078,11 @@
         "node": ">=4"
       }
     },
+    "node_modules/normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+    },
     "node_modules/npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -10937,6 +11000,11 @@
       "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
       "dev": true
     },
+    "node_modules/resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
+    },
     "node_modules/resolve": {
       "version": "1.22.1",
       "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz",
@@ -16776,6 +16844,14 @@
       "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
       "dev": true
     },
+    "async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
+      "requires": {
+        "babel-runtime": "6.x"
+      }
+    },
     "asynckit": {
       "version": "0.4.0",
       "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@@ -16815,6 +16891,11 @@
       "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
       "dev": true
     },
+    "babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
     "babel-loader": {
       "version": "8.2.5",
       "resolved": "https://registry.npmmirror.com/babel-loader/-/babel-loader-8.2.5.tgz",
@@ -16866,6 +16947,27 @@
         "@babel/helper-define-polyfill-provider": "^0.3.3"
       }
     },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      },
+      "dependencies": {
+        "core-js": {
+          "version": "2.6.12",
+          "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
+          "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
+        },
+        "regenerator-runtime": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+          "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
+        }
+      }
+    },
     "balanced-match": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -18510,8 +18612,7 @@
     "deepmerge": {
       "version": "1.5.2",
       "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
-      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
-      "dev": true
+      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
     },
     "default-gateway": {
       "version": "5.0.5",
@@ -18907,6 +19008,26 @@
       "integrity": "sha512-g6RQ9zCOV+U5QVHW9OpFR7rdk/V7xfopNXnyAamdpFgCHgZ1sjI8VuR1+zG2YG/TZk+tQ8mpNkug4P8FU0fuOA==",
       "dev": true
     },
+    "element-ui": {
+      "version": "2.15.10",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.10.tgz",
+      "integrity": "sha512-jmD++mU2wKXbisvx4fxOl2mHaU+HWHTAq/3Wf8x9Bwyu4GdDZPLABb+CGi3DWN6fPqdgRcd74aX39DO+YHObLw==",
+      "requires": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      },
+      "dependencies": {
+        "throttle-debounce": {
+          "version": "1.1.0",
+          "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+          "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
+        }
+      }
+    },
     "elliptic": {
       "version": "6.5.4",
       "resolved": "https://registry.npmmirror.com/elliptic/-/elliptic-6.5.4.tgz",
@@ -21659,6 +21780,11 @@
         "sort-keys": "^1.0.0"
       }
     },
+    "normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+    },
     "npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -23282,6 +23408,11 @@
       "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
       "dev": true
     },
+    "resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
+    },
     "resolve": {
       "version": "1.22.1",
       "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz",

+ 4 - 3
SWKK/package.json

@@ -8,10 +8,11 @@
   },
   "dependencies": {
     "core-js": "^3.6.5",
-    "vue": "^2.6.11",
-    "vue-router": "^3.2.0",
+    "element-ui": "^2.15.10",
     "v-viewer": "^1.5.1",
-    "vue-lazyload": "^1.3.3"
+    "vue": "^2.6.11",
+    "vue-lazyload": "^1.3.3",
+    "vue-router": "^3.2.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.13",

BIN
SWKK/src/assets/img/LeftTop/delete.png


BIN
SWKK/src/assets/img/LeftTop/hotBox.png


BIN
SWKK/src/assets/img/LeftTop/incoHot.png


BIN
SWKK/src/assets/img/LeftTop/incoHotAc.png


+ 345 - 85
SWKK/src/components/Rbottom.vue

@@ -1,68 +1,76 @@
 <template>
   <div class="Rbottom" :style="`${leftList[1].done ? 'bottom:0px' : ''}`">
+
+    <!--热点列表div -->
+    <div class="hotBox" :class="{ activeHotBox: hotListShow }">
+      <div class="hot_main">
+        <!-- 关闭按钮 -->
+        <div class="hot_close" @click="hotListShow = false"></div>
+        <!-- 标题 -->
+        <div class="hot_title">热点列表</div>
+        <!-- 输入框 -->
+        <div class="hot_search" @keyup.enter="mySearch">
+          <!-- <input type="text" v-model="hotTxt"> -->
+          <el-input type="text" placeholder="请输关键字" v-model="hotTxt" maxlength="30" show-word-limit>
+          </el-input>
+          <div class="hot_btn" @click="mySearch">搜索</div>
+        </div>
+        <!-- 历史记录 -->
+        <div class="hot_his" v-show="hotHisList.length > 0">
+          <div class="hot_hisRow" @click="selectHis(item)" v-for="(item, index) in hotHisList" :key="index">{{ item }}
+          </div>
+          <!-- 清除 -->
+          <div class="hot_clearHis" @click="clearHotHis">清除历史记录</div>
+        </div>
+        <!-- 热点列表 -->
+        <div class="hot_list" :style="`height:${hotHisList.length === 0 ? '540px' : '450px'}`">
+          <div class="hot_listRow" @click="openHot(item)" v-for="item in hotListShowData" :key="item.sid">{{
+              item.title?.split('&')[0]
+          }}</div>
+        </div>
+      </div>
+
+    </div>
+
     <audio src="@/assets/media/bacMusic.mp3" loop id="bacMusic"></audio>
 
     <div class="box1">
       <div class="mainll mainrr">
-        <div
-          v-show="list.length !== 0 || item.type > 2"
-          @click="leftCutClick(item.type)"
-          class="row"
-          :class="{ active2: item.done }"
-          v-for="item in leftList"
-          :key="item.type"
-        >
-          <img
-            :src="
-              require(`@/assets/img/LeftTop/inco${item.type}${
-                item.done ? 'Ac' : ''
+        <div v-show="list.length !== 0 || item.type > 2" @click="leftCutClick(item.type)" class="row"
+          :class="{ active2: item.done }" v-for="item in leftList" :key="item.type">
+          <img :src="
+            require(`@/assets/img/LeftTop/inco${item.type}${item.done ? 'Ac' : ''
               }.png`)
-            "
-            alt=""
-          />
+          " alt="" />
           <p>{{ item.name }}</p>
         </div>
+
+        <!-- 热点列表 -->
+        <div class="row" :class="{ active2: hotListShow }" @click="hotListShow = true">
+          <img :src="
+            require(`@/assets/img/LeftTop/incoHot${hotListShow ? 'Ac' : ''
+              }.png`)
+          " alt="" />
+          <p>热点列表</p>
+        </div>
+
       </div>
 
       <div class="mainrr">
-        <div
-          class="row"
-          @click="rightClisk(item.type)"
-          v-for="item in rightList"
-          :key="item.type"
-          :class="{
-            active2:
-              (music && item.type === 2) ||
-              (like && item.type === 3) ||
-              (share && item.type === 4) ||
-              (isFullscreen && item.type === 5),
-          }"
-        >
-          <img
-            :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)"
-            alt=""
-            v-if="music && item.type === 2"
-          />
-          <img
-            :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)"
-            alt=""
-            v-else-if="like && item.type === 3"
-          />
-          <img
-            :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)"
-            alt=""
-            v-else-if="share && item.type === 4"
-          />
-          <img
-            :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)"
-            alt=""
-            v-else-if="isFullscreen && item.type === 5"
-          />
-          <img
-            :src="require(`@/assets/img/Goods/inco${item.type}.png`)"
-            alt=""
-            v-else
-          />
+        <div class="row" @click="rightClisk(item.type)" v-for="item in rightList" :key="item.type" :class="{
+          active2:
+            (music && item.type === 2) ||
+            (like && item.type === 3) ||
+            (share && item.type === 4) ||
+            (isFullscreen && item.type === 5),
+        }">
+          <img :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)" alt="" v-if="music && item.type === 2" />
+          <img :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)" alt="" v-else-if="like && item.type === 3" />
+          <img :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)" alt=""
+            v-else-if="share && item.type === 4" />
+          <img :src="require(`@/assets/img/Goods/inco${item.type}Ac.png`)" alt=""
+            v-else-if="isFullscreen && item.type === 5" />
+          <img :src="require(`@/assets/img/Goods/inco${item.type}.png`)" alt="" v-else />
           <transition name="likeAddAnimate">
             <div class="likeMove" v-show="like && item.type === 3">+ 1</div>
           </transition>
@@ -73,30 +81,17 @@
       </div>
     </div>
 
-    <div
-      class="box2"
-      :style="`${leftList[1].done ? '' : 'height:0px;padding:0;opacity:0'}`"
-    >
+    <div class="box2" :style="`${leftList[1].done ? '' : 'height:0px;padding:0;opacity:0'}`">
       <div class="swiper-container">
         <div class="swiper-wrapper" v-if="list.length">
-          <div
-            @click="cutGoods(index)"
-            class="swiper-slide"
-            v-for="(item, index) in list"
-            :class="{ active: (acList === index && playing) || (clickBottomAc&&acList === index) }"
-            :key="index"
-          >
+          <div @click="cutGoods(index)" class="swiper-slide" v-for="(item, index) in list"
+            :class="{ active: (acList === index && playing) || (clickBottomAc && acList === index) }" :key="index">
             <img :src="item.list[0].enter.cover" alt="" />
-            <div
-              class="plan"
-              v-show="(acList === index && playing) || (clickBottomAc&&acList === index)"
-              :style="{ width: progressPart + '%' }"
-            ></div>
-            <p
-              :class="{
-                txtActive: (acList === index && playing) || (clickBottomAc&&acList === index),
-              }"
-            >
+            <div class="plan" v-show="(acList === index && playing) || (clickBottomAc && acList === index)"
+              :style="{ width: progressPart + '%' }"></div>
+            <p :class="{
+              txtActive: (acList === index && playing) || (clickBottomAc && acList === index),
+            }">
               {{ item.name }}
             </p>
           </div>
@@ -124,6 +119,7 @@
 </template>
 
 <script>
+import { getHotHis, setHotHis, clearHotHis } from '../utils/storage'
 import { addNumAPI } from "@/utils/api";
 import Swiper from "./swiper.js";
 export default {
@@ -146,6 +142,11 @@ export default {
       share: false,
       isFullscreen: false,
       // --------------
+      hotList: [],
+      hotListShowData: [],
+      hotHisList: [],
+      hotTxt: '',
+      hotListShow: true,
       leftList: [
         { name: "自动漫游", type: 1, done: false },
         { name: "场景导览", type: 2, done: false },
@@ -161,6 +162,19 @@ export default {
   computed: {},
   //监控data中的数据变化
   watch: {
+    hotListShow(val) {
+      if (val) {
+        if (this.leftList[0].done) {
+          this.$emit("stopPlay", true);
+          this.leftList[0].done = false
+          if (window.bacMusic) {
+            setTimeout(() => {
+              this.music = true;
+            }, 100);
+          }
+        }
+      }
+    },
     acList(val) {
       let temp = val - 2;
       if (temp < 0) temp = 0;
@@ -175,9 +189,49 @@ export default {
   },
   //方法集合
   methods: {
+    // 给父组件调用,拿到热点数据
+    getHotListToFather(data) {
+      this.hotList = data.filter(v => v.title.split("&")[2] || !v.title.includes("&"))
+      this.hotListShowData = [...this.hotList]
+    },
+
+    openHot(item) {
+      this.$emit('openHot', item)
+    },
+
+    selectHis(val) {
+      this.hotHisList = this.hotHisList.filter(v => v !== val)
+      this.hotTxt = val
+      this.hotHisList.unshift(val)
+      setHotHis(this.hotHisList)
+      this.hotListShowData = this.hotList.filter(v => v.title.includes(this.hotTxt))
+    },
+
+    clearHotHis() {
+      clearHotHis()
+      this.hotHisList = []
+    },
+
+    mySearch() {
+
+      if (this.hotTxt.trim() === '') {
+        this.hotListShowData = [...this.hotList]
+      } else {
+        this.hotListShowData = this.hotList.filter(v => v.title.includes(this.hotTxt))
+        this.hotHisList = this.hotHisList.filter(v => v !== this.hotTxt)
+        this.hotHisList.unshift(this.hotTxt)
+        if (this.hotHisList.length > 14) this.hotHisList.length = 14
+        setHotHis(this.hotHisList)
+      }
+
+
+
+
+
+    },
     cutGoods(index) {
       this.$emit("update:clickBottomAc", false);
-      
+
 
       this.$emit("daoLanCut", index);
       this.leftList[0].done = false;
@@ -332,7 +386,9 @@ export default {
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() {
+    this.hotHisList = getHotHis()
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // 监听esc事件
@@ -351,13 +407,13 @@ export default {
       if (!document.mozFullScreenElement) this.isFullscreen = false;
     });
   },
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+  beforeCreate() { }, //生命周期 - 创建之前
+  beforeMount() { }, //生命周期 - 挂载之前
+  beforeUpdate() { }, //生命周期 - 更新之前
+  updated() { }, //生命周期 - 更新之后
+  beforeDestroy() { }, //生命周期 - 销毁之前
+  destroyed() { }, //生命周期 - 销毁完成
+  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang='less' scoped>
@@ -366,38 +422,221 @@ export default {
   background-color: #fff;
   overflow: hidden;
 }
+
 /deep/.swiper-scrollbar-drag {
   background-color: #930909;
 }
+
 @import "./swiper.css";
+
 .likeAddAnimate-enter-active,
 .likeAddAnimate-leave-active {
   transition: all 2s ease;
 }
+
 .likeAddAnimate-enter,
 .likeAddAnimate-leave {
   transform: translateY(0) scale(0);
   opacity: 0;
 }
+
 .likeAddAnimate-enter-to,
 .likeAddAnimate-leave-to {
   transform: translateY(-50px) scale(1.2);
   opacity: 1;
 }
+
 .Rbottom {
   transition: all 0.5s;
-  z-index: 10;
+  z-index: 11;
   position: absolute;
   bottom: 24px;
   right: 0px;
   width: 100%;
+
+  // 热点列表页面
+  .hotBox {
+    transition: opacity .3s;
+    opacity: 0;
+    pointer-events: none;
+    position: fixed;
+    z-index: 99;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    backdrop-filter: blur(4px);
+
+    .hot_main {
+      padding: 25px 50px 15px;
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+      width: 1100px;
+      height: 700px;
+      background-image: url('../assets/img/LeftTop/hotBox.png');
+      background-size: 100% 100%;
+
+      .hot_close {
+        cursor: pointer;
+        position: absolute;
+        background-image: url('../assets/img/Goods/shareClose.png');
+        background-size: 100% 100%;
+        right: -20px;
+        top: -20px;
+        z-index: 11;
+        width: 48px;
+        height: 48px;
+      }
+
+      .hot_title {
+        font-size: 24px;
+        color: #D8B275;
+        margin-bottom: 15px;
+      }
+
+      .hot_search {
+        display: flex;
+        height: 40px;
+        justify-content: space-between;
+
+        .el-input {
+          width: 860px;
+
+          /deep/input {
+            background-color: transparent;
+            border-radius: 20px;
+            border: 1px solid #D8B275;
+            color: #fff;
+          }
+
+          /deep/.el-input__count-inner {
+            background-color: transparent;
+            color: #fff;
+          }
+        }
+
+        .hot_btn {
+          width: 100px;
+          height: 40px;
+          background-color: #D8B275;
+          border-radius: 20px;
+          cursor: pointer;
+          text-align: center;
+          line-height: 40px;
+          color: #930909;
+          font-size: 14px;
+        }
+      }
+
+      .hot_his {
+        display: flex;
+        flex-wrap: wrap;
+        position: relative;
+        padding-right: 120px;
+
+        .hot_clearHis {
+          position: absolute;
+          bottom: 0;
+          right: 0;
+          cursor: pointer;
+          padding-left: 20px;
+          background: url('../assets/img/LeftTop/delete.png') left center no-repeat;
+          background-size: 17px 17px;
+          color: #fff;
+          font-size: 14px;
+        }
+
+        .hot_hisRow {
+          height: 30px;
+          line-height: 30px;
+          padding: 0 8px;
+          background-color: #EEEEEE;
+          margin-right: 15px;
+          margin-top: 15px;
+          cursor: pointer;
+          border-radius: 15px;
+          max-width: 110px;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+      }
+
+      .hot_list::-webkit-scrollbar {
+        /*滚动条整体样式*/
+        width: 5px;
+        /*高宽分别对应横竖滚动条的尺寸*/
+        height: 1px;
+      }
+
+      .hot_list::-webkit-scrollbar-thumb {
+        /*滚动条里面小方块*/
+        border-radius: 1px;
+        -webkit-box-shadow: inset 0 0 5px transparent;
+        background: #d8b275;
+      }
+
+      .hot_list::-webkit-scrollbar-track {
+        /*滚动条里面轨道*/
+        -webkit-box-shadow: inset 0 0 5px transparent;
+        border-radius: 10px;
+        background: transparent;
+      }
+
+      .hot_list {
+        padding-right: 15px;
+        margin-top: 28px;
+        height: 450px;
+        overflow-y: auto;
+
+        .hot_listRow {
+          cursor: pointer;
+          border-bottom: 1px solid #fff;
+          height: 50px;
+          line-height: 48px;
+          color: #fff;
+          font-size: 16px;
+
+          &:nth-of-type(1) {
+            border-top: 1px solid #fff;
+          }
+
+          &:hover {
+            color: #d8b275;
+            border-bottom: 1px solid #d8b275;
+            position: relative;
+
+            &::before {
+              content: '';
+              position: absolute;
+              top: -1px;
+              left: 0;
+              width: 100%;
+              height: 1px;
+              background-color: #D8B275;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .activeHotBox {
+    opacity: 1;
+    pointer-events: auto;
+  }
+
   .box1 {
     padding: 0 25px;
     width: 100%;
     display: flex;
     justify-content: space-between;
+
     .mainrr {
       display: flex;
+
       .row {
         position: relative;
         cursor: pointer;
@@ -406,12 +645,14 @@ export default {
         margin-left: 18px;
         color: #fff;
 
-        & > img {
+        &>img {
           width: 50px;
         }
+
         p {
           font-size: 12px;
         }
+
         .likeMove {
           color: #930909;
           position: absolute;
@@ -420,14 +661,17 @@ export default {
           text-align: center;
         }
       }
+
       .active2 {
         color: #930909;
         font-weight: 700;
+
         p {
           font-size: 12px;
         }
       }
     }
+
     .mainll {
       .row {
         width: 80px;
@@ -435,6 +679,7 @@ export default {
       }
     }
   }
+
   .box2 {
     overflow: hidden;
     transition: height 0.5s;
@@ -443,17 +688,21 @@ export default {
     height: 170px;
     background-color: #d8b275;
     padding: 15px 25px 0;
+
     .swiper-container {
       cursor: grab;
       height: 100%;
+
       .swiper-slide {
         cursor: pointer;
         height: 120px;
+
         img {
           width: 100%;
           height: 110px;
           object-fit: cover;
         }
+
         p {
           text-align: center;
           height: 30px;
@@ -461,14 +710,17 @@ export default {
           color: #ffffff;
           font-size: 14px;
         }
+
         .plan {
           height: 4px;
           background-color: #930909;
         }
+
         .txtActive {
           color: #930909;
         }
       }
+
       .active {
         img {
           border: 3px solid #930909;
@@ -477,6 +729,7 @@ export default {
     }
   }
 }
+
 .shareBox {
   z-index: 11;
   position: fixed;
@@ -488,6 +741,7 @@ export default {
   pointer-events: none;
   backdrop-filter: blur(4px);
   transition: opacity 0.5s;
+
   .shareMain {
     padding: 40px 30px 0;
     position: absolute;
@@ -499,6 +753,7 @@ export default {
     background-image: url("../assets/img/Goods/shareBac.png");
     background-size: 100% 100%;
     text-align: center;
+
     .close {
       width: 48px;
       height: 48px;
@@ -509,21 +764,25 @@ export default {
       background-image: url("../assets/img/Goods/shareClose.png");
       background-size: 100% 100%;
     }
+
     h3 {
       text-align: left;
       color: #d8b275;
       font-size: 24px;
       margin-bottom: 50px;
     }
+
     p {
       font-size: 20px;
       color: #ffffff;
       margin-bottom: 40px;
     }
+
     img {
       width: 240px;
       margin-bottom: 50px;
     }
+
     .btnn {
       cursor: pointer;
       width: 280px;
@@ -537,6 +796,7 @@ export default {
     }
   }
 }
+
 .shareBoxShow {
   opacity: 1;
   pointer-events: auto;

+ 3 - 2
SWKK/src/main.js

@@ -1,8 +1,9 @@
 import Vue from 'vue'
 import App from './App.vue'
 import router from './router'
-
-
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+Vue.use(ElementUI);
 // 图片查看
 import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'

+ 11 - 0
SWKK/src/utils/storage.js

@@ -0,0 +1,11 @@
+const KEY = 'YHT_HISDATA'
+export const setHotHis = (data) => {
+  localStorage.setItem(KEY, JSON.stringify(data))
+}
+export const getHotHis = () => {
+  const data = localStorage.getItem(KEY)
+  return data ? JSON.parse(data) : []
+}
+export const clearHotHis =()=>{
+  localStorage.removeItem(KEY)
+}

+ 87 - 77
SWKK/src/views/Home.vue

@@ -24,16 +24,8 @@
     </div>
 
     <!-- 右下按钮  -->
-    <Rbottom
-      ref="RbottomRef"
-      @cutKankan="cutKankan"
-      @daoLanCut="daoLanCut"
-      @stopPlay="stopPlay"
-      :acList="partId"
-      :playing="playing"
-      :progressPart="progressPart"
-      :clickBottomAc.sync="clickBottomAc"
-    />
+    <Rbottom ref="RbottomRef" @cutKankan="cutKankan" @daoLanCut="daoLanCut" @stopPlay="stopPlay" :acList="partId"
+      :playing="playing" :progressPart="progressPart" :clickBottomAc.sync="clickBottomAc" @openHot='openHot' />
 
     <!-- 左上名字和介绍 -->
     <div class="Ltitle" :class="{ open: title }">
@@ -133,7 +125,7 @@ export default {
       await player.selectPart(index);
       this.disable = false;
 
-      
+
       this.clickBottomAc = true;
     },
 
@@ -157,9 +149,63 @@ export default {
       else if (ind === 3) this.kankan.Camera.dollhouse();
       else if (ind === 4) this.kankan.Camera.floorplan();
     },
+
+
+    openHot(data){
+      this.openHotFu(data)
+    },
+    // 封装点击热点的函数
+    openHotFu(data) {
+      // 点击热点的时候当前背景音乐的播放状态
+      let dom = document.querySelector("#bacMusic");
+      window.bacMusic = !dom.paused;
+      setTimeout(() => {
+        this.$refs.RbottomRef.opMusic(false);
+      }, 200);
+
+      let temp = [];
+
+      // 如果是多个热点合并
+      if (data.title.split("&")[1]) {
+        this.baseHotData.forEach((v) => {
+          if (v.title.split("&")[1] === data.title.split("&")[1]) {
+            temp.push(v);
+            if (v.media && v.media.image && v.media.image.length > 1) {
+              v.media.image.forEach((p, pI) => {
+                if (pI !== 0) temp.push({ ...v, media: { image: [p] } });
+              });
+            }
+          }
+        });
+        let obj = {
+          image: [],
+          audio: [],
+          link: [],
+          video: [],
+        };
+        temp.forEach((v) => {
+          obj[v.type].push(v);
+        });
+        for (const k in obj) {
+          if (k === "audio") {
+            obj[k].reverse();
+          }
+        }
+
+        this.sonInfo = obj;
+      } else {
+        // 单个热点
+        this.sonInfo = { [data.type]: [data] };
+      }
+      // 如果只需监听热点点击,实现其他逻辑操作,下面的代码不需要调用
+
+      // 聚焦当前点击的热点
+      window.TagView.focus(data.sid);
+    }
+
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() { },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     let num = this.$route.params.id;
@@ -258,15 +304,8 @@ export default {
 
     // 全部热点数据
     kankan.store.on("tags", (tags) => {
+      this.$refs.RbottomRef.getHotListToFather(tags.tags)
       this.baseHotData = tags.tags.reverse();
-      // let temp = [];
-      // tags.tags.forEach((v) => {
-      //   let arrTitle = v.title.split("&");
-      //   // 显示在页面的热点图标
-      //   if (arrTitle[2]) {
-      //     temp.push(v);
-      //   }
-      // });
     });
 
     // 热点
@@ -279,60 +318,15 @@ export default {
 
           let title = data.title.split("&")[0];
 
-          return `<span class="tag-icon animate" title=${title} style="${
-            flag ? "" : "display: none;"
-          };background-image:url({{icon}})"></span><div class="tag-body"></div>`;
+          return `<span class="tag-icon animate" title=${title} style="${flag ? "" : "display: none;"
+            };background-image:url({{icon}})"></span><div class="tag-body"></div>`;
         },
       })
       .then((TagView) => {
+        window.TagView = TagView
         // 监听手动点击事件
         TagView.on("click", (e) => {
-          // 点击热点的时候当前背景音乐的播放状态
-          let dom = document.querySelector("#bacMusic");
-          window.bacMusic = !dom.paused;
-          setTimeout(() => {
-            this.$refs.RbottomRef.opMusic(false);
-          }, 200);
-
-          let temp = [];
-
-          // 如果是多个热点合并
-          if (e.data.title.split("&")[1]) {
-            this.baseHotData.forEach((v) => {
-              if (v.title.split("&")[1] === e.data.title.split("&")[1]) {
-                temp.push(v);
-                if (v.media && v.media.image && v.media.image.length > 1) {
-                  v.media.image.forEach((p, pI) => {
-                    if (pI !== 0) temp.push({ ...v, media: { image: [p] } });
-                  });
-                }
-              }
-            });
-            let obj = {
-              image: [],
-              audio: [],
-              link: [],
-              video: [],
-            };
-            temp.forEach((v) => {
-              obj[v.type].push(v);
-            });
-            // console.log("11111111111", obj);
-            for (const k in obj) {
-              if (k === "audio") {
-                obj[k].reverse();
-              }
-            }
-
-            this.sonInfo = obj;
-          } else {
-            // 单个热点
-            this.sonInfo = { [e.data.type]: [e.data] };
-          }
-          // 如果只需监听热点点击,实现其他逻辑操作,下面的代码不需要调用
-
-          // 聚焦当前点击的热点
-          TagView.focus(e.data.sid);
+          this.openHotFu(e.data)
         });
       });
 
@@ -366,13 +360,13 @@ export default {
     });
     this.kankan = kankan;
   },
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+  beforeCreate() { }, //生命周期 - 创建之前
+  beforeMount() { }, //生命周期 - 挂载之前
+  beforeUpdate() { }, //生命周期 - 更新之前
+  updated() { }, //生命周期 - 更新之后
+  beforeDestroy() { }, //生命周期 - 销毁之前
+  destroyed() { }, //生命周期 - 销毁完成
+  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang='less' scoped>
@@ -381,11 +375,13 @@ export default {
     left: -900px;
   }
 }
+
 .Home {
   width: 100%;
   height: 100%;
   overflow: hidden;
   position: relative;
+
   .box {
     width: 100%;
     height: 100%;
@@ -393,6 +389,7 @@ export default {
     top: 0;
     left: 0;
   }
+
   .loading {
     position: absolute;
     top: 0;
@@ -404,6 +401,7 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
+
     .loadBox {
       color: #fff;
       text-align: center;
@@ -411,12 +409,14 @@ export default {
       width: 110px;
       height: 110px;
       border-radius: 2px;
+
       .loadIcon {
         width: 60px;
         height: 60px;
         position: relative;
         overflow: hidden;
         margin: 10px auto;
+
         img {
           height: 60px;
           position: absolute;
@@ -427,6 +427,7 @@ export default {
       }
     }
   }
+
   /deep/[xui_min_map] {
     width: 180px;
     height: 180px;
@@ -452,12 +453,14 @@ export default {
     display: flex;
     justify-content: space-between;
     padding: 0 15px;
+
     .row1 {
       cursor: pointer;
       display: flex;
       justify-content: center;
       align-items: center;
       font-size: 14px;
+
       .rowll {
         margin-right: 6px;
         width: 20px;
@@ -466,13 +469,16 @@ export default {
         border: 1px solid #d8b275;
         position: relative;
       }
+
       .rowrr {
         padding-bottom: 2px;
       }
     }
+
     .active {
       color: #d8b275;
       pointer-events: none;
+
       .rowll {
         &::after {
           content: "";
@@ -500,6 +506,7 @@ export default {
     background-image: url("../assets/img/LeftTop/label_title.png");
     background-size: 100% 100%;
     display: flex;
+
     .Ltitlell {
       position: relative;
       left: 196px;
@@ -508,11 +515,12 @@ export default {
       height: 100%;
       padding: 6px 0 0px 10px;
 
-      & > img {
+      &>img {
         width: 8px;
         height: 13px;
       }
     }
+
     .Ltitlerr {
       width: 186px;
       height: 40px;
@@ -521,8 +529,10 @@ export default {
       color: #fff;
     }
   }
+
   .open {
     left: 0;
+
     .Ltitlell {
       left: 0;
     }